diff options
author | Yves-Alexis Perez <corsac@debian.org> | 2013-08-25 15:37:26 +0200 |
---|---|---|
committer | Yves-Alexis Perez <corsac@debian.org> | 2013-08-25 15:37:26 +0200 |
commit | 6b99c8d9cff7b3e8ae8f3204b99e7ea40f791349 (patch) | |
tree | 009fc492961e13860d2a4bc2de8caf2bbe2975e7 /src/libcharon/network/socket_manager.c | |
parent | c83921a2b566aa9d55d8ccc7258f04fca6292ee6 (diff) | |
download | vyos-strongswan-6b99c8d9cff7b3e8ae8f3204b99e7ea40f791349.tar.gz vyos-strongswan-6b99c8d9cff7b3e8ae8f3204b99e7ea40f791349.zip |
Imported Upstream version 5.1.0
Diffstat (limited to 'src/libcharon/network/socket_manager.c')
-rw-r--r-- | src/libcharon/network/socket_manager.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/libcharon/network/socket_manager.c b/src/libcharon/network/socket_manager.c index bf1fe5ba2..2a07e503c 100644 --- a/src/libcharon/network/socket_manager.c +++ b/src/libcharon/network/socket_manager.c @@ -102,6 +102,19 @@ METHOD(socket_manager_t, get_port, u_int16_t, return port; } +METHOD(socket_manager_t, supported_families, socket_family_t, + private_socket_manager_t *this) +{ + socket_family_t families = SOCKET_FAMILY_NONE; + this->lock->read_lock(this->lock); + if (this->socket) + { + families = this->socket->supported_families(this->socket); + } + this->lock->unlock(this->lock); + return families; +} + static void create_socket(private_socket_manager_t *this) { socket_constructor_t create; @@ -167,6 +180,7 @@ socket_manager_t *socket_manager_create() .send = _sender, .receive = _receiver, .get_port = _get_port, + .supported_families = _supported_families, .add_socket = _add_socket, .remove_socket = _remove_socket, .destroy = _destroy, |