MB Raw IP Packet Processing Support
MB miniport drivers that support Raw IP packet frames in their send/receive data path should observe the following guidelines:
For IPv4 packets:
The NblFlags member of the NET_BUFFER_LIST structure must be set to NDIS_NBL_FLAGS_IS_IPV4.
The NetBufferListFrameType member of the NET_BUFFER_LIST structure must be set to 0x0800 (Ethertype IPv4) in network byte order.
For IPv6 packets:
The NblFlags member of NET_BUFFER_LIST structure must be set to NDIS_NBL_FLAGS_IS_IPV6.
The NetBufferListFrameType member of the NET_BUFFER_LIST structure must be set to 0x86dd (Ethertype IPv6) in network byte order.
Miniport drivers can use the NdisSetNblFlag macro to set flags in the net buffer list. The following line demonstrates how to set IPv4 packet flag in the net buffer list:
Miniport drivers can use the NET_BUFFER_LIST_INFO to get and set information in a net buffer list. The following line demonstrates how to modify the NetBufferListFrameType OOB in the network buffer list for IPV4 packets:
Value = ConvertToNetworkByteOrder(0x0800);
NET_BUFFER_LIST_INFO(pNbl, NetBufferListFrameType) = Value;
The MB Service will set these flags in the NBL before passing the list to the miniport driver to send across the network. The miniport driver can verify the flags in the input NBL.
Miniport drivers should set flags in the NBL before passing the NBL to the MB Service for received packets.
If your miniport driver implements Raw IP Packet Processing during its driver development phase, but still has DHCP server spoofing enabled (EnableDhcp = 1), your miniport driver should ensure following:
The hardware address and its length set in DHCP response from the miniport driver should match the values of the CurrentMacAddress and MacAddressLength members specified by the miniport driver in the NDIS_MINIPORT_ADAPTER_GENERAL_ATTRIBUTES structure.
Transaction ID (the xid member) of the DHCP response from the miniport driver should match exactly the transaction ID set in the DHCP request message from the client.