aboutsummaryrefslogtreecommitdiffstats
path: root/src/libcharon/network/socket.h
diff options
context:
space:
mode:
authorTobias Brunner <tobias@strongswan.org>2012-08-13 10:39:34 +0200
committerTobias Brunner <tobias@strongswan.org>2012-08-13 10:45:39 +0200
commite4ef4c9877d5ccb773ace0edf655351428c39572 (patch)
tree9b3349ad0cafc1acebafb2ff2dc78a031f28c555 /src/libcharon/network/socket.h
parent000668d3081422a3ac06fe16f038a4b1d6700f96 (diff)
parent6fbf4472ea785f3c75d278b1a7400534989bf26a (diff)
downloadstrongswan-e4ef4c9877d5ccb773ace0edf655351428c39572.tar.bz2
strongswan-e4ef4c9877d5ccb773ace0edf655351428c39572.tar.xz
Merge branch 'android-ndk'
This branch comes with some preliminary changes for the user-land IPsec implementation and the Android App. One important change is that the UDP ports used by the socket-default plugin were made configurable (either via ./configure or strongswan.conf). Also, the plugin does randomly allocate a port if it is configured to 0, which is useful for client implementations. A consequence of these changes is that the local UDP port used when creating ike_cfg_t objects has to be fetched from the socket.
Diffstat (limited to 'src/libcharon/network/socket.h')
-rw-r--r--src/libcharon/network/socket.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/libcharon/network/socket.h b/src/libcharon/network/socket.h
index be875035b..4a4ef52e6 100644
--- a/src/libcharon/network/socket.h
+++ b/src/libcharon/network/socket.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2006-2010 Tobias Brunner
+ * Copyright (C) 2006-2012 Tobias Brunner
* Copyright (C) 2005-2010 Martin Willi
* Copyright (C) 2006 Daniel Roethlisberger
* Copyright (C) 2005 Jan Hutter
@@ -68,6 +68,14 @@ struct socket_t {
status_t (*send) (socket_t *this, packet_t *packet);
/**
+ * Get the port this socket is listening on.
+ *
+ * @param nat_t TRUE to get the port used to float in case of NAT-T
+ * @return the port
+ */
+ u_int16_t (*get_port) (socket_t *this, bool nat_t);
+
+ /**
* Destroy a socket implementation.
*/
void (*destroy) (socket_t *this);