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 "/var/run/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 host/user certs */
46 /** list all ca certs */
47 LIST_CACERTS
= 0x0002,
48 /** list all ocsp signer certs */
49 LIST_OCSPCERTS
= 0x0004,
50 /** list all aa certs */
51 LIST_AACERTS
= 0x0008,
52 /** list all attribute certs */
54 /** list all access control groups */
56 /** list all ca information records */
57 LIST_CAINFOS
= 0x0040,
60 /** list all ocsp cache entries */
62 /** all list options */
66 typedef enum reread_flag_t reread_flag_t
;
69 * Definition of the REREAD flags, used for
70 * the various stroke reread* commands.
73 /** don't reread anything */
75 /** reread all secret keys */
76 REREAD_SECRETS
= 0x0001,
77 /** reread all ca certs */
78 REREAD_CACERTS
= 0x0002,
79 /** reread all ocsp signer certs */
80 REREAD_OCSPCERTS
= 0x0004,
81 /** reread all aa certs */
82 REREAD_AACERTS
= 0x0008,
83 /** reread all attribute certs */
84 REREAD_ACERTS
= 0x0010,
85 /** reread all crls */
87 /** all reread options */
91 typedef enum purge_flag_t purge_flag_t
;
94 * Definition of the PURGE flags, currently used for
95 * the stroke purgeocsp command.
98 /** don't purge anything */
100 /** purge ocsp cache entries */
104 typedef struct stroke_end_t stroke_end_t
;
107 * definition of a peer in a stroke message
109 struct stroke_end_t
{
127 typedef struct stroke_msg_t stroke_msg_t
;
130 * @brief A stroke message sent over the unix socket.
132 struct stroke_msg_t
{
133 /* length of this message with all strings */
136 /* type of the message */
138 /* initiate a connection */
140 /* install SPD entries for a policy */
142 /* uninstall SPD entries for a policy */
144 /* add a connection */
146 /* delete a connection */
148 /* terminate connection */
150 /* show connection status */
152 /* show verbose connection status */
154 /* add a ca information record */
156 /* delete ca information record */
158 /* set a log type to log/not log */
160 /* list various objects */
162 /* reread various objects */
164 /* purge various objects */
169 /* verbosity of output returned from charon (-from -1=silent to 4=private)*/
170 int output_verbosity
;
173 /* data for STR_INITIATE, STR_ROUTE, STR_UP, STR_DOWN, ... */
176 } initiate
, route
, unroute
, terminate
, status
, del_conn
, del_ca
;
178 /* data for STR_ADD_CONN */
193 time_t ipsec_lifetime
;
208 stroke_end_t me
, other
;
211 /* data for STR_ADD_CA */
221 /* data for STR_LOGLEVEL */
227 /* data for STR_LIST */
233 /* data for STR_REREAD */
238 /* data for STR_PURGE */
243 char buffer
[STROKE_BUF_LEN
];
246 #endif /* STROKE_H_ */