GetFrameSourceAddress

The GetFrameSourceAddress function obtains the source address of a frame.

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

Parameters

hFrame
Specifies the handle to the frame to get a pointer to.
lpAddress
The return buffer that will store the frame source address.
AddressType
The type of address you are looking for: ADDRESS_TYPE_ETHERNET, ADDRESS_TYPE_IP, and so on.
Flags
The flags specify ADDRESSTYPE_FLAGS_NORMALIZE, which cancels out the routing and group bits and ADDRESSTYPE_FLAGS_BIT_REVERSE, which is used on token ring to flip the address back to normal after a 3 to 5 bridge has flipped it.

Return Values

If the return value is SUCCESS, the lpAddress is valid.

Error code Meaning
BHERR_SUCCESS No problems were encountered.
BHERR_PROTOCOL_NOT_FOUND The specified protocol in the AddressType is invalid for the frame.
BHERR_INVALID_HFRAME The hFrame is invalid.

Remarks

An address type of ADDRESS_TYPE_FIND_HIGHEST is allowed. If this type is used, the API will attempt to find the IPX, XNS, IP, or VINES IP address before returning the ETHERNET, TOKENRING, or FDDI address. This is useful for protocols and environments where two netcards can be multiplexed under a single server address.