NDIS_WAN_INFO (Compact 2013)

3/26/2014

The NDIS_WAN_INFO structure formats information for OID_WAN_GET_INFO. This object identifier requests the miniport driver to return information about its own capabilities or those of the network adapter.

The following syntax defines the NDIS_WAN_INFO structure.

Syntax

typedef struct _NDIS_WAN_INFO {
  ULONG MaxFrameSize; 
  ULONG MaxTransmit; 
  ULONG HeaderPadding; 
  ULONG TailPadding; 
  ULONG Endpoints; 
  UINT MemoryFlags; 
  NDIS_PHYSICAL_ADDRESS HighestAcceptableAddress; 
  ULONG FramingBits; 
  ULONG DesiredACCM; 
} NDIS_WAN_INFO, *PNDIS_WAN_INFO; 

Members

  • MaxFrameSize
    [out] Specifies the maximum frame size for any net packet that the network adapter driver can send and receive. This value should exclude the driver's own framing overhead and the PPP HDLC overhead. Typically, this value is around 1500.

    Note

    All WAN miniport drivers should use a MaxFrameSize that is 32 bytes larger than the value returned for this object identifier. For example, a WAN miniport driver that returns 1500 for this object identifier should internally accept and send up to 1532.

  • MaxTransmit
    [out] Specifies the maximum number of outstanding frames that a link on the WAN miniport driver can handle. This member must be set to at least one.

    The WAN protocol driver uses the value of this member as a default throttle on how many send requests it submits to the driver's MiniportWanSend function before the WAN protocol driver holds incoming sends. These sends are queued until the miniport driver finishes an outstanding send. A miniport driver can adjust this value dynamically and on a per-link basis by using the SendWindow member in the NDIS_MAC_LINE_UP structure that the driver passes to NdisMIndicateStatus. The WAN protocol driver uses the current line-up SendWindow value as its throttle on outstanding sends. If the miniport driver sets SendWindow to zero for the initial line-up indication, the WAN protocol driver uses the driver-set MaxTransmit value.

    Because a WAN network adapter miniport driver must queue packets internally, the value of MaxTransmit is theoretically max**(ULONG)**. However, this driver-determined value should reflect the link speed or hardware capabilities of the network adapter. For example, if its network adapter always has room for at least four frames, a miniport driver sets MaxTransmit to four so that any incoming packet to MiniportWanSend can be placed on the hardware immediately.

  • HeaderPadding
    [out] Specifies buffer space, in bytes, required at the beginning of each net packet, considering the current defaults, such as a MaxFrameSize of 1500.

    For example, if its network adapter requires exactly a flag byte in front of the frame, the miniport driver would set this member to one.

  • TailPadding
    [out] Specifies buffer space, in bytes, required at the end of each net packet, considering the current defaults, such as a MaxFrameSize of 1500.

    For example, if its network adapter requires three bytes at the end of each net packet for the Frame Checksum Sequence (CRC check) and the flag byte, a miniport driver would set this member to three.

  • Endpoints
    [out] Specifies the maximum number of links (also known as ports, or point-to-point connections) that the network adapter can support at any time.

    For example, a miniport driver would set this member to two for an ISDN card with two channels. It would set this member to ten for an X.25 card that can accept up to ten virtual circuits.

  • MemoryFlags
    [out] If the network adapter is not a DMA device, set this member to zero.

    Otherwise, set this to the kind of memory to be allocated for the network adapter, that is, NDIS_MEMORY_NONCACHED or NDIS_MEMORY_CONTIGUOUS. Subsequently, memory of the specified type will be allocated for all packets to be transmitted by the WAN adapter.

    Be aware that these flags should be used with caution because they force the WAN protocol driver to allocate memory resources statically during miniport initialization.

  • HighestAcceptableAddress
    [out] If the network adapter is not a DMA device, set this member with the macro NDIS_PHYSICAL_ADDRESS_CONST(-1,-1).

    Otherwise, if the network adapter can use 24-bit addresses, set this value to NDIS_PHYSICAL_ADDRESS_CONST (0x1000000, 0). Subsequently, memory within the specified range will be allocated for all packets to be transmitted by the network adapter. Therefore, memory can sent directly to the network adapter through DMA instead of having to be double-buffered through a CPU-memory copy.

  • FramingBits
    [out] Set any bits (ORed) supported by the driver. The following table shows the settings for framing bits.

    Framing Bit Setting

    Description

    RAS_FRAMING

    Set only if the driver can detect older RAS framing. Only legacy drivers that supported earlier RAS framing set this flag.

    RAS_COMPRESSION

    Set only if the driver supports the older RAS compression scheme.

    PPP_FRAMING

    Should always be set. Indicates the driver can detect and support PPP framing for its medium type.

    PPP_COMPRESS_ADDRESS_CONTROL

    Set if the driver supports PPP address and control-field compression. The WAN protocol driver will remove the address and control field if this LCP option is negotiated. Some WAN medium types, such as X.25, do not support this option.

    PPP_COMPRESS_PROTOCOL_FIELD

    Set if the driver supports PPP protocol field compression. The WAN protocol driver will remove one byte from the protocol field when applicable if this LCP option is negotiated.

    PPP_ACCM_SUPPORTED

    Set if the driver supports Asynchronous Control Character Mapping. This bit is only valid for asynchronous media, such as modems. If this bit is set, the DesiredACCM member should be valid.

    PPP_MULTILINK_FRAMING

    Set if the driver supports multilink framing as specified in IETF RFC 1717.

    PPP_SHORT_SEQUENCE_HDR_FORMAT

    Set if the driver supports header format for multilink framing as specified in IETF RFC 1717.

    SLIP_FRAMING

    Set if the driver can detect and support SLIP framing (asynchronous drivers only).

    SLIP_VJ_COMPRESSION

    Set if the driver can support Van Jacobsen TCP/IP header compression for SLIP. The WAN protocol driver supports SLIP_VJ_COMPRESSION (with 16 slots). Asynchronous media (serial drivers) that support SLIP framing should set this bit. Asynchronous media does not have to write any code to support VJ header compression. The WAN protocol driver will resolve it.

    SLIP_VJ_AUTODETECT

    Set if the driver can auto-detect Van Jacobsen TCP/IP header compression for SLIP. The WAN protocol driver will auto-detect VJ header compression. Asynchronous media (serial drivers) should set this bit if they support SLIP framing.

    TAPI_PROVIDER

    Set if the driver supports the TAPI Service Provider object identifiers. Unless this bit is set, TAPI object identifier calls will not be made to the driver.

    MEDIA_NRZ_ENCODING

    Set if the driver supports NRZ encoding, the PPP default for some media types such as ISDN. Reserved.

    MEDIA_NRZI_ENCODING

    Set if the driver supports NRZI encoding. Reserved.

    MEDIA_NLPID

    Set if the driver has and can set the NLPID in its frame. Reserved.

    RFC_1356_FRAMING

    Set if the driver supports IETF RFC 1356 X.25 and ISDN framing. Reserved.

    RFC_1483_FRAMING

    Set if the driver supports IETF RFC 1483 ATM adaptation layer-5 encapsulation. Reserved.

    RFC_1490_FRAMING

    Set if the driver supports IETF RFC 1490 Frame Relay framing. Reserved.

    NBF_PRESERVE_MAC_ADDRESS

    Set if the driver supports IETF framing as specified in the draft The PPP NETBIOS Frames Control Protocol (NBFCP).

    SHIVA_FRAMING

    Superseded by NBF_PRESERVE_MAC_ADDRESS.

    PASS_THROUGH_MODE

    Set if the driver does its own framing. If this flag is set, The WAN protocol driver passes frames, uninterpreted and unmodified.

  • DesiredACCM
    [out] The Asynchronous Control Character Map is negotiated. This member is relevant only for asynchronous media types.

Remarks

Network adapter drivers must be in the default PPP framing mode until each driver receives an NDIS_WAN_SET_LINK_INFO call. The network adapter driver must auto-detect any framing that it claims to support.

If a driver detects a framing scheme other than the default, that driver should automatically switch its framing into the newly detected framing.

A subsequent query with OID_WAN_GET_LINK_INFO should indicate the detected framing. If no framing is yet detected, the FramingBits member should be zero in the returned NDIS_WAN_GET_LINK_INFO information.

If the WAN miniport driver is called subsequently with OID_WAN_SET_LINK_INFO in which the FramingBits member is zero, the driver should try to auto-detect the framing upon reception of each frame.

Requirements

Header

ndis.h

See Also

Reference

NDIS 5.x Legacy Structures
NDIS_MAC_LINE_UP
NdisMIndicateStatus
NDIS_WAN_GET_LINK_INFO
NDIS_WAN_SET_LINK_INFO
OID_WAN_GET_INFO
OID_WAN_GET_LINK_INFO
OID_WAN_SET_LINK_INFO
NDIS 5.x Legacy Reference