]>
git.saurik.com Git - apple/ipsec.git/blob - ipsec-tools/racoon/admin.h
1 /* $NetBSD: admin.h,v 1.4 2006/09/09 16:22:09 manu Exp $ */
3 /* Id: admin.h,v 1.11 2005/06/19 22:37:47 manubsd Exp */
6 * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
9 * Redistribution and use in source and binary forms, with or without
10 * modification, are permitted provided that the following conditions
12 * 1. Redistributions of source code must retain the above copyright
13 * notice, this list of conditions and the following disclaimer.
14 * 2. Redistributions in binary form must reproduce the above copyright
15 * notice, this list of conditions and the following disclaimer in the
16 * documentation and/or other materials provided with the distribution.
17 * 3. Neither the name of the project nor the names of its contributors
18 * may be used to endorse or promote products derived from this software
19 * without specific prior written permission.
21 * THIS SOFTWARE IS PROVIDED BY THE PROJECT AND CONTRIBUTORS ``AS IS'' AND
22 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
23 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
24 * ARE DISCLAIMED. IN NO EVENT SHALL THE PROJECT OR CONTRIBUTORS BE LIABLE
25 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
26 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
27 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
28 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
29 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
30 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
37 #define ADMINSOCK_PATH ADMINPORTDIR "/racoon.sock"
39 extern char *adminsock_path
;
40 extern uid_t adminsock_owner
;
41 extern gid_t adminsock_group
;
42 extern mode_t adminsock_mode
;
44 /* command for administration. */
45 /* NOTE: host byte order. */
47 u_int16_t ac_len
; /* total packet length including data */
54 * No data follows as the data.
55 * These don't use proto field.
57 #define ADMIN_RELOAD_CONF 0x0001
58 #define ADMIN_SHOW_SCHED 0x0002
59 #define ADMIN_SHOW_EVT 0x0003
62 * No data follows as the data.
63 * These use proto field.
65 #define ADMIN_SHOW_SA 0x0101
66 #define ADMIN_FLUSH_SA 0x0102
69 * The admin_com_indexes follows, see below.
71 #define ADMIN_DELETE_SA 0x0201
72 #define ADMIN_ESTABLISH_SA 0x0202
73 #define ADMIN_DELETE_ALL_SA_DST 0x0204 /* All SA for a given peer */
76 * The admin_com_indexes and admin_com_psk follow, see below.
78 #define ADMIN_ESTABLISH_SA_PSK 0x0203
83 #define ADMIN_LOGOUT_USER 0x0205 /* Delete SA for a given Xauth user */
86 #define ADMIN_ESTABLISH_SA_VPNCONTROL 0x0206
89 * Range 0x08xx is reserved for privilege separation, see privsep.h
92 /* the value of proto */
93 #define ADMIN_PROTO_ISAKMP 0x01ff
94 #define ADMIN_PROTO_IPSEC 0x02ff
95 #define ADMIN_PROTO_AH 0x0201
96 #define ADMIN_PROTO_ESP 0x0202
97 #define ADMIN_PROTO_INTERNAL 0x0301
99 struct admin_com_indexes
{
104 struct sockaddr_storage src
;
105 struct sockaddr_storage dst
;
108 struct admin_com_psk
{
112 /* Followed by id and key */
115 extern int admin2pfkey_proto
__P((u_int
));
117 #endif /* _ADMIN_H */