]>
git.saurik.com Git - apple/network_cmds.git/blob - racoon.tproj/remoteconf.h
dcccbe953a650d27345d81344fff7501bd72eaff
1 /* $KAME: remoteconf.h,v 1.26 2001/09/26 05:30:35 sakane Exp $ */
4 * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions
10 * 1. Redistributions of source code must retain the above copyright
11 * notice, this list of conditions and the following disclaimer.
12 * 2. Redistributions in binary form must reproduce the above copyright
13 * notice, this list of conditions and the following disclaimer in the
14 * documentation and/or other materials provided with the distribution.
15 * 3. Neither the name of the project nor the names of its contributors
16 * may be used to endorse or promote products derived from this software
17 * without specific prior written permission.
19 * THIS SOFTWARE IS PROVIDED BY THE PROJECT AND CONTRIBUTORS ``AS IS'' AND
20 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
21 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
22 * ARE DISCLAIMED. IN NO EVENT SHALL THE PROJECT OR CONTRIBUTORS BE LIABLE
23 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
24 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
25 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
26 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
27 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
28 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
32 /* remote configuration */
34 #include <sys/queue.h>
42 struct sockaddr
*remote
; /* remote IP address */
43 /* if family is AF_UNSPEC, that is
44 * for anonymous configuration. */
46 struct etypes
*etypes
; /* exchange type list. the head
47 * is a type to be sent first. */
48 int doitype
; /* doi type */
49 int sittype
; /* situation type */
51 int idvtype
; /* my identifier type */
52 vchar_t
*idv
; /* my identifier */
53 int idvtype_p
; /* peer's identifier type */
54 vchar_t
*idv_p
; /* peer's identifier */
56 int certtype
; /* certificate type if need */
57 char *mycertfile
; /* file name of my certificate */
58 char *myprivfile
; /* file name of my private key file */
59 char *peerscertfile
; /* file name of peer's certifcate */
60 int getcert_method
; /* the way to get peer's certificate */
61 int send_cert
; /* send to CERT or not */
62 int send_cr
; /* send to CR or not */
63 int verify_cert
; /* verify a CERT strictly */
64 int verify_identifier
; /* vefify the peer's identifier */
65 int nonce_size
; /* the number of bytes of nonce */
66 int keepalive
; /* XXX may not use */
67 int passive
; /* never initiate */
68 int support_mip6
; /* support mip6 */
69 int gen_policy
; /* generate policy if no policy found */
70 int ini_contact
; /* initial contact */
71 int pcheck_level
; /* level of propocl checking */
73 int dh_group
; /* use it when only aggressive mode */
74 struct dhgroup
*dhgrp
; /* use it when only aggressive mode */
75 /* avobe two cann't be defined by user*/
77 int retry_counter
; /* times to retry. */
78 int retry_interval
; /* interval each retry. */
79 /* above 2 values are copied from localconf. */
81 struct isakmpsa
*proposal
; /* proposal list */
82 LIST_ENTRY(remoteconf
) chain
; /* next remote conf */
87 /* ISAKMP SA specification */
101 int dh_group
; /* don't use it if aggressive mode */
102 struct dhgroup
*dhgrp
; /* don't use it if aggressive mode */
104 struct isakmpsa
*next
; /* next transform */
105 struct remoteconf
*rmconf
; /* backpointer to remoteconf */
108 struct remoteconf
*getrmconf
__P((struct sockaddr
*));
109 extern struct remoteconf
*newrmconf
__P((void));
110 extern void delrmconf
__P((struct remoteconf
*));
111 extern void delisakmpsa
__P((struct isakmpsa
*));
112 extern void deletypes
__P((struct etypes
*));
113 extern void insrmconf
__P((struct remoteconf
*));
114 extern void remrmconf
__P((struct remoteconf
*));
115 extern void flushrmconf
__P((void));
116 extern void initrmconf
__P((void));
117 extern struct etypes
*check_etypeok
118 __P((struct remoteconf
*, u_int8_t
));
120 extern struct isakmpsa
*newisakmpsa
__P((void));
121 extern void insisakmpsa
__P((struct isakmpsa
*, struct remoteconf
*));
122 extern const char *rm2str
__P((const struct remoteconf
*));