summaryrefslogtreecommitdiff
path: root/src/charon/network/socket.h
diff options
context:
space:
mode:
authorRene Mayrhofer <rene@mayrhofer.eu.org>2008-12-05 16:44:41 +0000
committerRene Mayrhofer <rene@mayrhofer.eu.org>2008-12-05 16:44:41 +0000
commit2db1ef4ac8928944958712923b9c89c263a337d2 (patch)
tree700043d9d97b7e7ba344b448918728af0a8be8d1 /src/charon/network/socket.h
parent5dc75410286b0e3a16845b44dd696ba0f40df573 (diff)
downloadvyos-strongswan-2db1ef4ac8928944958712923b9c89c263a337d2.tar.gz
vyos-strongswan-2db1ef4ac8928944958712923b9c89c263a337d2.zip
- Updated to new upstream.
Diffstat (limited to 'src/charon/network/socket.h')
-rw-r--r--src/charon/network/socket.h24
1 files changed, 14 insertions, 10 deletions
diff --git a/src/charon/network/socket.h b/src/charon/network/socket.h
index b76a9b0c3..4e967f721 100644
--- a/src/charon/network/socket.h
+++ b/src/charon/network/socket.h
@@ -1,6 +1,6 @@
/*
* Copyright (C) 2006 Tobias Brunner, Daniel Roethlisberger
- * Copyright (C) 2005-2006 Martin Willi
+ * Copyright (C) 2005-2008 Martin Willi
* Copyright (C) 2005 Jan Hutter
* Hochschule fuer Technik Rapperswil
*
@@ -14,7 +14,7 @@
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* for more details.
*
- * $Id: socket.h 4355 2008-09-25 07:56:58Z tobias $
+ * $Id: socket.h 4647 2008-11-13 07:48:27Z martin $
*/
/**
@@ -30,15 +30,13 @@ typedef struct socket_t socket_t;
#include <library.h>
#include <network/packet.h>
#include <utils/host.h>
-#include <utils/linked_list.h>
+#include <utils/enumerator.h>
/**
* Maximum size of a packet.
*
- * 3000 Bytes should be sufficient, see IKEv2 RFC. However, we currently
- * do not support HASH_AND_URL certificates, so we require to transmit
- * the full certificates. To run our multi-CA test with 2 intermediate CAs,
- * 5000 bytes is sufficient.
+ * 3000 Bytes should be sufficient, see IKEv2 RFC. However, to run our
+ * multi-CA test with 2 intermediate CAs, we increase that to 5000 bytes.
*/
#define MAX_PACKET 5000
@@ -73,9 +71,8 @@ struct socket_t {
/**
* Send a packet.
*
- * Sends a packet to the net using destination from the packet.
- * Packet is sent using default routing mechanisms, thus the
- * source address in packet is ignored.
+ * Sends a packet to the net using source and destination addresses of
+ * the packet.
*
* @param packet packet_t to send
* @return
@@ -85,6 +82,13 @@ struct socket_t {
status_t (*send) (socket_t *this, packet_t *packet);
/**
+ * Enumerate all underlying socket file descriptors.
+ *
+ * @return enumerator over (int fd, int family, int port)
+ */
+ enumerator_t *(*create_enumerator) (socket_t *this);
+
+ /**
* Destroy socket.
*/
void (*destroy) (socket_t *this);