4 * @brief Definition of stroke_msg_t.
9 * Copyright (C) 2006 Martin Willi
10 * Hochschule fuer Technik Rapperswil
12 * This program is free software; you can redistribute it and/or modify it
13 * under the terms of the GNU General Public License as published by the
14 * Free Software Foundation; either version 2 of the License, or (at your
15 * option) any later version. See <http://www.fsf.org/copyleft/gpl.txt>.
17 * This program is distributed in the hope that it will be useful, but
18 * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
19 * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
26 #include <sys/types.h>
29 * Socket which is used to communicate between charon and stroke
31 #define STROKE_SOCKET IPSEC_PIDDIR "/charon.ctl"
33 #define STROKE_BUF_LEN 2048
35 typedef enum list_flag_t list_flag_t
;
38 * Definition of the LIST flags, used for
39 * the various stroke list* commands.
42 /** don't list anything */
44 /** list all raw public keys */
45 LIST_PUBKEYS
= 0x0001,
46 /** list all host/user certs */
48 /** list all ca certs */
49 LIST_CACERTS
= 0x0004,
50 /** list all ocsp signer certs */
51 LIST_OCSPCERTS
= 0x0008,
52 /** list all aa certs */
53 LIST_AACERTS
= 0x0010,
54 /** list all attribute certs */
56 /** list all access control groups */
58 /** list all ca information records */
59 LIST_CAINFOS
= 0x0080,
62 /** list all ocsp cache entries */
64 /** list all supported algorithms */
66 /** all list options */
70 typedef enum reread_flag_t reread_flag_t
;
73 * Definition of the REREAD flags, used for
74 * the various stroke reread* commands.
77 /** don't reread anything */
79 /** reread all secret keys */
80 REREAD_SECRETS
= 0x0001,
81 /** reread all ca certs */
82 REREAD_CACERTS
= 0x0002,
83 /** reread all ocsp signer certs */
84 REREAD_OCSPCERTS
= 0x0004,
85 /** reread all aa certs */
86 REREAD_AACERTS
= 0x0008,
87 /** reread all attribute certs */
88 REREAD_ACERTS
= 0x0010,
89 /** reread all crls */
91 /** all reread options */
95 typedef enum purge_flag_t purge_flag_t
;
98 * Definition of the PURGE flags, currently used for
99 * the stroke purgeocsp command.
102 /** don't purge anything */
104 /** purge ocsp cache entries */
106 /** purge IKE_SAs without a CHILD_SA */
111 * CRL certificate validation policy
120 typedef struct stroke_end_t stroke_end_t
;
123 * definition of a peer in a stroke message
125 struct stroke_end_t
{
148 typedef struct stroke_msg_t stroke_msg_t
;
151 * @brief A stroke message sent over the unix socket.
153 struct stroke_msg_t
{
154 /* length of this message with all strings */
157 /* type of the message */
159 /* initiate a connection */
161 /* install SPD entries for a policy */
163 /* uninstall SPD entries for a policy */
165 /* add a connection */
167 /* delete a connection */
169 /* terminate connection */
171 /* terminate connection by peers srcip/virtual ip */
173 /* show connection status */
175 /* show verbose connection status */
177 /* add a ca information record */
179 /* delete ca information record */
181 /* set a log type to log/not log */
183 /* configure global options for stroke */
185 /* list various objects */
187 /* reread various objects */
189 /* purge various objects */
191 /* show pool leases */
196 /* verbosity of output returned from charon (-from -1=silent to 4=private)*/
197 int output_verbosity
;
200 /* data for STR_INITIATE, STR_ROUTE, STR_UP, STR_DOWN, ... */
203 } initiate
, route
, unroute
, terminate
, status
, del_conn
, del_ca
;
205 /* data for STR_TERMINATE_SRCIP */
211 /* data for STR_ADD_CONN */
215 /* next three are deprecated, use stroke_end_t.auth instead */
218 u_int32_t eap_vendor
;
227 crl_policy_t crl_policy
;
235 time_t ipsec_lifetime
;
250 stroke_end_t me
, other
;
253 /* data for STR_ADD_CA */
264 /* data for STR_LOGLEVEL */
270 /* data for STR_CONFIG */
275 /* data for STR_LIST */
281 /* data for STR_REREAD */
286 /* data for STR_PURGE */
291 /* data for STR_LEASES */
297 char buffer
[STROKE_BUF_LEN
];
300 #endif /* STROKE_MSG_H_ */