diff options
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, |