NAT Editor Initialization and Registration (Windows Embedded CE 6.0)
1/6/2010
When the NAT driver loads during system initialization, it examines the value of the HKEY_LOCAL_MACHINE\Comm\IPNat\EditorList registry key, which is a MULTI_SZ value that contains a list of editor dynamic-link libraries (DLLs). Each DLL in this list is loaded, and the EditorInitialize function exported by the DLL is called. The editor should call the RegisterEditor function provided by the NAT driver to register the editor. When registering, the editor must specify the port and network that the editor should monitor in the IP_NAT_REGISTER_EDITOR structure that the editor passes to RegisterEditor. All traffic routed on the specified network, to or from the specified port on the gateway device that performs NAT, is passed through the data handler functions specified in IP_NAT_REGISTER_EDITOR.
When a NAT editor registers, the editor can specify an editor context to the NAT driver. This editor context is a pointer that allows the editor to pass information, such as the direction of traffic or pointers to helper functions, that the editor obtains during registration to the data handler functions. For more information about these functions, see Packet Data Handling and Editing.
A NAT editor can use another context, the editor session context, to pass information from the CreateHandler function to the data handler functions.