Re: Re: virtual MACs from NDIS_WAN_LINE_UP/NDIS_WAN_LINE_DOWN

Home Forums Discussions Support virtual MACs from NDIS_WAN_LINE_UP/NDIS_WAN_LINE_DOWN Re: Re: virtual MACs from NDIS_WAN_LINE_UP/NDIS_WAN_LINE_DOWN

#6766
Vadim Smirnov
Keymaster

    WinpkFilter 3.0.4 does not support this feature. Although it was added in the development version and available to WinpkFilter customers. The new added API allows to retrieve the information about currently active WAN connections. Structures for getting this information are defined as the following:

    typedef
    struct _RAS_LINK_INFO
    {
    #define RAS_LINK_BUFFER_LENGTH 1024
    ULONG 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.
    ULONG 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.
    UCHAR RemoteAddress [ETHER_ADDR_LENGTH]; // Represents the address of the remote node on the link in Ethernet-style format. NDISWAN supplies this value.
    UCHAR LocalAddress [ETHER_ADDR_LENGTH]; // Represents the protocol-determined context for indications on this link in Ethernet-style format.
    ULONG ProtocolBufferLength;// Specifies the number of bytes in the buffer at ProtocolBuffer
    UCHAR ProtocolBuffer [RAS_LINK_BUFFER_LENGTH]; // Containing protocol-specific information supplied by a higher-level component that makes connections through NDISWAN
    // to the appropriate protocol(s). Maximum size is 600 bytes (on Windows Vista)
    } RAS_LINK_INFO, *PRAS_LINK_INFO;

    typedef
    struct _RAS_LINKS
    {
    #define RAS_LINKS_MAX 256
    ULONG nNumberOfLinks;
    RAS_LINK_INFO RasLinks[RAS_LINKS_MAX];

    } RAS_LINKS, *PRAS_LINKS;