- fixed doxygen build
[strongswan.git] / Source / stroke / stroke.h
1 /**
2 * @file stroke.h
3 *
4 * @brief Definition of stroke_msg_t.
5 *
6 */
7
8 /*
9 * Copyright (C) 2006 Martin Willi
10 * Hochschule fuer Technik Rapperswil
11 *
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>.
16 *
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
20 * for more details.
21 */
22
23 #ifndef STROKE_H_
24 #define STROKE_H_
25
26 /**
27 * Socket which is used to communicate between charon and stroke
28 */
29 #define STROKE_SOCKET "/var/run/charon.ctl"
30
31
32 typedef struct stroke_msg_t stroke_msg_t;
33
34 /**
35 * @brief A stroke message sent over the unix socket.
36 */
37 struct stroke_msg_t {
38 /* length of this message with all strings */
39 u_int16_t length;
40 /* type of the message */
41 enum {
42 /* initiate a connection */
43 STR_INITIATE,
44 /* install SPD entries for a connection */
45 STR_INSTALL,
46 /* add a connection */
47 STR_ADD_CONN,
48 /* delete a connection */
49 STR_DEL_CONN,
50 /* terminate connection */
51 STR_TERMINATE,
52 /* show connection status */
53 STR_STATUS,
54 /* set a log type to log/not log */
55 STR_LOGTYPE,
56 /* set the verbosity of a logging context */
57 STR_LOGLEVEL,
58 /* more to come */
59 } type;
60 union {
61 /* data for STR_INITIATE, STR_INSTALL, STR_UP, STR_DOWN */
62 struct {
63 char *name;
64 } initiate, install, terminate;
65 /* data for STR_ADD_CONN */
66 struct {
67 char *name;
68 struct {
69 char *id;
70 char *cert;
71 char *address;
72 char *subnet;
73 u_int8_t subnet_mask;
74 } me, other;
75 } add_conn;
76 struct {
77 char *context;
78 char *type;
79 int enable;
80 } logtype;
81 struct {
82 char *context;
83 u_int level;
84 } loglevel;
85 };
86 u_int8_t buffer[];
87 };
88
89 #endif /* STROKE_H_ */