Compartilhar via


OID_WAN_GET_INFO

The OID_WAN_GET_INFO OID requests the miniport driver to return information about its or the NIC's capabilities, formatted as an NDIS_WAN_INFO structure, defined as follows:

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

The members of this structure contain the following information:

  • MaxFrameSize
    Specifies the maximum frame size for any net packet that the NIC driver can send and receive. This value should exclude the driver's own framing overhead and/or the PPP HDLC overhead. Typically this value is around 1500.

    However, all WAN miniport drivers should use an internal MaxFrameSize that is 32 bytes larger than the value they return for this OID. For example, a WAN miniport driver that returns 1500 for this OID should internally accept and send up to 1532. Such a miniport driver can readily support future bridging and additional protocols.

  • MaxTransmit
    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.

    NDISWAN uses the value of this member as a default throttle on how many send requests it submits to the driver's MiniportWanSend function before NDISWAN holds incoming sends. These sends are queued until the miniport driver completes an outstanding send. A miniport driver can adjust this value dynamically and on a per-link basis using the SendWindow member in the NDIS_MAC_LINE_UP structure that the driver passes to NdisMIndicateStatus. NDISWAN 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, NDISWAN uses the driver-set MaxTransmit value.

    Because a WAN 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 NIC. For example, if its NIC 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
    Specifies the amount of 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 NIC requires just a flag byte preceding the frame, the miniport driver would set this member to one.

  • TailPadding
    Specifies the amount of 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 NIC 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
    Specifies the maximum number of links (sometimes called ports, or point-to-point connections) that the NIC can support at any given 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
    If the NIC is not a DMA device, set this member to zero.

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

    Note that these flags should be used with caution because they force NDISWAN to allocate memory resources statically during miniport driver initialization.

  • HighestAcceptableAddress
    If the NIC is not a DMA device, set this member with the macro NDIS_PHYSICAL_ADDRESS_CONST(-1,-1).

    Otherwise, if the NIC 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 NIC. Thus, memory can just be DMAed directly to the NIC instead of having to be double-buffered through a CPU-memory copy.

  • FramingBits
    Set any bits (ORed) supported by the driver among the following:

    • 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.

      NDISWAN 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.

      NDISWAN 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. NDISWAN supports SLIP_VJ_COMPRESSION (with 16 slots). Asynchronous media (serial drivers) that support SLIP framing should set this bit.

      Asynchronous media need not write any code to support VJ header compression. NDISWAN will take care of it.

    • SLIP_VJ_AUTODETECT
      Set if the driver can auto-detect Van Jacobsen TCP/IP header compression for SLIP. NDISWAN 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 OIDs. Unless this bit is set, TAPI OID 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. This value is reserved for future use.

    • MEDIA_NRZI_ENCODING
      Set if the driver supports NRZI encoding. This value is reserved for future use.

    • MEDIA_NLPID
      Set if the driver has and can set the NLPID in its frame. This value is reserved for future use.

    • RFC_1356_FRAMING
      Set if the driver supports IETF RFC 1356 X.25 and ISDN framing. This value is reserved for future use.

    • RFC_1483_FRAMING
      Set if the driver supports IETF RFC 1483 ATM adaptation layer-5 encapsulation. This value is reserved for future use.

    • RFC_1490_FRAMING
      Set if the driver supports IETF RFC 1490 Frame Relay framing. This value is reserved for future use.

    • 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, NDISWAN passes frames, uninterpreted and unmodified.

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

    For example, drivers that support old RAS framing must auto-detect RAS framing from PPP framing. 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 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 attempt to auto-detect the framing upon reception of each frame.

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

 

 

Send comments about this topic to Microsoft