diff options
author | Martin Willi <martin@revosec.ch> | 2011-10-13 11:41:16 +0200 |
---|---|---|
committer | Martin Willi <martin@revosec.ch> | 2011-10-14 10:05:48 +0200 |
commit | 8b6881cfc575f07fe71122fb939e0fedebf5233a (patch) | |
tree | 1c1013ec3d9956a1c53e8ae442c9c8549eac781d /src/libcharon/network/socket.h | |
parent | 3b62d5bad8b1d4d2aafaef1f6f240525323ab7e0 (diff) | |
download | strongswan-8b6881cfc575f07fe71122fb939e0fedebf5233a.tar.bz2 strongswan-8b6881cfc575f07fe71122fb939e0fedebf5233a.tar.xz |
Added socket plugin feature loading callback
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_ @}*/ |