]> git.saurik.com Git - apple/network_cmds.git/blame - racoon.tproj/isakmp_var.h
network_cmds-245.19.tar.gz
[apple/network_cmds.git] / racoon.tproj / isakmp_var.h
CommitLineData
ac2f15b3 1/* $KAME: isakmp_var.h,v 1.20 2001/12/12 15:29:14 sakane Exp $ */
7ba0088d
A
2
3/*
4 * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
5 * All rights reserved.
6 *
7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions
9 * are met:
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.
18 *
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
29 * SUCH DAMAGE.
30 */
31
2b484d24
A
32#ifndef __ISAKMP_VAR_H__
33#define __ISAKMP_VAR_H__
34
7ba0088d 35#define PORT_ISAKMP 500
ac2f15b3 36#define PORT_ISAKMP_NATT 4500
7ba0088d
A
37
38#define DEFAULT_NONCE_SIZE 16
39
40typedef u_char cookie_t[8];
41typedef u_char msgid_t[4];
42
43typedef struct { /* i_cookie + r_cookie */
44 cookie_t i_ck;
45 cookie_t r_ck;
46} isakmp_index;
47
48struct isakmp_gen;
49struct sched;
50
51struct sockaddr;
52struct ph1handle;
53struct ph2handle;
54struct remoteconf;
55struct isakmp_gen;
56struct ipsecdoi_pl_id; /* XXX */
57struct isakmp_pl_ke; /* XXX */
58struct isakmp_pl_nonce; /* XXX */
59
60extern int isakmp_handler __P((int));
ac2f15b3 61extern int isakmp_natt_handler __P((int));
7ba0088d
A
62extern int isakmp_ph1begin_i __P((struct remoteconf *, struct sockaddr *));
63
64extern vchar_t *isakmp_parsewoh __P((int, struct isakmp_gen *, int));
65extern vchar_t *isakmp_parse __P((vchar_t *));
66
67extern int isakmp_init __P((void));
68extern const char *isakmp_pindex __P((const isakmp_index *, const u_int32_t));
69extern int isakmp_open __P((void));
70extern void isakmp_close __P((void));
2b484d24 71extern void isakmp_close_sockets __P((void));
07f47057 72extern void isakmp_close_unused __P((void));
7ba0088d
A
73extern int isakmp_send __P((struct ph1handle *, vchar_t *));
74
75extern void isakmp_ph1resend_stub __P((void *));
76extern int isakmp_ph1resend __P((struct ph1handle *));
77extern void isakmp_ph2resend_stub __P((void *));
78extern int isakmp_ph2resend __P((struct ph2handle *));
79extern void isakmp_ph1expire_stub __P((void *));
80extern void isakmp_ph1expire __P((struct ph1handle *));
81extern void isakmp_ph1delete_stub __P((void *));
82extern void isakmp_ph1delete __P((struct ph1handle *));
83extern void isakmp_ph2expire_stub __P((void *));
84extern void isakmp_ph2expire __P((struct ph2handle *));
85extern void isakmp_ph2delete_stub __P((void *));
86extern void isakmp_ph2delete __P((struct ph2handle *));
87
88extern int isakmp_post_acquire __P((struct ph2handle *));
89extern int isakmp_post_getspi __P((struct ph2handle *));
90extern void isakmp_chkph1there_stub __P((void *));
91extern void isakmp_chkph1there __P((struct ph2handle *));
92
93extern caddr_t isakmp_set_attr_v __P((caddr_t, int, caddr_t, int));
94extern caddr_t isakmp_set_attr_l __P((caddr_t, int, u_int32_t));
95extern vchar_t *isakmp_add_attr_v __P((vchar_t *, int, caddr_t, int));
96extern vchar_t *isakmp_add_attr_l __P((vchar_t *, int, u_int32_t));
97
98extern int isakmp_newcookie __P((caddr_t, struct sockaddr *, struct sockaddr *));
99
100extern int isakmp_p2ph __P((vchar_t **, struct isakmp_gen *));
101
102extern u_int32_t isakmp_newmsgid2 __P((struct ph1handle *));
103extern caddr_t set_isakmp_header __P((vchar_t *, struct ph1handle *, int));
104extern caddr_t set_isakmp_header2 __P((vchar_t *, struct ph2handle *, int));
105extern caddr_t set_isakmp_payload __P((caddr_t, vchar_t *, int));
106
107#ifdef HAVE_PRINT_ISAKMP_C
108extern void isakmp_printpacket __P((vchar_t *, struct sockaddr *,
109 struct sockaddr *, int));
110#endif
111
112extern int copy_ph1addresses __P(( struct ph1handle *,
113 struct remoteconf *, struct sockaddr *, struct sockaddr *));
114extern void log_ph1established __P((const struct ph1handle *));
2b484d24
A
115
116
117#endif /* __ISAKMP_VAR_H__ */
118