2 * Copyright (C) 2008 Martin Willi
3 * Hochschule fuer Technik Rapperswil
5 * This program is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License as published by the
7 * Free Software Foundation; either version 2 of the License, or (at your
8 * option) any later version. See <http://www.fsf.org/copyleft/gpl.txt>.
10 * This program is distributed in the hope that it will be useful, but
11 * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
12 * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
19 * @defgroup stroke_control stroke_control
23 #ifndef STROKE_CONTROL_H_
24 #define STROKE_CONTROL_H_
26 #include <stroke_msg.h>
30 typedef struct stroke_control_t stroke_control_t
;
33 * Process stroke control messages
35 struct stroke_control_t
{
38 * Initiate a connection.
40 * @param msg stroke message
42 void (*initiate
)(stroke_control_t
*this, stroke_msg_t
*msg
, FILE *out
);
45 * Terminate a connection.
47 * @param msg stroke message
49 void (*terminate
)(stroke_control_t
*this, stroke_msg_t
*msg
, FILE *out
);
52 * Terminate a connection by peers virtual IP.
54 * @param msg stroke message
56 void (*terminate_srcip
)(stroke_control_t
*this, stroke_msg_t
*msg
, FILE *out
);
61 * @param msg stroke message
63 void (*route
)(stroke_control_t
*this, stroke_msg_t
*msg
, FILE *out
);
66 * Unroute a connection.
68 * @param msg stroke message
70 void (*unroute
)(stroke_control_t
*this, stroke_msg_t
*msg
, FILE *out
);
73 * Destroy a stroke_control instance.
75 void (*destroy
)(stroke_control_t
*this);
79 * Create a stroke_control instance.
81 stroke_control_t
*stroke_control_create();
83 #endif /** STROKE_CONTROL_H_ @}*/