/*****************************************************************************
* Copyright (c) 2005 Digi International Inc., All Rights Reserved
*
* This software contains proprietary and confidential information of Digi
* International Inc.  By accepting transfer of this copy, Recipient agrees
* to retain this software in confidence, to prevent disclosure to others,
* and to make no use of this software other than that for which it was
* delivered.  This is an unpublished copyrighted work of Digi International
* Inc.  Except as permitted by federal law, 17 USC 117, copying is strictly
* prohibited.
*
* Restricted Rights Legend
*
* Use, duplication, or disclosure by the Government is subject to
* restrictions set forth in sub-paragraph (c)(1)(ii) of The Rights in
* Technical Data and Computer Software clause at DFARS 252.227-7031 or
* subparagraphs (c)(1) and (2) of the Commercial Computer Software -
* Restricted Rights at 48 CFR 52.227-19, as applicable.
*
* Digi International Inc. 11001 Bren Road East, Minnetonka, MN 55343
*
*****************************************************************************/

#ifndef vpn_h

#define vpn_h


#include "ipsec/naipsec.h"

/*
 * The test program is going to create a VPN tunnel between a local network and
 * a remote network.  You determine the local and remote networks by setting
 * REMOTE_IP_SUBNET, REMOTE_IP_SUBNET_MASK, LOCAL_IP_SUBNET, LOCAL_IP_SUBNET_MASK.
 *
 * Set REMOTE_IP_SUBNET to the address of the network at the remote side of the
 * VPN tunnel.
 */
#define REMOTE_IP_SUBNET        "192.168.1.0"

/*
 * Set this to the subnet used on the remote network.
 */
#define REMOTE_IP_SUBNET_MASK   "255.255.255.0"

/*
 * Set this to the address of the network on the local side of the tunnel.
 */
#define LOCAL_IP_SUBNET         "192.168.3.0"

/*
 * This is the address of the unit on the local VPN subnet.  It is used to
 * communicate with devices on the local subnet.  Devices on the local
 * subnet use this address as their gateway.
 */
#define OUR_ADDRESS_ON_LOCAL_SUBNET "192.168.3.1"


/*
 * Set this to the subnet mask of the local network.
 */
#define LOCAL_IP_SUBNET_MASK    "255.255.255.0"

/*
 * Set REMOTE_VPN_PEER_ADDRESS to the address of the remote VPN gateway
 * at the far end of the VPN tunnel.  This will be VPN peer that IPSEC
 * will communicate with to establish the tunnel
 */
#define REMOTE_VPN_PEER_ADDRESS     "192.168.2.1"

/*
 * Set LOCAL_VPN_ADDRESS to the address of the local VPN peer.  This is
 * the address bound to the network interface used to communicate with
 * the remote VPN peer. If you are using a single network interface the
 * the 2nd multi-home address is set to LOCAL_VPN_ADDRESS, eth0:0 for
 * Ethernet or wln0:0 for wireless.
 *
 * If you are using two network interfaces, IP address of 2nd interface could be
 * set to LOCAL_VPN_ADDRESS instead of eth0:0 address, but this example uses
 * eth0:0 instead.
 */
#define LOCAL_VPN_ADDRESS           "192.168.2.2"

/*
 * Subnet mask of VPN tunnel.
 */
#define VPN_SUBNET_MASK             "255.255.255.0"

/*
 * Set ENCRYPTION_ALGORITHM to the encryption algorithm to be
 * used to protect data from eavesdroppers.  A list of algorithms is
 * contained in naipsec.h.
 */
#define ENCRYPTION_ALGORITHM         NA_IPSEC_ENCRYPTION_DES


/*
 * Set ENCRYPTION_KEY to the encryption key to be used.  Both VPN
 * peers must be configured to use the same key.
 */
#define ENCRYPTION_KEY              "01234567"


/*
 * Set AUTHENTICATION_ALGORITHM to the authentication algorithm
 * to be used.  A list of algorithms can be found in naipsec.h.
 */
#define AUTHENTICATION_ALGORITHM     NA_IPSEC_AUTHENTICATION_MD5

/*
 * Set AUTHENTICATION_KEY to the authentication key to be used.  Both
 * VPN peers must be configured to use the same key.
 */
#define AUTHENTICATION_KEY          "0123456789012345"

/*
 * Set LIFETIME_SECONDS to the maximum lifetime of the
 * SA in seconds.  This value is irrelevant if SAS_ARE_PERMANENT
 * is TRUE.
 */
#define LIFETIME_SECONDS             (86400)

/*
 * Set LIFETIME_KILOBYTES to the maximum amount of data that may be
 * transfered over the SA.  This value is irrelevant if
 * SAS_ARE_PERMANENT is TRUE.
 */
#define LIFETIME_KILOBYTES           (32768)


/*
 * Set SAS_ARE_PERMANENT to TRUE if the SAs should never expire.  Set it to
 * FALSE if the SA should expire and be deleted when it has exceeded its
 * LIFETIME_SECONDS and/or LIFETIME_KILOBYTES.
 */
#define SAS_ARE_PERMANENT           TRUE


/*
 * Set INBOUND_SPI to the Security Parameter Index (SPI) used for the
 * inbound direction.  Note that inbound and outbound are inverted on
 * the remote VPN peer.
 */
#define INBOUND_SPI         (1001)

/*
 * Set OUTBOUND_SPI to the SPI used for the outbound direction.
 */
#define OUTBOUND_SPI        (1000)


void createVpn(void);




#endif


