X-Git-Url: http://git.ipfire.org/?p=people%2Fteissler%2Fipfire-2.x.git;a=blobdiff_plain;f=src%2Fmisc-progs%2Fopenvpnctrl.c;h=272db0faade2dc3abb79687ad1d077c7308b4175;hp=028a1a3722652cdb5640a0cd82730b4ccd5d95cd;hb=e1a51ebb851be156104d3971b85f2572fc7eeb73;hpb=afabe9f7d12f6c7fffeac86c63e9556e28471c02 diff --git a/src/misc-progs/openvpnctrl.c b/src/misc-progs/openvpnctrl.c index 028a1a372..272db0faa 100644 --- a/src/misc-progs/openvpnctrl.c +++ b/src/misc-progs/openvpnctrl.c @@ -1,10 +1,14 @@ +#include #include #include #include #include #include +#include +#include #include #include "setuid.h" +#include "netutil.h" #include "libsmooth.h" #define noovpndebug @@ -21,10 +25,24 @@ char enableblue[STRING_SIZE] = "off"; char enableorange[STRING_SIZE] = "off"; // consts -char OVPNRED[STRING_SIZE] = "OVPN"; -char OVPNBLUE[STRING_SIZE] = "OVPN_BLUE_"; -char OVPNORANGE[STRING_SIZE] = "OVPN_ORANGE_"; -char WRAPPERVERSION[STRING_SIZE] = "2.0.1.6"; +char OVPNINPUT[STRING_SIZE] = "OVPNINPUT"; +char OVPNBLOCK[STRING_SIZE] = "OVPNBLOCK"; +char OVPNNAT[STRING_SIZE] = "OVPNNAT"; +char WRAPPERVERSION[STRING_SIZE] = "ipfire-2.2.4"; + +struct connection_struct { + char name[STRING_SIZE]; + char type[STRING_SIZE]; + char proto[STRING_SIZE]; + char status[STRING_SIZE]; + char local_subnet[STRING_SIZE]; + char transfer_subnet[STRING_SIZE]; + char role[STRING_SIZE]; + char port[STRING_SIZE]; + struct connection_struct *next; +}; + +typedef struct connection_struct connection; void exithandler(void) { @@ -37,9 +55,9 @@ void exithandler(void) void usage(void) { #ifdef ovpndebug - printf("Wrapper for OpenVPN v%s-debug\n", WRAPPERVERSION); + printf("Wrapper for OpenVPN %s-debug\n", WRAPPERVERSION); #else - printf("Wrapper for OpenVPN v%s\n", WRAPPERVERSION); + printf("Wrapper for OpenVPN %s\n", WRAPPERVERSION); #endif printf("openvpnctrl