Partager via


Packet Data Handling and Editing (Windows Embedded CE 6.0)

1/6/2010

Once an editor registers for a specific port and direction, the NAT driver calls the data handler functions that the editor specified in the IP_NAT_REGISTER_EDITOR structure during registration for packets routed through that port.

A DataHandler function receives the contents of the packet in an IPRcvBuf structure, and an offset value that indicates the position of the buffer at the time that packet data begins. A DataHandler function also receives an interface handle, a session handle, a data handle, an editor context, and an editor session context.

A DataHandler function parses information in the packet, and makes any appropriate changes. When a DataHandler function examines and changes a packet, the function should never directly change the IPRcvBuf structure. The function should make changes to the packet by calling the EditSession function that RegisterEditor returns instead.

See Also

Concepts

NAT Editor