次の方法で共有


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

CreateHandler

Called by the NAT driver when a mapping associated with a registered editor is created.

DataHandler

Called by the NAT driver for each packet received during a session controlled by a NAT editor. This function is optional.

DeleteHandler

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

CreateTicket

Creates a port mapping for an inbound session.

DeleteTicket

Removes a NAT editor port mapping.

DisassociateSession

Stops an editor from editing data on a specific session.

EditorDeregister

Removes the registration from an editor.

EditSession

Replaces one range of bytes in a packet with another range of bytes.

QueryInfoSession

Obtains statistics for a session.

TimeoutSession

Causes a session to time out.

See Also

Concepts

NAT Editor