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
);
Note This data is probably somewhere in the middle of the frame, because a previous parser claimed data before your parser was called.
MacType | Meaning |
---|---|
MAC_TYPE_ETHERNET | 802.3 |
MAC_TYPE_TOKENRING | 802.5 |
MAC_TYPE_FDDI | ANSI X3T9.5 |
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.
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.