Rtndloctl
RtndIoctl is called when the stack requires that the driver configure certain NIC modes or characteristics.
Syntax
int RtndIoctl( void *ndp, int cmd, char *addr );
Parameters
ndp
Network Device Pointer. Opaque network device identifier.
cmd
Control code to execute.
addr
Pointer to IGMP Address when adding or deleting a multicast group.
Return Value
A return value of 0 indicates Success, -1 indicates Failure.
Remarks
The following commands (passed in the cmd parameter) are possible.
Command |
Description |
ENIOCPROMISC |
(Optional) Turn on promiscuous mode |
ENIOCALL |
(Optional) Receive good and bad packets. Non-promisc. |
ENIOCNORMAL |
(Optional) Receive only good packets. Default mode. |
ENIOADDMULTI |
(Required) Add multicast route to this NIC (required command, should be implemented). The addr parameter points to an Ethernet address byte string (6 bytes), which indicates the multicast group Ethernet address. |
ENIODELMULTI
|
(Required) Delete multicast route from this NIC (required command, should be implemented). The addr parameter points to an Ethernet address byte string (6 bytes), which indicates the multicast group Ethernet address. |
ENIOLINKSTATUS |
(Optional) Reports link status. |
Note that when the ENIOADDMULTI or ENIODELMULTI commands are received in RtndIoctl the driver can call RtnGetMcastCount to determine how many multicast addresses have been added to the NIC. If RtnGetMcastCount returns 0 during the processing of a ENIOADDMULTI command, then it is the first multicast address being added to the NIC. If RtnGetMcastCount returns 0 during the processing of ENIODELMULTI, then it is the last address being deleted from the NIC. In other words, RtnGetMcastCount returns a pre increment/post decrement counter of the number of addresses added to the NIC.
Process Context
RtndIoctl is not called from a pre-determined process context. Do NOT use RTX handles in this routine.
Requirements
Minimum Supported Version | RTX64 2013 |
Header | RtnApi.h |
Library | RtTcpip.lib |