IPSec Samples (Compact 7)


Windows Embedded Compact includes ipsecfg, a sample configuration tool for IPSec. Ipseccfg is located in the %_WINCEROOT%\common\oak\drivers\netsamp\ipseccfg directory.

You can use this sample to create a customized configuration tool and user interface.

The IPSec APIs will be deprecated in the next release of Windows Embedded Compact. Replace them with the WFP IPSec APIs. For more information, see Windows Filtering Platform.

The syntax for the IPSec utility is as follows:

         [loadpolicyFile] [unloadpolicyName]startonlystartsetresetstoploglevellogmethod

load policyFile

Loads the IPSec policy from file policyFile into registry.

unload policyName

Removes the entries for policyName from the registry.


Starts IPSec with no policy set.


Starts IPSec and sets a policy by reading the policy information for policyName that is stored in the registry.


Sets a policy by reading that policy information that is stored for policyName in the registry. IPSec should already be started when this command is run.


Resets the policy according to the source Internet Protocol (IP) address that is specified. For the me option, the source IP address = 0, for the myip option, the source IP address is the first IP address that is returned from a call to gethostbyname (localhost).


Stops IPSec. If IPSec is shut down, all policies that were set before will be reset.


Sets the IPSec logging level


Sets the IPSec logging method