GetFrameSourceAddress function

The GetFrameSourceAddress function retrieves the source address of a frame.

Syntax

DWORD WINAPI GetFrameSourceAddress(
   HFRAME    hFrame,
   LPADDRESS lpAddress,
   DWORD     AddressType,
   DWORD     Flags
);

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 value

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

Requirement Value
Minimum supported client
Windows 2000 Professional [desktop apps only]
Minimum supported server
Windows 2000 Server [desktop apps only]
Header
Netmon.h
Library
Nmapi.lib
DLL
Nmapi.dll