Поделиться через


GetFrameSourceAddress

The GetFrameSourceAddress function retrieves the source address of a frame.

DWORD WINAPIGetFrameSourceAddress(HFRAMEhFrame,
LPADDRESSlpAddress,
DWORDAddressType,
DWORDFlags);

Parameters

  • hFrame
    A handle to the frame for which to get a pointer to.
  • lpAddress
    A return buffer that stores the frame source address.
  • AddressType
    The type of address searched for, such as ADDRESS_TYPE_ETHERNET or ADDRESS_TYPE_IP.
  • Flags
    The flags used to modify returned source address data.
    Value Meaning
    ADDRESSTYPE_FLAGS_NORMALIZE Cancels the routing and group BITs.
    ADDRESSTYPE_FLAGS_BIT_REVERSE Converts token ring network addresses back to normal.

Return Values

If the function is successful, the lpAddress value is valid, and the return value is BHERR_SUCCESS.

If the function is unsuccessful, the return value is an error code.

Return code Description
BHERR_PROTOCOL_NOT_FOUND The protocol specified by the AddressType parameter is invalid for the frame.
BHERR_INVALID_HFRAME The hFrame parameter value is invalid.

Remarks

An address type of ADDRESS_TYPE_FIND_HIGHEST is allowed. When this address type is used, the function searches for the IPX, XNS, IP, or VINES IP address before returning the ETHERNET, TOKENRING, or FDDI address. This approach is useful for protocols and environments in which two NICs can be multiplexed under a single server address.

Requirements

Client Requires Windows XP, Windows 2000 Professional, or Windows NT Workstation 4.0.
Server Requires Windows Server 2003, Windows 2000 Server, or Windows NT Server 4.0.
Header

Declared in Netmon.h.

Library

Link to Nmapi.lib.

DLL Requires Nmapi.dll.