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
28 #include <sys/types.h>
31 * Socket which is used to communicate between charon and stroke
33 #define STROKE_SOCKET IPSEC_PIDDIR "/charon.ctl"
35 #define STROKE_BUF_LEN 2048
37 typedef enum list_flag_t list_flag_t
;
40 * Definition of the LIST flags, used for
41 * the various stroke list* commands.
44 /** don't list anything */
46 /** list all raw public keys */
47 LIST_PUBKEYS
= 0x0001,
48 /** list all host/user certs */
50 /** list all ca certs */
51 LIST_CACERTS
= 0x0004,
52 /** list all ocsp signer certs */
53 LIST_OCSPCERTS
= 0x0008,
54 /** list all aa certs */
55 LIST_AACERTS
= 0x0010,
56 /** list all attribute certs */
58 /** list all access control groups */
60 /** list all ca information records */
61 LIST_CAINFOS
= 0x0080,
64 /** list all ocsp cache entries */
66 /** list all supported algorithms */
68 /** all list options */
72 typedef enum reread_flag_t reread_flag_t
;
75 * Definition of the REREAD flags, used for
76 * the various stroke reread* commands.
79 /** don't reread anything */
81 /** reread all secret keys */
82 REREAD_SECRETS
= 0x0001,
83 /** reread all ca certs */
84 REREAD_CACERTS
= 0x0002,
85 /** reread all ocsp signer certs */
86 REREAD_OCSPCERTS
= 0x0004,
87 /** reread all aa certs */
88 REREAD_AACERTS
= 0x0008,
89 /** reread all attribute certs */
90 REREAD_ACERTS
= 0x0010,
91 /** reread all crls */
93 /** all reread options */
97 typedef enum purge_flag_t purge_flag_t
;
100 * Definition of the PURGE flags, currently used for
101 * the stroke purgeocsp command.
104 /** don't purge anything */
106 /** purge ocsp cache entries */
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
{
142 typedef struct stroke_msg_t stroke_msg_t
;
145 * @brief A stroke message sent over the unix socket.
147 struct stroke_msg_t
{
148 /* length of this message with all strings */
151 /* type of the message */
153 /* initiate a connection */
155 /* install SPD entries for a policy */
157 /* uninstall SPD entries for a policy */
159 /* add a connection */
161 /* delete a connection */
163 /* terminate connection */
165 /* terminate connection by peers srcip/virtual ip */
167 /* show connection status */
169 /* show verbose connection status */
171 /* add a ca information record */
173 /* delete ca information record */
175 /* set a log type to log/not log */
177 /* configure global options for stroke */
179 /* list various objects */
181 /* reread various objects */
183 /* purge various objects */
185 /* show pool leases */
190 /* verbosity of output returned from charon (-from -1=silent to 4=private)*/
191 int output_verbosity
;
194 /* data for STR_INITIATE, STR_ROUTE, STR_UP, STR_DOWN, ... */
197 } initiate
, route
, unroute
, terminate
, status
, del_conn
, del_ca
;
199 /* data for STR_TERMINATE_SRCIP */
205 /* data for STR_ADD_CONN */
211 u_int32_t eap_vendor
;
220 crl_policy_t crl_policy
;
228 time_t ipsec_lifetime
;
243 stroke_end_t me
, other
;
246 /* data for STR_ADD_CA */
257 /* data for STR_LOGLEVEL */
263 /* data for STR_CONFIG */
268 /* data for STR_LIST */
274 /* data for STR_REREAD */
279 /* data for STR_PURGE */
284 /* data for STR_LEASES */
290 char buffer
[STROKE_BUF_LEN
];
293 #endif /* STROKE_MSG_H_ */