次の方法で共有


NDIS_WAN_LINE_UP (Compact 2013)

3/26/2014

This message is used to indicate a line-up status.

Syntax

typedef struct _NDIS_WAN_LINE_UP {
  ULONG LinkSpeed;
  ULONG MaximumTotalSize;
  NDIS_WAN_QUALITY Quality;
  USHORT SendWindow;
  UCHAR RemoteAddress[6];
  UCHAR LocalAddress[6];
  ULONG ProtocolBufferLength;
  PUCHAR ProtocolBuffer;
  USHORT ProtocolType;
  NDIS_STRING DeviceName;
} NDIS_WAN_LINE_UP, *PNDIS_WAN_LINE_UP;

Parameters

  • LinkSpeed
    Specifies the speed of the link, in units of 100 bps. Zero indicates no change from the speed returned when the protocol called NdisRequest with OID_GEN_LINK_SPEED.
  • MaximumTotalSize
    Specifies the maximum number of bytes per packet that the protocol can send over the network. Zero indicates no change from the value returned when the protocol called NdisRequest with OID_GEN_MAXIMUM_TOTAL_SIZE.
  • Quality
    Reserved.
  • SendWindow
    Specifies the underlying WAN network adapter driver's send window, which is effectively its limit on outstanding send packets it will handle for this link. After submitting this number of packets to MiniportWanSend, NDISWAN will hold incoming sends queued until the driver finishes an outstanding send.
  • RemoteAddress
    Represents the address of the remote node on the link in Ethernet-style format. NDISWAN supplies this value.
  • LocalAddress
    Represents the protocol-determined context for indications on this link in Ethernet-style format. NDISWAN reserves the two high-order bytes for its own use. The protocol should set the remainder to whatever should be the input parameter for this link to its ProtocolReceive and ProtocolStatus functions thereafter.
  • ProtocolBufferLength
    Specifies the number of bytes in the buffer at ProtocolBuffer
  • ProtocolBuffer
    Points to a buffer, allocated by NDISWAN that contains protocol-specific information supplied by a higher-level component that makes connections through NDISWAN to the appropriate protocols. For example, this buffer would contain an IP address if the target protocol is IP or an IPX network number if the target protocol is IPX. NDISWAN frees this buffer when the target protocol returns control from the line-up indication.
  • ProtocolType
    Specifies the assigned ether type of the protocol
  • DeviceName
    Specifies the name of the binding as a counted string in the system-default character set. For Windows Embedded Compact-based drivers, this string contains Unicode characters. This string can be at most 64 characters.

Return Value

None

Remarks

When a WAN miniport calls NdisMIndicateStatus with a line-up indication, NDISWAN forwards the indication to interested protocols, formatted in this structure. At the initial line-up indication for a given link, the protocol should save any necessary state for later communications on the link. This includes possible line-up, line-down, and fragment indications.

Subsequently, the protocol can use the SendWindow value as its upper bound on the number of calls it makes to NdisSend for this link before the protocol regains ownership of at least one of the packets it sent down to the underlying WAN network adapter driver. Some network adapters achieve higher throughput if they have several packets to send at the same time. Other network adapters can become unreliable if their drivers are flooded with send packets. NDISWAN also uses the miniport-set SendWindow value in this manner.

NDISWAN uses Ethernet-style address format to communicate with protocols. The RemoteAddress and LocalAddress parameters are 6-byte addresses and are used as follows:

  • NDISWAN uses RemoteAddress to designate a particular link-protocol context. At the initial line-up indication for a link, the protocol should save the RemoteAddress value supplied by NDISWAN. Subsequently, the protocol passes the RemoteAddress value to NDISWAN in calls to NdisSend for transmissions on this link.
  • The protocol uses LocalAddress to set up context for itself in the low-order 4 bytes (&LocalAddress[2]) when it receives the initial line-up indication for a link being established. Subsequently, NDISWAN passes the LocalAddress value to the protocol at receive and status indications. In effect, NDISWAN uses the given LocalAddress value as the destination for incoming receives and status indications on the link after that.

The DeviceName parameter is used with stacks in which a lower-level protocol has a single binding to NDISWAN but several bindings between it and a higher-level protocol in the stack, for example:

  • To identify the binding (IN) to which a lower protocol should propagate the line-up indication it is given by NDISWAN.
  • In a Plug and Play environment, to report back (OUT) to NDISWAN the name of a newly created binding set up by a lower protocol at a line-up indication.

Requirements

Header

ndis.h

See Also

Reference

NDIS 5.x Legacy Messages
MiniportWanSend
NdisMIndicateStatus
NdisRequest
NdisSend
ProtocolReceive
ProtocolStatus
NDIS 5.x Legacy Reference