]> git.stg.codes - stg.git/blobdiff - projects/stargazer/plugins/other/radius/config.h
Added no_match settings to the radius plugin.
[stg.git] / projects / stargazer / plugins / other / radius / config.h
index c70c7b0f2c94d67663bfb0a3d00e3850c56947c8..809d91c9783b444650e18734960309d676c3e488 100644 (file)
@@ -39,15 +39,28 @@ struct Config
     typedef std::map<std::string, std::string> Pairs;
     typedef std::pair<std::string, std::string> Pair;
     enum Type { UNIX, TCP };
+    enum ReturnCode
+    {
+        REJECT,   // Reject the request immediately.
+        FAIL,     // Module failed.
+        OK,       // Module is OK, continue.
+        HANDLED,  // The request is handled, no further handling.
+        INVALID,  // The request is invalud.
+        USERLOCK, // Reject the request, user is locked.
+        NOTFOUND, // User not found.
+        NOOP,     // Module performed no action.
+        UPDATED   // Module sends some updates.
+    };
 
     struct Section
     {
         Section() {}
-        Section(const Pairs& ma, const Pairs& mo, const Pairs& re)
-            : match(ma), modify(mo), reply(re) {}
+        Section(const Pairs& ma, const Pairs& mo, const Pairs& re, ReturnCode code)
+            : match(ma), modify(mo), reply(re), returnCode(code) {}
         Pairs match;
         Pairs modify;
         Pairs reply;
+        ReturnCode returnCode;
     };
 
     Config() {}