diff options
author | Yves-Alexis Perez <corsac@corsac.net> | 2012-06-28 21:16:07 +0200 |
---|---|---|
committer | Yves-Alexis Perez <corsac@corsac.net> | 2012-06-28 21:16:07 +0200 |
commit | a3b482a8facde4b453ad821bfe40effbe3d17903 (patch) | |
tree | 636f02074b05b7473f5db1fe60fa2bceb0094a62 /src/libcharon/network/socket.h | |
parent | d816a1afbd841e9943bb439fe4e110b7c4970550 (diff) | |
parent | b34738ed08c2227300d554b139e2495ca5da97d6 (diff) | |
download | vyos-strongswan-a3b482a8facde4b453ad821bfe40effbe3d17903.tar.gz vyos-strongswan-a3b482a8facde4b453ad821bfe40effbe3d17903.zip |
Merge tag 'upstream/4.6.4'
Upstream version 4.6.4
Diffstat (limited to 'src/libcharon/network/socket.h')
-rw-r--r-- | src/libcharon/network/socket.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/libcharon/network/socket.h b/src/libcharon/network/socket.h index 51b26920f..be875035b 100644 --- a/src/libcharon/network/socket.h +++ b/src/libcharon/network/socket.h @@ -29,6 +29,7 @@ typedef struct socket_t socket_t; #include <library.h> #include <network/packet.h> #include <utils/enumerator.h> +#include <plugins/plugin.h> /** * Constructor prototype for sockets. @@ -72,4 +73,18 @@ struct socket_t { void (*destroy) (socket_t *this); }; +/** + * Helper function to (un-)register socket interfaces from plugin features. + * + * This function is a plugin_feature_callback_t and can be used with the + * PLUGIN_CALLBACK macro to register an socket interface constructor. + * + * @param plugin plugin registering the socket interface + * @param feature associated plugin feature + * @param reg TRUE to register, FALSE to unregister + * @param data data passed to callback, a socket_constructor_t + */ +bool socket_register(plugin_t *plugin, plugin_feature_t *feature, + bool reg, void *data); + #endif /** SOCKET_H_ @}*/ |