1 /* IPSec VPN client compatible with Cisco equipment.
2 Copyright (C) 2002, 2003, 2004 Geoffrey Keating and Maurice Massar
4 This program is free software; you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by
6 the Free Software Foundation; either version 2 of the License, or
7 (at your option) any later version.
9 This program is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU General Public License for more details.
14 You should have received a copy of the GNU General Public License
15 along with this program; if not, write to the Free Software
16 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
22 #include <sys/socket.h>
29 int my_id
, ike_sa_id
, ipsec_sa_id
;
35 char tun_name
[IFNAMSIZ
];
36 uint8_t i_cookie
[ISAKMP_COOKIE_LENGTH
];
37 uint8_t r_cookie
[ISAKMP_COOKIE_LENGTH
];
38 uint8_t *key
; /* ike encryption key */
43 int auth_algo
, cry_algo
, md_algo
;
45 uint8_t current_iv_msgid
[4];
47 uint8_t our_address
[4], our_netmask
[4];
48 uint32_t tous_esp_spi
, tothem_esp_spi
;
50 size_t kill_packet_size
;
51 uint16_t peer_udpencap_port
;
55 extern struct sa_block oursa
[];
57 extern supported_algo_t supp_dh_group
[];
58 extern supported_algo_t supp_hash
[];
59 extern supported_algo_t supp_crypt
[];
60 extern supported_algo_t supp_auth
[];
62 extern const supported_algo_t
*get_dh_group_ike(void);
63 extern const supported_algo_t
*get_dh_group_ipsec(int server_setting
);