1 /* $NetBSD: admin.h,v 1.6 2008/06/18 07:12:04 mgrooms 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 */
51 uint16_t ac_un_version
;
55 #define ac_errno u.ac_un_errno
56 #define ac_version u.ac_un_version
59 * Version field in request is valid.
61 #define ADMIN_FLAG_VERSION 0x8000
64 * No data follows as the data.
65 * These don't use proto field.
67 #define ADMIN_RELOAD_CONF 0x0001
68 #define ADMIN_SHOW_SCHED 0x0002
69 #define ADMIN_SHOW_EVT 0x0003
72 * No data follows as the data.
73 * These use proto field.
75 #define ADMIN_SHOW_SA 0x0101
76 #define ADMIN_FLUSH_SA 0x0102
79 * The admin_com_indexes follows, see below.
81 #define ADMIN_DELETE_SA 0x0201
82 #define ADMIN_ESTABLISH_SA 0x0202
83 #define ADMIN_DELETE_ALL_SA_DST 0x0204 /* All SA for a given peer */
85 #define ADMIN_GET_SA_CERT 0x0206
88 * The admin_com_indexes and admin_com_psk follow, see below.
90 #define ADMIN_ESTABLISH_SA_PSK 0x0203
95 #define ADMIN_LOGOUT_USER 0x0205 /* Delete SA for a given Xauth user */
98 * Range 0x08xx is reserved for privilege separation, see privsep.h
101 /* the value of proto */
102 #define ADMIN_PROTO_ISAKMP 0x01ff
103 #define ADMIN_PROTO_IPSEC 0x02ff
104 #define ADMIN_PROTO_AH 0x0201
105 #define ADMIN_PROTO_ESP 0x0202
106 #define ADMIN_PROTO_INTERNAL 0x0301
108 struct admin_com_indexes
{
113 struct sockaddr_storage src
;
114 struct sockaddr_storage dst
;
117 struct admin_com_psk
{
121 /* Followed by id and key */
124 extern int admin2pfkey_proto
__P((u_int
));
126 #endif /* _ADMIN_H */