57
59
#define INTERNAL_IP6_SUBNET 15
59
61
/* For APPLICATION_VERSION */
60
#define ISAKMP_CFG_RACOON_VERSION "KAME/racoon " \
61
"+ Hybrid auth Patches <manu@netbsd.org>"
62
#define ISAKMP_CFG_RACOON_VERSION "racoon / IPsec-tools"
64
/* For the wins servers -- XXX find the value somewhere ? */
64
68
* Global configuration for ISAKMP mode confiration address allocation
65
* Readen from the mode_cfg section of racoon.conf
69
* Read from the mode_cfg section of racoon.conf
67
71
struct isakmp_cfg_port {
74
78
struct isakmp_cfg_config {
79
struct isakmp_cfg_port *port_pool;
85
char motd[MAXPATHLEN + 1];
81
in_addr_t dns4[MAXNS];
83
in_addr_t nbns4[MAXWINS];
85
struct isakmp_cfg_port *port_pool;
94
/* XXX move this to a unity specific sub-structure */
95
char default_domain[MAXPATHLEN + 1];
96
char motd[MAXPATHLEN + 1];
97
struct unity_netentry *splitnet_list;
106
/* For utmp updating */
107
#define TERMSPEC "vpn%d"
90
109
/* For authsource */
91
110
#define ISAKMP_CFG_AUTH_SYSTEM 0
92
111
#define ISAKMP_CFG_AUTH_RADIUS 1
93
112
#define ISAKMP_CFG_AUTH_PAM 2
113
#define ISAKMP_CFG_AUTH_LDAP 4
115
/* For groupsource */
116
#define ISAKMP_CFG_GROUP_SYSTEM 0
117
#define ISAKMP_CFG_GROUP_LDAP 1
95
119
/* For confsource */
96
120
#define ISAKMP_CFG_CONF_LOCAL 0
97
121
#define ISAKMP_CFG_CONF_RADIUS 1
122
#define ISAKMP_CFG_CONF_LDAP 2
99
124
/* For accounting */
100
125
#define ISAKMP_CFG_ACCT_NONE 0
101
126
#define ISAKMP_CFG_ACCT_RADIUS 1
102
127
#define ISAKMP_CFG_ACCT_PAM 2
128
#define ISAKMP_CFG_ACCT_LDAP 3
129
#define ISAKMP_CFG_ACCT_SYSTEM 4
104
131
/* For pool_size */
105
132
#define ISAKMP_CFG_MAX_CNX 255
119
149
char login[LOGINLEN + 1]; /* login */
120
150
struct in_addr addr4; /* IPv4 address */
121
151
struct in_addr mask4; /* IPv4 netmask */
122
struct in_addr dns4; /* IPv4 DNS (when client only) */
123
struct in_addr wins4; /* IPv4 WINS (when client only) */
152
struct in_addr dns4[MAXNS]; /* IPv4 DNS (when client only) */
153
int dns4_index; /* Number of IPv4 DNS (client only) */
154
struct in_addr wins4[MAXWINS]; /* IPv4 WINS (when client only) */
155
int wins4_index; /* Number of IPv4 WINS (client only) */
156
char default_domain[MAXPATHLEN + 1]; /* Default domain recieved */
157
struct unity_netentry
158
*split_include; /* UNITY_SPLIT_INCLUDE */
159
int include_count; /* Number of SPLIT_INCLUDES */
160
struct unity_netentry
161
*split_local; /* UNITY_LOCAL_LAN */
162
int local_count; /* Number of SPLIT_LOCAL */
124
163
struct xauth_state xauth; /* Xauth state, if revelant */
125
164
struct isakmp_ivm *ivm; /* XXX Use iph1's ivm? */
165
u_int32_t last_msgid; /* Last message-ID */
129
169
#define ISAKMP_CFG_VENDORID_XAUTH 0x01 /* Supports Xauth */
130
170
#define ISAKMP_CFG_VENDORID_UNITY 0x02 /* Cisco Unity compliant */
131
171
#define ISAKMP_CFG_PORT_ALLOCATED 0x04 /* Port allocated */
132
#define ISAKMP_CFG_ADDR4_RADIUS 0x08 /* Address from RADIUS */
133
#define ISAKMP_CFG_MASK4_RADIUS 0x10 /* Netmask from RADIUS */
172
#define ISAKMP_CFG_ADDR4_EXTERN 0x08 /* Address from external config */
173
#define ISAKMP_CFG_MASK4_EXTERN 0x10 /* Netmask from external config */
134
174
#define ISAKMP_CFG_ADDR4_LOCAL 0x20 /* Address from local pool */
135
175
#define ISAKMP_CFG_MASK4_LOCAL 0x40 /* Netmask from local pool */
136
176
#define ISAKMP_CFG_GOT_ADDR4 0x80 /* Client got address */
138
178
#define ISAKMP_CFG_GOT_DNS4 0x200 /* Client got DNS */
139
179
#define ISAKMP_CFG_GOT_WINS4 0x400 /* Client got WINS */
140
180
#define ISAKMP_CFG_DELETE_PH1 0x800 /* phase 1 should be deleted */
181
#define ISAKMP_CFG_GOT_DEFAULT_DOMAIN 0x1000 /* Client got default domain */
182
#define ISAKMP_CFG_GOT_SPLIT_INCLUDE 0x2000 /* Client got a split network config */
183
#define ISAKMP_CFG_GOT_SPLIT_LOCAL 0x4000 /* Client got a split LAN config */
142
185
struct isakmp_pl_attr;
143
186
struct ph1handle;
153
196
struct isakmp_cfg_state *isakmp_cfg_mkstate(void);
154
197
vchar_t *isakmp_cfg_copy(struct ph1handle *, struct isakmp_data *);
155
198
vchar_t *isakmp_cfg_short(struct ph1handle *, struct isakmp_data *, int);
199
vchar_t *isakmp_cfg_varlen(struct ph1handle *, struct isakmp_data *, char *, size_t);
156
200
vchar_t *isakmp_cfg_string(struct ph1handle *, struct isakmp_data *, char *);
157
201
int isakmp_cfg_getconfig(struct ph1handle *);
158
202
int isakmp_cfg_setenv(struct ph1handle *, char ***, int *);
160
int isakmp_cfg_getport(struct ph1handle *);
204
int isakmp_cfg_resize_pool(int);
205
int isakmp_cfg_getport(struct ph1handle *);
161
206
int isakmp_cfg_putport(struct ph1handle *, unsigned int);
207
int isakmp_cfg_init(int);
208
#define ISAKMP_CFG_INIT_COLD 1
209
#define ISAKMP_CFG_INIT_WARM 0
163
211
#ifdef HAVE_LIBRADIUS
164
212
struct rad_handle;