Partager via


GetFrameDestAddress

The GetFrameDestAddress function retrieves the destination address of a frame.

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

Parameters

  • hFrame
    A handle of the frame to get a pointer to.
  • lpAddress
    A return buffer that stores the frame destination address.
  • AddressType
    A type of address, such as ADDRESS_TYPE_ETHERNET or ADDRESS_TYPE_IP.
  • Flags
    The flags used to modify returned destination 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 specified protocol in the AddressType parameter is invalid for the frame.
BHERR_INVALID_HFRAME The hFrame value is invalid.

Remarks

The ADDRESS_TYPE_FIND_HIGHEST address type 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 in environments where 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.