Change traffic selectors during Quick Mode in case of a NAT in transport mode
[strongswan.git] / src / libcharon / plugins / socket_raw / socket_raw_socket.h
1 /*
2 * Copyright (C) 2010 Martin Willi
3 * Copyright (C) 2010 revosec AG
4 *
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>.
9 *
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
13 * for more details.
14 */
15
16 /**
17 * @defgroup socket_raw_socket socket_raw_socket
18 * @{ @ingroup socket_raw
19 */
20
21 #ifndef SOCKET_RAW_SOCKET_H_
22 #define SOCKET_RAW_SOCKET_H_
23
24 typedef struct socket_raw_socket_t socket_raw_socket_t;
25
26 #include <network/socket.h>
27
28 /**
29 * Raw socket, binds to port 500/4500 using any IPv4/IPv6 address.
30 *
31 * This imeplementation uses raw sockets to allow binding of other daemons
32 * (pluto) to UDP/500/4500. An installed "Linux socket filter" filters out
33 * all non-IKEv2 traffic and handles just IKEv2 messages. An other daemon
34 * must handle all traffic separately, e.g. ignore IKEv2 traffic, since charon
35 * handles that.
36 */
37 struct socket_raw_socket_t {
38
39 /**
40 * Implements the socket_t interface.
41 */
42 socket_t socket;
43
44 };
45
46 /**
47 * Create a socket_raw_socket instance.
48 */
49 socket_raw_socket_t *socket_raw_socket_create();
50
51 #endif /** SOCKET_RAW_SOCKET_H_ @}*/