RtnIOCTLDriver

RtnIOCTLDriver is called when the Stack or application requires that the driver configure certain NIC modes or characteristics.  

Syntax

void RtnIOCTLDriver(
    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

None.

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 frames. Non-promisc.

ENIOCNORMAL

(Optional) Receive only good frames. 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) Get link status of this NIC.

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.

Requirements

Minimum Supported Version RTX64 2013
Header rtnapi.h
Library RtTcpip.lib