]> git.ipfire.org Git - thirdparty/strongswan.git/blob - programs/charon/charon/threads/stroke_interface.h
- renamed get_block_size of hasher
[thirdparty/strongswan.git] / programs / charon / charon / threads / stroke_interface.h
1 /**
2 * @file stroke.h
3 *
4 * @brief Interface of stroke_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_INTERFACE_H_
24 #define STROKE_INTERFACE_H_
25
26 #include <config/policies/policy_store.h>
27 #include <config/connections/connection_store.h>
28 #include <config/credentials/credential_store.h>
29
30
31 typedef struct stroke_t stroke_t;
32
33 /**
34 * @brief Stroke is a configuration and control interface which
35 * allows other processes to modify charons behavior.
36 *
37 * stroke_t allows config manipulation (as whack in pluto).
38 * Messages of type stroke_msg_t's are sent over a unix socket
39 * (/var/run/charon.ctl). stroke_t implements the connections_t
40 * and the policies_t interface, which means it acts as a
41 * configuration backend for those too. stroke_t uses an own
42 * thread to read from the socket.
43 *
44 * @warning DO NOT cast stroke_t to any of the implemented interfaces!
45 * stroke_t implements multiple interfaces, so you must use
46 * stroke_t.interface_xy to access the specific interface! You have
47 * been warned...
48 *
49 * @todo Add clean thread cancellation
50 *
51 * @b Constructors:
52 * - stroke_create()
53 *
54 * @ingroup threads
55 */
56 struct stroke_t {
57
58 /**
59 * Implements policy_store_t interface
60 */
61 policy_store_t policies;
62
63 /**
64 * Implements credential_store_t interfacce
65 */
66 credential_store_t credentials;
67
68 /**
69 * @brief Destroy a stroke_t instance.
70 *
71 * @param this stroke_t objec to destroy
72 */
73 void (*destroy) (stroke_t *this);
74 };
75
76
77 /**
78 * @brief Create the stroke interface and listen on the socket.
79 *
80 * @return stroke_t object
81 *
82 * @ingroup threads
83 */
84 stroke_t *stroke_create();
85
86 #endif /* STROKE_INTERFACE_H_ */