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 ca information records */
51 LIST_CAINFOS
= 0x0008,
54 /** list all ocsp cache entries */
56 /** all list options */
60 typedef enum reread_flag_t reread_flag_t
;
63 * Definition of the REREAD flags, used for
64 * the various stroke reread* commands.
67 /** don't reread anything */
69 /** reread all ca certs */
70 REREAD_CACERTS
= 0x0001,
71 /** reread all ocsp signer certs */
72 REREAD_OCSPCERTS
= 0x0002,
73 /** reread all crls */
75 /** all reread options */
79 typedef enum purge_flag_t purge_flag_t
;
82 * Definition of the PURGE flags, currently used for
83 * the stroke purgeocsp command.
86 /** don't purge anything */
88 /** purge ocsp cache entries */
92 typedef struct stroke_end_t stroke_end_t
;
95 * definition of a peer in a stroke message
114 typedef struct stroke_msg_t stroke_msg_t
;
117 * @brief A stroke message sent over the unix socket.
119 struct stroke_msg_t
{
120 /* length of this message with all strings */
123 /* type of the message */
125 /* initiate a connection */
127 /* install SPD entries for a policy */
129 /* uninstall SPD entries for a policy */
131 /* add a connection */
133 /* delete a connection */
135 /* terminate connection */
137 /* show connection status */
139 /* show verbose connection status */
141 /* add a ca information record */
143 /* delete ca information record */
145 /* set a log type to log/not log */
147 /* list various objects */
149 /* reread various objects */
151 /* purge various objects */
156 /* verbosity of output returned from charon (-from -1=silent to 4=private)*/
157 int output_verbosity
;
160 /* data for STR_INITIATE, STR_ROUTE, STR_UP, STR_DOWN, ... */
163 } initiate
, route
, unroute
, terminate
, status
, del_conn
, del_ca
;
165 /* data for STR_ADD_CONN */
178 time_t ipsec_lifetime
;
188 stroke_end_t me
, other
;
191 /* data for STR_ADD_CA */
201 /* data for STR_LOGLEVEL */
207 /* data for STR_LIST */
213 /* data for STR_REREAD */
218 /* data for STR_PURGE */
223 char buffer
[STROKE_BUF_LEN
];
226 #endif /* STROKE_H_ */