chunk_to_hex() function declaration deleted
[strongswan.git] / src / charon / threads / receiver.h
1 /**
2 * @file receiver.h
3 *
4 * @brief Interface of receiver_t.
5 *
6 */
7
8 /*
9 * Copyright (C) 2005-2006 Martin Willi
10 * Copyright (C) 2005 Jan Hutter
11 * Hochschule fuer Technik Rapperswil
12 *
13 * This program is free software; you can redistribute it and/or modify it
14 * under the terms of the GNU General Public License as published by the
15 * Free Software Foundation; either version 2 of the License, or (at your
16 * option) any later version. See <http://www.fsf.org/copyleft/gpl.txt>.
17 *
18 * This program is distributed in the hope that it will be useful, but
19 * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
20 * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
21 * for more details.
22 */
23
24 #ifndef RECEIVER_H_
25 #define RECEIVER_H_
26
27 #include <types.h>
28
29
30 typedef struct receiver_t receiver_t;
31
32 /**
33 * @brief Receives packets from the socket and adds them to the job queue.
34 *
35 * The receiver starts a thread, wich reads on the blocking socket. If
36 * data is available, a packet_t object is created , wrapped
37 * in an incoming_packet_job_t and added to the job queue.
38 *
39 * @b Constructors:
40 * - receiver_create()
41 *
42 * @ingroup threads
43 */
44 struct receiver_t {
45
46 /**
47 * @brief Destroys a receiver_t object.
48 *
49 * @param receiver receiver object
50 */
51 void (*destroy) (receiver_t *receiver);
52 };
53
54 /**
55 * @brief Create a receiver_t object.
56 *
57 * The receiver thread will start working, get data
58 * from the socket and add those packets to the job queue.
59 *
60 * @return
61 * - receiver_t object
62 * - NULL of thread could not be started
63 *
64 * @ingroup threads
65 */
66 receiver_t * receiver_create(void);
67
68 #endif /*RECEIVER_H_*/