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 host/user certs */
48 /** list all ca certs */
49 LIST_CACERTS
= 0x0002,
50 /** list all ocsp signer certs */
51 LIST_OCSPCERTS
= 0x0004,
52 /** list all aa certs */
53 LIST_AACERTS
= 0x0008,
54 /** list all attribute certs */
56 /** list all access control groups */
58 /** list all ca information records */
59 LIST_CAINFOS
= 0x0040,
62 /** list all ocsp cache entries */
64 /** all list options */
68 typedef enum reread_flag_t reread_flag_t
;
71 * Definition of the REREAD flags, used for
72 * the various stroke reread* commands.
75 /** don't reread anything */
77 /** reread all secret keys */
78 REREAD_SECRETS
= 0x0001,
79 /** reread all ca certs */
80 REREAD_CACERTS
= 0x0002,
81 /** reread all ocsp signer certs */
82 REREAD_OCSPCERTS
= 0x0004,
83 /** reread all aa certs */
84 REREAD_AACERTS
= 0x0008,
85 /** reread all attribute certs */
86 REREAD_ACERTS
= 0x0010,
87 /** reread all crls */
89 /** all reread options */
93 typedef enum purge_flag_t purge_flag_t
;
96 * Definition of the PURGE flags, currently used for
97 * the stroke purgeocsp command.
100 /** don't purge anything */
102 /** purge ocsp cache entries */
107 * CRL certificate validation policy
116 typedef struct stroke_end_t stroke_end_t
;
119 * definition of a peer in a stroke message
121 struct stroke_end_t
{
139 typedef struct stroke_msg_t stroke_msg_t
;
142 * @brief A stroke message sent over the unix socket.
144 struct stroke_msg_t
{
145 /* length of this message with all strings */
148 /* type of the message */
150 /* initiate a connection */
152 /* install SPD entries for a policy */
154 /* uninstall SPD entries for a policy */
156 /* add a connection */
158 /* delete a connection */
160 /* terminate connection */
162 /* show connection status */
164 /* show verbose connection status */
166 /* add a ca information record */
168 /* delete ca information record */
170 /* set a log type to log/not log */
172 /* configure global options for stroke */
174 /* list various objects */
176 /* reread various objects */
178 /* purge various objects */
183 /* verbosity of output returned from charon (-from -1=silent to 4=private)*/
184 int output_verbosity
;
187 /* data for STR_INITIATE, STR_ROUTE, STR_UP, STR_DOWN, ... */
190 } initiate
, route
, unroute
, terminate
, status
, del_conn
, del_ca
;
192 /* data for STR_ADD_CONN */
198 u_int32_t eap_vendor
;
202 crl_policy_t crl_policy
;
210 time_t ipsec_lifetime
;
225 stroke_end_t me
, other
;
228 /* data for STR_ADD_CA */
239 /* data for STR_LOGLEVEL */
245 /* data for STR_CONFIG */
250 /* data for STR_LIST */
256 /* data for STR_REREAD */
261 /* data for STR_PURGE */
266 char buffer
[STROKE_BUF_LEN
];
269 #endif /* STROKE_MSG_H_ */