12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879 |
- #include "socket_default_plugin.h"
- #include "socket_default_socket.h"
- #include <daemon.h>
- typedef struct private_socket_default_plugin_t private_socket_default_plugin_t;
- struct private_socket_default_plugin_t {
-
- socket_default_plugin_t public;
- };
- METHOD(plugin_t, get_name, char*,
- private_socket_default_plugin_t *this)
- {
- return "socket-default";
- }
- METHOD(plugin_t, destroy, void,
- private_socket_default_plugin_t *this)
- {
- free(this);
- }
- METHOD(plugin_t, get_features, int,
- private_socket_default_plugin_t *this, plugin_feature_t *features[])
- {
- static plugin_feature_t f[] = {
- PLUGIN_CALLBACK(socket_register, socket_default_socket_create),
- PLUGIN_PROVIDE(CUSTOM, "socket"),
- PLUGIN_SDEPEND(CUSTOM, "kernel-ipsec"),
- };
- *features = f;
- return countof(f);
- }
- plugin_t *socket_default_plugin_create()
- {
- private_socket_default_plugin_t *this;
- INIT(this,
- .public = {
- .plugin = {
- .get_name = _get_name,
- .get_features = _get_features,
- .destroy = _destroy,
- },
- },
- );
- return &this->public.plugin;
- }
|