Implementing IPv6 NS Offload

An NDIS protocol driver sends an IPv6 neighbor solicitation (NS) offload request as an OID_PM_ADD_PROTOCOL_OFFLOAD OID request. To support these NS offload requests, miniports should do the following.

Indicating How Many Offload Requests the Miniport Adapter Supports

A miniport driver sets the NumNSOffloadIPv6Addresses member of the NDIS_PM_CAPABILITIES structure to indicate how many NS offload requests the miniport adapter supports.

Note  Despite its name, the NumNSOffloadIPv6Addresses member contains the number of supported requests, not the number of addresses.

Note  Some Windows Hardware Certification requirements, such as Device.Network.LAN.PM.PowMgmtNDIS and Device.Network.WLAN.WoWLAN.ImplementWakeOnWLAN, specify that the miniport adapter must support at least 2 NS offload requests. (In other words, to meet these requirements, the value of NumNSOffloadIPv6Addresses must be at least 2.) For more information, see the Windows 8 Hardware Certification Requirements.

Each NS offload request can contain 1 or 2 target addresses.

In addition, there are 2 types of NS messages: unicast and multicast. Miniport drivers must be prepared to match both types of NS message for each target address.

Example

If a miniport driver sets the NDIS_PM_CAPABILITIES member of the NumNSOffloadIPv6Addresses structure to 3, then NDIS may send up to 3 OID_PM_ADD_PROTOCOL_OFFLOAD requests of type NdisPMProtocolOffloadIdIPv6NS. Each OID_PM_ADD_PROTOCOL_OFFLOAD request may have exactly 1 or 2 addresses in the TargetIPv6Addresses member of the NDIS_PM_PROTOCOL_OFFLOAD structure. Therefore, the miniport must support a 3 x 2 = 6 target addresses.

Because the miniport must match both unicast and multicast NS messages for each target address, the miniport should be able to match a total of 6 x 2 = 12 NS message patterns.

Matching the NS Message

The NS message format is specified in RFC 4861 section 4.3, "Neighbor Solicitation Message Format". The miniport should match the fields in the following table.

FieldMatch valueNotes
Ethernet.EtherType

0x86dd (IPv6)

Adjust as needed for non-Ethernet media types.

IPv6.Version

6

IPv6.NextHeader

58 (ICMPv6)

IPv6.HopLimit

255

IPv6.Destination

OID.TargetIPv6Addresses[x] or OID.SolicitedNodeIPv6Address

The miniport must match both options for this field: OID.TargetIPv6Addresses[x] and OID.SolicitedNodeIPv6Address.

If this field is OID.TargetIPv6Addresses[x], the NS message is a unicast message.

If this field is OID.SolicitedNodeIPv6Address, the NS message is a multicast message.

OID.TargetIPv6Addresses is an array that can contain 1 or 2 addresses. If it contains 2 addresses, the miniport must match both of them. If the second address is "0::0", it must be ignored, and a second match pattern must not be created.

IPv6.ICMPv6.Type

135 (NS)

IPv6.ICMPv6.Code

0

IPv6.ICMPv6.TargetAddress

OID.TargetIPv6Addresses[x]

OID.TargetIPv6Addresses[x] is an array that can contain 1 or 2 addresses.

IPv6.Source

OID.RemoteIPv6Address

If OID.RemoteIPv6Address is "0::0", this field should be ignored.

 

Sending the NA Message

Upon receiving the NS message, device firmware should perform the validation steps called out in RFC 4861 section 7.1, "Message Validation", including validating checksums. If the incoming NS message passes all validation, then an NA message must be generated and sent as a reply. Its format is specified in RFC 4861 section 4.4, "Neighbor Advertisement Message Format". The miniport should set the fields in the following table.

FieldValueNotes
Ethernet.DestinationEthernet.Source

Copy this value from the NS frame. Adjust as needed for non-Ethernet media types.

Ethernet.Source

The miniport’s current MAC address

IPv6.HopLimit

255

IPv6.SourceIPv6.ICMPv6.TargetAddress

Copy this value from the NS frame.

IPv6.DestinationIPv6.Source

Copy this value from the NS frame, unless the value of IPv6.Source was "0::0". If the value of IPv6.Source was "0::0" set this field to "FF02::1".

IPv6.ICMPv6.Type

136 (NA)

IPv6.ICMPv6.Code

0

IPv6.ICMPv6.RouterFlag

0

IPv6.ICMPv6.SolicitedFlag

0

If the value of IPv6.Source in the NS frame was "0::0", set this field to 1.

IPv6.ICMPv6.OverrideFlag

1

IPv6.ICMPv6.TargetAddressIPv6.ICMPv6.TargetAddress

Copy this value from the NS frame.

IPv6.ICMPv6.TLLAOption.Type

2 (Target Link-layer Address)

IPv6.ICMPv6.TLLAOption.Length

1

IPv6.ICMPv6.TLLAOption.LinkLayerAddressOID.MacAddress

 

 

 

Send comments about this topic to Microsoft

Показ:
© 2014 Microsoft