IKEv1 XAuth: Added plugin support for XAuth, which allows us to have plugins to talk...
[strongswan.git] / src / libstrongswan / plugins / plugin_feature.h
index b1500fe..89c9544 100644 (file)
@@ -25,6 +25,7 @@ typedef struct plugin_feature_t plugin_feature_t;
 
 #include <library.h>
 #include <eap/eap.h>
+#include <xauth/xauth.h>
 #include <plugins/plugin.h>
 
 /**
@@ -135,6 +136,10 @@ struct plugin_feature_t {
                FEATURE_FETCHER,
                /** custom feature, described with a string */
                FEATURE_CUSTOM,
+               /** XAuth server implementation */
+               FEATURE_XAUTH_SERVER,
+               /** XAuth peer implementation */
+               FEATURE_XAUTH_PEER,
        } type;
        /** More specific data for each type */
        union {
@@ -182,6 +187,8 @@ struct plugin_feature_t {
                char *fetcher;
                /** FEATURE_CUSTOM */
                char *custom;
+               /** FEATURE_XAUTH_SERVER/CLIENT */
+               xauth_type_t xauth;
 
                /** FEATURE_REGISTER */
                struct {
@@ -266,6 +273,8 @@ struct plugin_feature_t {
 #define _PLUGIN_FEATURE_DATABASE(kind, type)                           __PLUGIN_FEATURE(kind, DATABASE, .database = type)
 #define _PLUGIN_FEATURE_FETCHER(kind, type)                                    __PLUGIN_FEATURE(kind, FETCHER, .fetcher = type)
 #define _PLUGIN_FEATURE_CUSTOM(kind, name)                                     __PLUGIN_FEATURE(kind, CUSTOM, .custom = name)
+#define _PLUGIN_FEATURE_XAUTH_SERVER(kind, type)                       __PLUGIN_FEATURE(kind, XAUTH_SERVER, .xauth = type)
+#define _PLUGIN_FEATURE_XAUTH_PEER(kind, type)                         __PLUGIN_FEATURE(kind, XAUTH_PEER, .xauth = type)
 
 #define __PLUGIN_FEATURE_REGISTER(type, _f)                                    (plugin_feature_t){ FEATURE_REGISTER, FEATURE_##type, .arg.reg.f = _f }
 #define __PLUGIN_FEATURE_REGISTER_BUILDER(type, _f, _final)    (plugin_feature_t){ FEATURE_REGISTER, FEATURE_##type, .arg.reg = {.f = _f, .final = _final, }}