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,
50 /** all list options */
54 typedef enum reread_flag_t reread_flag_t
;
57 * Definition of the REREAD flags, used for
58 * the various stroke reread* commands.
61 /** don't reread anything */
63 /** reread all ca certs */
64 REREAD_CACERTS
= 0x0001,
65 /** reread all crls */
67 /** all reread options */
71 typedef struct stroke_end_t stroke_end_t
;
74 * definition of a peer in a stroke message
90 typedef struct stroke_msg_t stroke_msg_t
;
93 * @brief A stroke message sent over the unix socket.
96 /* length of this message with all strings */
99 /* type of the message */
101 /* initiate a connection */
103 /* install SPD entries for a policy */
105 /* uninstall SPD entries for a policy */
107 /* add a connection */
109 /* delete a connection */
111 /* terminate connection */
113 /* show connection status */
115 /* show verbose connection status */
117 /* set a log type to log/not log */
119 /* list various objects */
121 /* reread various objects */
126 /* verbosity of output returned from charon (-from -1=silent to 4=private)*/
127 int output_verbosity
;
130 /* data for STR_INITIATE, STR_ROUTE, STR_UP, STR_DOWN, ... */
133 } initiate
, route
, unroute
, terminate
, status
, del_conn
;
135 /* data for STR_ADD_CONN */
145 time_t ipsec_lifetime
;
155 stroke_end_t me
, other
;
158 /* data for STR_LOGLEVEL */
164 /* data for STR_LIST */
170 /* data for STR_REREAD */
176 char buffer
[STROKE_BUF_LEN
];
179 #endif /* STROKE_H_ */