AttachProperties

The AttachProperties entry point is called to request that the parser attach any properties that it finds in the frame to the frame.

DWORD AttachProperties(
  HFRAME hFrame,                
  LPBYTE lpFrame,               
  LPBYTE lpProtocol,            
  DWORD MacType,                
  DWORD BytesLeft,              
  HPROTOCOL hPreviousProtocol,  
  DWORD nPreviousProtocolOffset,  
  DWORD lpInstData              
);
 

Parameters

hFrame
Specifies the handle to the frame being recognized.
lpFrame
Specifies the pointer to the first byte of the whole frame.
lpProtocol
Specifies the pointer to the current unclaimed portion of the frame.

Note This data is probably somewhere in the middle of the frame, because a previous parser claimed data before your parser was called.

MacType
Specifies a value as follows:
MacType Meaning
MAC_TYPE_ETHERNET 802.3
MAC_TYPE_TOKENRING 802.5
MAC_TYPE_FDDI ANSI X3T9.5

BytesLeft
Specifies the number of bytes left to process in the frame.
hPreviousProtocol
Specifies the handle of the previous protocol.
nPreviousProtocolOffset
Specifies the offset of the previous protocol.
lpInstData
Instance data from the previous protocol.

Return Values

The return value is a pointer to the next place in the frame. If the parser recognizes the frame, then it should return a pointer to the first byte beyond its recognized data. If the parser does not recognize the frame, it should return the lpProtocol as passed in. If the parser wants to claim all of the remaining data, the parser should return NULL.

Remarks

The AttachProperties entry point is called to request that the parser attach properties to the frame. To add entries, the parser will call the helper function AttachPropertyInstance.