Protocol part of The NiCap
This is the part that is attached to the registered in the system NIC drivers. There is no restriction on the nubber of the NIC Adapters CAPTURED. Through this part outgoing packets are sent and may be captured incoming packets.
There are several modes of operation that will be described below in this document in detains:
TRANSPERENT - In this mode all arriving packets are resent to the protocols that are attached to the upperbound (the Miniport) part of NiCap - TCP/IP, etc. The additional possibility of this mode is that if there are requests from User Level for transfer of the arriving packets - they are transferred.
CAPTURE - All arriving packets are saved in internal NiCap queues till their transfer to User Level. These packets are not passed to upperbound protocols.
TRANSPERENT & CAPTURE - Arriving packets are passed to the upperbound protocols, but in the same time are kept in the internal NiCap queues till their transfer to User Level. In case there is a internal queues overflow, then the arrived packet, that is oldest and is not transferred at User level, is released.
TRANSPERENT & CAPTURE & STRICT - As the previous mode, but on internal NiCap queues overflow (this may happen if the User level do not accept the packets arrived) then packet receiving is terminated (these packets are lost).
Miniport part of The NiCap
This is that part of NiCap, to which the Protocol drivers of the system (one or more) are attached (TCP/IP, NetBEUI, etc.). Each Miniport part in NiCap is inseparably connected in Nicap to its corresponding Protocol part! This part of NiCap assures the possibility to be captured the packets for transfer from the upperbound protocols and to be simulated the packets' receiving from the network towards them.
In the process of NiCap design was provided for the ability of several Miniports, associated to one and the same Protocol part. This ability may be very comfortable if there is necessity to be determined the sender (or group of senders) of a certain packet from the network. Or for the simulation of packet receiving to a certain protocol from the clients of a certain NIC Adapter.
This possibility is not implemented, as it created a lot of problems concerning the maintenance of the TRANSPERENT mode for the corresponding Protocol part. In spite of this, the implementation of such ability quite realistic.
There are several modes of operation of the Miniport part that will be described below in this document in detains:
TRANSPERENT - In this mode the packets, that the upperbound protocols want to send, are transmitted trough the corresponding NICW and are reported back to the protocols with the corresponding status (sent/error). One additional ability of this mode is, that if there are requests from User Level for transfer of packets for to be send by the protocols - they are transferred.
TRANSPERENT & CAPTURE - In this mode the packets of the upperbound protocols are sent and in the same time are saved in internal NiCap queues till their transfer to User Level. It is important to note, that in these queues are kept the packets of the upperbound protocols. They are returned to the protocols after the physical sending of the packets is done AND THEIR TRANSFER TO User Level is done as well. In this mode certain packet may be transferred to User level before are after its physical sending.
TRANSPERENT & CAPTURE & AFTER_SEND - This mode is similar to the previous with the only difference that the packet is transferred to User Level AFTER its physical sending by the corresponding NIC Adapter.
CAPTURE - In this mode the packets that are sent by the upperbound protocols are held up in internal NiCap queues for transfer to User Level. In the process of this transfer to each packet a special unique key is associated and the original packet of the upperbound protocol remains held up in NiCap till its' EXPLICIT end at User Level by means of the associated key. In this manner the User Level may report to the upperbound protocol a finished physical sending of a packet even in case, that such was not done and vice versa. It is very important all packets transferred to User Level in this mode to be finished in any way; in other case they will stay in NiCap for ever and the free resources of the upperbound protocols will decrease till their exhaustion.
CAPTURE & REPORT_SEND - This mode is similar to the previous with the only difference that no key is associated with the packet transferred, because in the same time it is reported to the upperbound protocol as being sent. This mode is veri insidious as although looking very simple for use at first sight, it is possible the User Level Application to be heaped with packets and no physical time for their processing!