NDIS_WAN_LINE_UP

typedef struct _NDIS_WAN_LINE_UP {

IN ULONG LinkSpeed;

IN ULONG MaximumTotalSize;

IN NDIS_WAN_QUALITY Quality;

IN USHORT SendWindow;

IN UCHAR RemoteAddress[6];

IN OUT UCHAR LocalAddress[6];

IN ULONG ProtocolBufferLength;

IN PUCHAR ProtocolBuffer;

IN USHORT ProtocolType;

IN OUT NDIS_STRING DeviceName;

} NDIS_WAN_LINE_UP, *PNDIS_WAN_LINE_UP;

NDIS_WAN_LINE_UP contains information associated with a line-up indication.

Members

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

Specifies the quality of service (QOS) of the new line.

SendWindow

Specifies the underlying WAN NIC driver's send window, 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 completes 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, containing protocol-specific information supplied by a higher-level component that makes connections through NDISWAN to the appropriate protocol(s). 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 NT drivers, this string contains Unicode characters. This string can be at most 64 characters.

Comments

When a WAN miniport calls NdisMIndicateStatus with a line-up indication, NDISWAN forwards the indication to interested protocol(s), formatted in this structure. At the initial line-up indication for a given link, the protocol should save any necessary state for subsequent communications on the link, including 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 NIC driver. Some NICs achieve higher throughput if they have several packets to send at once. Others could 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, so the pair of XxxAddress members of this structure are six-byte addresses, used as follows:

·NDISWAN uses the RemoteAddress to designate a particular link-protocol context. At the initial line-up indication for a link, the protocol should save the RemoteAddress 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 four bytes (&LocalAddress[2]) when it receives the initial line-up indication for a link being established. Subsequently, NDISWAN passes the LocalAddress to the protocol at receive and status indications. In effect, NDISWAN uses the given LocalAddress as the destination for incoming receives and status indications on the link thereafter.

The DeviceName member 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, and this member might be used to support future PnP scenarios. That is, DeviceName would be used for either of the following:

·To identify the binding (IN) to which a lower protocol should propagate the line-up indication it is given by NDISWAN

·In a PnP 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

For more information about the OID_XXX codes passed in calls to NdisRequest, see Chapter 5.

See Also

MiniportQueryInformation, MiniportSetInformation, NDIS_MAC_LINE_UP, NdisMIndicateStatus, NdisRequest, NDIS_WAN_FRAGMENT, NDIS_WAN_LINE_DOWN, ProtocolStatus