NAT Editor Functions (Windows Embedded CE 6.0)
1/6/2010
NAT editors should implement editor functions to allow communication with the NAT driver. NAT editors register these editor functions when they call the RegisterEditor function that is supplied by the NAT driver. After the editor calls RegisterEditor, subsequent events cause the NAT driver to call the editor functions, and supply the editor context and other information.
The following table shows the prototypes for NAT editor functions.
Function | Description |
---|---|
Called by the NAT driver when a mapping associated with a registered editor is created. |
|
Called by the NAT driver for each packet received during a session controlled by a NAT editor. This function is optional. |
|
Called by the NAT driver when a mapping associated with an editor is removed. |
The NAT driver provides helper functions that assist editors in packet mapping and translation. Pointers to these functions are returned in the call to the RegisterEditor function.
The following table shows the helper functions provided by the NAT driver.
Function | Description |
---|---|
Creates a port mapping for an inbound session. |
|
Removes a NAT editor port mapping. |
|
Stops an editor from editing data on a specific session. |
|
Removes the registration from an editor. |
|
Replaces one range of bytes in a packet with another range of bytes. |
|
Obtains statistics for a session. |
|
Causes a session to time out. |