From e0612c9a9ec065aa5ef159f1fd12b6711aeeb7c2 Mon Sep 17 00:00:00 2001 From: Detlef Wengorz Date: Mon, 5 Feb 2001 19:10:28 +0000 Subject: [PATCH] remove .so lib's. (No longer need) little changes netfilter patch and related .c files to compile correct. --- isdnctrl/libipt_DWISDN.c | 12 +- isdnctrl/libipt_DWISDN.so | Bin 6401 -> 0 bytes isdnctrl/libipt_ISDNDIAL.c | 11 +- isdnctrl/libipt_ISDNDIAL.so | Bin 4023 -> 0 bytes isdnctrl/libipt_dwisdn.c | 11 +- isdnctrl/libipt_dwisdn.so | Bin 7273 -> 0 bytes isdnctrl/patch-netfilter-1.1.2_isdn | 879 +++++++++++++++++++++++++++- 7 files changed, 867 insertions(+), 46 deletions(-) delete mode 100755 isdnctrl/libipt_DWISDN.so delete mode 100755 isdnctrl/libipt_ISDNDIAL.so delete mode 100755 isdnctrl/libipt_dwisdn.so diff --git a/isdnctrl/libipt_DWISDN.c b/isdnctrl/libipt_DWISDN.c index bb648f0a..7c29af3a 100644 --- a/isdnctrl/libipt_DWISDN.c +++ b/isdnctrl/libipt_DWISDN.c @@ -24,8 +24,6 @@ #undef DWISDN_INSTALLED #endif -static const char *MY_NETFILTER_VERSION = NETFILTER_VERSION; - /* Function which prints out usage message. */ @@ -74,7 +72,7 @@ static void help(void) 0, 0, #endif - MY_NETFILTER_VERSION); + NETFILTER_VERSION); } @@ -323,14 +321,6 @@ void _init(void) /*************************************************************************** ***************************************************************************/ { - char *xx = getenv("NETFILTER_VERSION"); - - if(xx != NULL) { - - MY_NETFILTER_VERSION = - DWISDN.version = xx; - } - register_target(&DWISDN); } diff --git a/isdnctrl/libipt_DWISDN.so b/isdnctrl/libipt_DWISDN.so deleted file mode 100755 index 6b2db5bda188370da2bf28be0d05329895f26eb8..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 6401 zcmd^DVQgE~6~2kvl7v8 zlX{|S*=r??G3o@GQ28+?rmbVr!~{Z=Rg)3f%BD@~kBw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kN2j(#2uT$_CQqJ8u=bHJ;wip9LrRRW%;3Tk;_PP6WX@Cm1?{>gs|;C;h9)xiG&=xrE}^WYoij~n>_p$j?ZZy+ot!{Ln~?Dpw+!i)sO*sjsBP-HfqjU+?(BFl>5 z2SZnWZN$t(TB!F+b>9 #include -static const char *MY_NETFILTER_VERSION = NETFILTER_VERSION; static struct option TIPT_ISDNDIAL_opts[] = { {0} }; @@ -39,7 +38,7 @@ static void help(void) 0, 0, #endif - MY_NETFILTER_VERSION); + NETFILTER_VERSION); } @@ -115,14 +114,6 @@ void _init(void) /*************************************************************************** ***************************************************************************/ { - char *xx = getenv("NETFILTER_VERSION"); - - if(xx != NULL) { - - MY_NETFILTER_VERSION = - ISDNDIAL.version = xx; - } - register_target(&ISDNDIAL); } diff --git a/isdnctrl/libipt_ISDNDIAL.so b/isdnctrl/libipt_ISDNDIAL.so deleted file mode 100755 index 4a720f2b013337269bd394aed4e4d809f601465d..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 4023 zcmds4O=ule6u#+;*2Mm#wQ98$uF{_b?a+jZOJ=b60JRw>iTd-L+9oy?3g zleBTumWN=hfeIq7B+!lS1gk5-K;y29tXzo%K~1zGf)rPc-*;#3%QJ1Ef-4Vm=DX*f zbI-l^-2V&NzMh7L2B9e5z0U@Dj6F$zM=)?^h~F;|mSB-I$vE+a4ipu>q7 zWCRz)*po6M8N`EWATy#_M=zb)dAm4mBl zP6;sxel~3%^&OBG(al$YThac#Kuxqi1=j7M{YzR2r2hCCJ$t14M|)?DUYOk{2fF%m zM}>K;Z}3Q0pE=mmGn_4$g{~ugSyKd|e7mp(+so$KLix+t z4HtVG4pTXOYmL7fSg+OjzhGG4R{P(w4R;u$YZ_mXWrmHvLY+CiTI*%GYftX+V4i;%o>HZFC zH`)!(<$FG*VQK{cbB9e#E$Pphh%Gi*9lq6*c-{f4rMsu+HKMaVr$g3qkWTh z7#VVR)ZFBI?v$K}Z01YHlb#jJvg2YpO5csL-j`vxmQV31i4`npv6@wsvJGd!ZMLR+{DlFHPeq4d?Rh5h@P9&45FPRE0 zFAA*C_F~pnhMo;eJ<-B1mtDuR|55Oq1J`lrjE%v0$+2KC*4$)yB^gmBBz=~7qziojnt@(n4)jq zRC7~**YK+&*`coPY#K_Vxmm0!b4U*OdYUjI{yDp}Y9j`+g`QkrAvxn_{`Z1;=5s@<(XpdPv8Ij< zjI_xPqw{&AL$-HzcDC>DI3Qa?+qJF8ZmX5xNwvS-*x%0LMl>~!^#+W?1S>jKv7(AF zuzFyUU>phq?hLi(t5o2|!caeT92lXW=#u}K4{f^qgn=VM7?_&lST(}%{MfFw|2`5s zV8b{vMvN)>S}FrntQqg8!Hg^I7;Ew@m@(!(i8hRR8<=^tA>EKF5qKk*2Kgb+qdS(>L?xU_;I$t%?4~Ik2|loFwnije?GSAn{(o zY}Rua0U}?dkdjRCH6ZO!ojRN6aAi85>IgDT^WLHDc%L|kM(<2@1l_(-q}d1h<67W- zHb`YaEiPw~X1{62`^-FrI-)-k%d%cgwA-Tvpw>+xo!s^kf4{(v>qV2c6vXXI(p{pyt z0G@`tE0tddUV+RxL;Est7IIrEyTFAy{hN>%QQrw5>w62RiEX$9)_Xti+3#v4koxz* z_4oXbATPqdzUO}oSrhF)1#?}H=s6VEfN*m4TO3F;HDGVqU?B6Uk>`Epgh$-FY4Y5cfKx?XT@D#D(ZppH;!PcfdBvi diff --git a/isdnctrl/libipt_dwisdn.c b/isdnctrl/libipt_dwisdn.c index 2842e284..348ec9c3 100644 --- a/isdnctrl/libipt_dwisdn.c +++ b/isdnctrl/libipt_dwisdn.c @@ -13,7 +13,6 @@ #include #include -static const char *MY_NETFILTER_VERSION = NETFILTER_VERSION; #if ((CONFIG_ISDN || CONFIG_ISDN_MODULE) && \ CONFIG_ISDN_WITH_ABC_IPTABLES_NETFILTER) @@ -93,7 +92,7 @@ static void help(void) 0, 0, #endif - MY_NETFILTER_VERSION); + NETFILTER_VERSION); } @@ -389,14 +388,6 @@ void _init(void) /*************************************************************************** ***************************************************************************/ { - char *xx = getenv("NETFILTER_VERSION"); - - if(xx != NULL) { - - MY_NETFILTER_VERSION = - dwisdn.version = xx; - } - register_match(&dwisdn); } diff --git a/isdnctrl/libipt_dwisdn.so b/isdnctrl/libipt_dwisdn.so deleted file mode 100755 index 9cc150d2fbab879fcbfa1aff1934712ee51060db..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 7273 zcmds6Z)_aJ6(9RdVjl)OiIawumWfD+1NdZHN!z5MC5bN~G>P3{lh8E1Z0`1ao80Z1 zyWPZANn^M~;&NCuB_AqKs|XN6;zMacD5$7CN{S`a4{3#HOGOk>n%aaS{zMSDZmz%I z?CyDeI4U3b)RCXxym@clyni#hH+v+ybyH1EjqqDYgaoOctAtnueBVNsvr0&CTEzm< ztoXh>@!|z8V2S`+@g>IOjV}BY3JG&Oel74FEr4Y%41gw(Uk8{6kbtiOz6`h?z;*** zk?Ohs<^z2RfF;EecSw8%_&TruMI+h;w^Z}OqWX)yv1$YtXKg3EQ8&^;>_u$YLV}S2 z9a0Fi+o@wv&_XIYLOfKVRm8=U6OZ@`S5ph6@Nt){V-_XAFg-2ie^Ooc#!|ID*hVKexv=iPXLn^ zv95czuiv(1qlj(Z+Pz`@)>!wZO?O3mW4-G)Y>mdmK-Mtrq|gTqJEmu|R#sR8wwCP| z@su7v5Hrk!dN!wX&@dAs7R%XL+e%~H*0ZLT7KuYfE@27`7`EuwZQVR5vUWAypdAQ!gUBGj&vDOh|qu)-9&9w}8E`r%gj7@(lF*a8_F*f@uVjLFV zAjTn4ey$GM%TKt~&K~PF1rQVG%4kn8Gbyqs&M2BYHO0Y+lA^hzQ~WpatfF}Wr6lQ- zie@*}N_rGDaHaJX{*iyL<*soK?7sh%mta;gUk{<4{muJBBl+?3=#KBlKylA_;k`Yt zT)1X5*f4)*F z!|eYOhcGdrqcpJ+ry5s{HW!~mhD1+sPS5z$m&@h+>1H@tU(7R-Wl>yIcw^+(;rGks z7kO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H$yC?S97mh7Gz21Zveq-iDN>2|6b*rzg5k%6!b$?8K6%d&r_1VDvcp!4xLEZn3 yQ2E;6eG2gJ{;%}i088;>gZue_zirJ#@LR;pj|J}cgIPags4odKKUq|Lh4?Qwu*^FE diff --git a/isdnctrl/patch-netfilter-1.1.2_isdn b/isdnctrl/patch-netfilter-1.1.2_isdn index 41fdcf0f..5b96a31d 100644 --- a/isdnctrl/patch-netfilter-1.1.2_isdn +++ b/isdnctrl/patch-netfilter-1.1.2_isdn @@ -1,19 +1,18 @@ -Binary files netfilter-1.1.2/userspace/extensions/.Makefile.swp and netfilter/userspace/extensions/.Makefile.swp differ -diff -Nru --minimal --exclude-from=exclu-file netfilter-1.1.2/userspace/extensions/Makefile netfilter/userspace/extensions/Makefile ---- netfilter-1.1.2/userspace/extensions/Makefile Wed Oct 18 22:02:18 2000 -+++ netfilter/userspace/extensions/Makefile Sat Oct 28 17:08:53 2000 +diff -Nru --minimal isdn_userspace/extensions/Makefile userspace/extensions/Makefile +--- isdn_userspace/extensions/Makefile Mon Feb 5 10:52:17 2001 ++++ userspace/extensions/Makefile Mon Feb 5 10:53:27 2001 @@ -3,6 +3,8 @@ PF_EXT_SLIB:=tcp udp icmp mac limit standard REJECT LOG unclean state multiport tos TOS mark MARK owner SNAT DNAT MASQUERADE REDIRECT MIRROR - PF6_EXT_SLIB:=tcp udp icmp standard + PF6_EXT_SLIB:=tcp udp icmp standard MARK mark -+PF_EXT_SLIB+= dwisdn DWSIDN ISDNDIAL ++PF_EXT_SLIB+= dwisdn DWISDN ISDNDIAL + # Optionals PF_EXT_SLIB_OPTS:=$(foreach T,$(wildcard extensions/.*-test),$(shell KERNEL_DIR=$(KERNEL_DIR) $(T))) PF6_EXT_SLIB_OPTS:=$(foreach T,$(wildcard extensions/.*-test6),$(shell KERNEL_DIR=$(KERNEL_DIR) $(T))) -diff -Nru --minimal --exclude-from=exclu-file netfilter-1.1.2/userspace/extensions/libipt_DWISDN.c netfilter/userspace/extensions/libipt_DWISDN.c ---- netfilter-1.1.2/userspace/extensions/libipt_DWISDN.c Thu Jan 1 00:00:00 1970 -+++ netfilter/userspace/extensions/libipt_DWISDN.c Wed Oct 18 22:42:16 2000 +diff -Nru --minimal isdn_userspace/extensions/libipt_DWISDN.c userspace/extensions/libipt_DWISDN.c +--- isdn_userspace/extensions/libipt_DWISDN.c Thu Jan 1 00:00:00 1970 ++++ userspace/extensions/libipt_DWISDN.c Mon Feb 5 10:52:56 2001 @@ -0,0 +1,336 @@ + +/* @@ -351,9 +350,9 @@ diff -Nru --minimal --exclude-from=exclu-file netfilter-1.1.2/userspace/extensio + register_target(&DWISDN); +} + -diff -Nru --minimal --exclude-from=exclu-file netfilter-1.1.2/userspace/extensions/libipt_ISDNDIAL.c netfilter/userspace/extensions/libipt_ISDNDIAL.c ---- netfilter-1.1.2/userspace/extensions/libipt_ISDNDIAL.c Thu Jan 1 00:00:00 1970 -+++ netfilter/userspace/extensions/libipt_ISDNDIAL.c Wed Oct 18 22:42:16 2000 +diff -Nru --minimal isdn_userspace/extensions/libipt_ISDNDIAL.c userspace/extensions/libipt_ISDNDIAL.c +--- isdn_userspace/extensions/libipt_ISDNDIAL.c Thu Jan 1 00:00:00 1970 ++++ userspace/extensions/libipt_ISDNDIAL.c Mon Feb 5 10:52:56 2001 @@ -0,0 +1,128 @@ + +/* @@ -483,9 +482,9 @@ diff -Nru --minimal --exclude-from=exclu-file netfilter-1.1.2/userspace/extensio + register_target(&ISDNDIAL); +} + -diff -Nru --minimal --exclude-from=exclu-file netfilter-1.1.2/userspace/extensions/libipt_dwisdn.c netfilter/userspace/extensions/libipt_dwisdn.c ---- netfilter-1.1.2/userspace/extensions/libipt_dwisdn.c Thu Jan 1 00:00:00 1970 -+++ netfilter/userspace/extensions/libipt_dwisdn.c Sat Oct 28 14:15:01 2000 +diff -Nru --minimal isdn_userspace/extensions/libipt_dwisdn.c userspace/extensions/libipt_dwisdn.c +--- isdn_userspace/extensions/libipt_dwisdn.c Thu Jan 1 00:00:00 1970 ++++ userspace/extensions/libipt_dwisdn.c Mon Feb 5 10:52:56 2001 @@ -0,0 +1,402 @@ + + @@ -889,3 +888,853 @@ diff -Nru --minimal --exclude-from=exclu-file netfilter-1.1.2/userspace/extensio + register_match(&dwisdn); +} + +diff -Nru --minimal isdn_userspace/libipt_DWISDN.c userspace/libipt_DWISDN.c +--- isdn_userspace/libipt_DWISDN.c Thu Jan 1 00:00:00 1970 ++++ userspace/libipt_DWISDN.c Mon Feb 5 10:55:26 2001 +@@ -0,0 +1,326 @@ ++ ++/* ++** Shared library add-on to iptables to add dwisdn matching support. ++** most parts are copied from libipt_mark.c ++** thanks for this ++*/ ++#include ++#include ++#include ++#include ++ ++#include ++#include ++ ++#if ((CONFIG_ISDN || CONFIG_ISDN_MODULE) && \ ++ CONFIG_ISDN_WITH_ABC_IPTABLES_NETFILTER) ++ ++ ++#define IPT_ISDN_DWISDN_TIPTH_NEED_OPTS 1 ++#include ++#define DWISDN_INSTALLED 1 ++ ++#else ++#undef DWISDN_INSTALLED ++#endif ++ ++ ++ ++/* Function which prints out usage message. */ ++static void help(void) ++{ ++ printf( ++ "DWISDN v%d options: (MAX %d option's per rule) iptables-vers. %s\n" ++ "\tThe options below will be parsed from left to right\n" ++ ++ "--clear no values\n" ++ "\tclear frame-bit's for dont reset huptimer and destination unreach\n" ++ ++ "--huptimer no values\n" ++ "\tset frame-bit for dont reset huptimer\n" ++ ++ "--unreach no values\n" ++ "\tset frame-bit for destination unreach in case of frames with\n" ++ "\tdont reset huptimer bit and interface not online\n" ++ ++ "[!] --in_dev no values\n" ++ "\tuse in-interface for options follow this\n" ++ "\tdefault the kernel will use the out-interface\n" ++ "\twith ! --in_dev you can switch back to out-interface\n" ++ "\tthis is only usefull in a FORWARD or INPUT rule.\n" ++ ++ "--dial no values\n" ++ "\ttrigger dialing even of manual- or off-dialmode\n" ++ ++ "--hangup no values\n" ++ "\thangup the line immediately\n" ++ ++ "--dialmode auto | manual | off\n" ++ "\tset the interface dialmode to auto, manual or off\n" ++ ++ "--hupreset no values\n" ++ "\treset the interface huptimer. Note ! You must say which\n" ++ "\tinterface ? in or out. This depends on the hook you use.\n" ++ "\tonly --hupreset will use the out interface.\n" ++ "\t--in_dev --hupreset use the in interface.\n" ++ ++ "\n", ++#ifdef DWISDN_INSTALLED ++ IPTDWISDN_REVISION, ++ IPTDWISDN_MAXOPS, ++#else ++ 0, ++ 0, ++#endif ++ NETFILTER_VERSION); ++} ++ ++ ++#ifdef DWISDN_INSTALLED ++ ++/* Initialize the traget. */ ++static void init(struct ipt_entry_target *m, unsigned int *nfcache) ++/************************************************************************ ++*************************************************************************/ ++{ ++ ++ if(m != NULL && m->data != NULL) ++ memset(m->data,0,sizeof(IPTDWISDN_INFO)); ++ ++ /* Can't cache this. */ ++ *nfcache |= NFC_UNKNOWN; ++} ++ ++ ++ ++/* Function which parses command options; returns true if it ++ ate an option */ ++ ++static int parse( int c, ++ char **argv, ++ int invert, ++ unsigned int *flags, ++ const struct ipt_entry *entry, ++ struct ipt_entry_target **target) ++/************************************************************************* ++**************************************************************************/ ++{ ++ IPTDWISDN_INFO *dw = (IPTDWISDN_INFO *)(*target)->data; ++ int idx; ++ ++ if((idx = dw->parcount) >= IPTDWISDN_MAXOPS) { ++ ++ exit_error( PARAMETER_PROBLEM, ++ "DWISDN target: to many parameters."); ++ } ++ ++ dw->revision = IPTDWISDN_REVISION; ++ dw->inst[idx] = c; ++ dw->value[idx] = 0; ++ ++ switch ((enum iptdwisdn)c) { ++ default: ++ ++ exit_error( PARAMETER_PROBLEM, ++ "DWISDN target: unkown option <%s>",optarg); ++ ++ return 0; ++ ++ case TIPT_DWISDN_DIAL: ++ case TIPT_DWISDN_HANGUP: ++ case TIPT_DWISDN_CLEAR: ++ case TIPT_DWISDN_SET: ++ case TIPT_DWISDN_UNREACH: ++ case TIPT_DWISDN_HUPRESET: ++ ++ if(check_inverse(optarg, &invert)) ++ optind++; ++ ++ if(invert) ++ exit_error( PARAMETER_PROBLEM, ++ "DWISDN target --%s: ! not allowed", ++ TIPT_dwisdn_opts[c-1].name); ++ ++ break; ++ ++ case TIPT_DWISDN_DIALMODE: ++ ++ if(check_inverse(optarg, &invert)) ++ optind++; ++ ++ if(invert) ++ exit_error( PARAMETER_PROBLEM, ++ "DWISDN target --dialmode: ! not allowed"); ++ ++ if(!strcmp(optarg,"auto")) ++ dw->value[idx] = 1; ++ else if(!strcmp(optarg,"manual")) ++ dw->value[idx] = 2; ++ else if(!strcmp(optarg,"off")) ++ dw->value[idx] = 3; ++ else { ++ ++ exit_error( PARAMETER_PROBLEM, ++ "DWISDN target --dialmode usage: auto | manual | off"); ++ } ++ ++ break; ++ } ++ ++ *flags = 1; ++ ++ if(invert) ++ dw->inst[idx] |= TIPT_DWISDN_NOT; ++ ++ dw->parcount++; ++ ++ return(1); ++} ++ ++static void final_check(unsigned int flags) ++/************************************************************************ ++*************************************************************************/ ++{ ++ ++ if(!flags) ++ exit_error( PARAMETER_PROBLEM, ++ "DWISDN target: without any option ? Why ?? :-("); ++} ++ ++ ++static void myprint(IPTDWISDN_INFO *p) ++/************************************************************************* ++*************************************************************************/ ++{ ++ int shl = 0; ++ ++ for(;shl < IPTDWISDN_MAXOPS && shl < p->parcount;shl++) { ++ ++ int inst = p->inst[shl]; ++ u_long v = p->value[shl]; ++ ++ if(inst & TIPT_DWISDN_NOT) ++ printf("! "); ++ ++ inst &= ~TIPT_DWISDN_NOT; ++ ++ printf("--%s ",TIPT_dwisdn_opts[inst-1].name); ++ ++ if(!v) ++ continue; ++ ++ switch(inst) { ++ ++ case TIPT_DWISDN_DIALMODE: ++ ++ switch(v) { ++ ++ case 1: printf("auto"); break; ++ case 2: printf("manual"); break; ++ case 3: printf("off"); break; ++ } ++ } ++ ++ printf(" "); ++ } ++} ++ ++/* Prints out the matchinfo. */ ++static void print( const struct ipt_ip *ip, ++ const struct ipt_entry_target *target, ++ int numeric) ++/************************************************************************* ++**************************************************************************/ ++{ ++ IPTDWISDN_INFO *dw = (IPTDWISDN_INFO *)target->data; ++ ++ printf("DWISDN "); ++ myprint(dw); ++} ++ ++/* Saves the union ipt_dwisdninfo in parsable form to stdout. */ ++static void save(const struct ipt_ip *ip, const struct ipt_entry_target *target) ++/*************************************************************************** ++***************************************************************************/ ++{ ++ IPTDWISDN_INFO *dw = (IPTDWISDN_INFO *)target->data; ++ myprint(dw); ++} ++ ++#else ++ ++typedef struct DUMMY_ISDN { ++ ++ long dummy[10]; ++ ++} IPTDWISDN_INFO; ++ ++ ++static struct option TIPT_dwisdn_opts[] = { ++ {0} ++}; ++ ++static void init(struct ipt_entry_target *m, unsigned int *nfcache) {} ++ ++static void final_check(unsigned int flags) ++/************************************************************************ ++*************************************************************************/ ++{ ++ exit_error( PARAMETER_PROBLEM, ++ "DWISDN target: Kernel lacks ISDN- or ISDN-IPTABLES-SUPPORT"); ++} ++ ++ ++static int parse( int c, ++ char **argv, ++ int invert, ++ unsigned int *flags, ++ const struct ipt_entry *entry, ++ struct ipt_entry_target **target) ++/************************************************************************* ++**************************************************************************/ ++{ ++ final_check(0); ++ return(0); ++} ++ ++ ++static void print( const struct ipt_ip *ip, ++ const struct ipt_entry_target *target, ++ int numeric) ++/************************************************************************* ++**************************************************************************/ ++{ } ++ ++static void save(const struct ipt_ip *ip, const struct ipt_entry_target *target) ++/*************************************************************************** ++***************************************************************************/ ++{ } ++ ++ ++#endif ++ ++static struct iptables_target DWISDN ++= { NULL, ++ "DWISDN", ++ NETFILTER_VERSION, ++ IPT_ALIGN(sizeof(IPTDWISDN_INFO)), ++ IPT_ALIGN(sizeof(IPTDWISDN_INFO)), ++ &help, ++ &init, ++ &parse, ++ &final_check, ++ &print, ++ &save, ++ TIPT_dwisdn_opts, ++}; ++ ++ ++ ++void _init(void) ++/*************************************************************************** ++***************************************************************************/ ++{ ++ register_target(&DWISDN); ++} ++ +diff -Nru --minimal isdn_userspace/libipt_ISDNDIAL.c userspace/libipt_ISDNDIAL.c +--- isdn_userspace/libipt_ISDNDIAL.c Thu Jan 1 00:00:00 1970 ++++ userspace/libipt_ISDNDIAL.c Mon Feb 5 10:56:15 2001 +@@ -0,0 +1,119 @@ ++ ++/* ++** Shared library add-on to iptables to add dwisdn matching support. ++** most parts are copied from libipt_mark.c ++** thanks for this ++*/ ++#include ++#include ++#include ++#include ++ ++#include ++#include ++ ++static struct option TIPT_ISDNDIAL_opts[] = { {0} }; ++ ++ ++/* Function which prints out usage message. */ ++static void help(void) ++{ ++ printf( ++ "ISDNDIAL v%d options: (MAX %d option's per rule) iptables-vers. %s\n" ++ "\tonly useable in nat filter on POSTROUTING hook.\n" ++ "\tit's support dynamic ip-addr's for syncppp interfaces.\n" ++ "\tfor all other interfaces this target is transparent.\n" ++ "\tif the interface is offline this target will trigger dialing\n" ++ "\tand save all frames that start a connection for later transmitt.\n" ++ "\tif the interface comes up and the new ip-addr ist set correctly,\n" ++ "\tthe save'd frames are send immediately.\n" ++ "\tNOTE:\n" ++ "\tthe best place for the ISDNDIAL target is before any\n" ++ "\tMASQUERADE target.\n" ++ "\n", ++#ifdef DWISDN_INSTALLED ++ IPTDWISDN_REVISION, ++ IPTDWISDN_MAXOPS, ++#else ++ 0, ++ 0, ++#endif ++ NETFILTER_VERSION); ++} ++ ++ ++/* Initialize the traget. */ ++static void init(struct ipt_entry_target *m, unsigned int *nfcache) ++/************************************************************************ ++*************************************************************************/ ++{ ++ *nfcache |= NFC_UNKNOWN; ++} ++ ++ ++ ++/* Function which parses command options; returns true if it ++ ate an option */ ++ ++static int parse( int c, ++ char **argv, ++ int invert, ++ unsigned int *flags, ++ const struct ipt_entry *entry, ++ struct ipt_entry_target **target) ++/************************************************************************* ++**************************************************************************/ ++{ ++ exit_error( PARAMETER_PROBLEM,"ISDNDIAL target: No options allowed"); ++ return(1); ++} ++ ++static void final_check(unsigned int flags) ++/************************************************************************ ++*************************************************************************/ ++{ ++} ++ ++ ++/* Prints out the matchinfo. */ ++static void print( const struct ipt_ip *ip, ++ const struct ipt_entry_target *target, ++ int numeric) ++/************************************************************************* ++**************************************************************************/ ++{ ++ printf("ISDNDIAL "); ++} ++ ++/* Saves the union ipt_dwisdninfo in parsable form to stdout. */ ++static void save(const struct ipt_ip *ip, const struct ipt_entry_target *target) ++/*************************************************************************** ++***************************************************************************/ ++{ ++} ++ ++ ++static struct iptables_target ISDNDIAL ++= { NULL, ++ "ISDNDIAL", ++ NETFILTER_VERSION, ++ 0, ++ 0, ++ &help, ++ &init, ++ &parse, ++ &final_check, ++ &print, ++ &save, ++ TIPT_ISDNDIAL_opts, ++}; ++ ++ ++ ++void _init(void) ++/*************************************************************************** ++***************************************************************************/ ++{ ++ register_target(&ISDNDIAL); ++} ++ +diff -Nru --minimal isdn_userspace/libipt_dwisdn.c userspace/libipt_dwisdn.c +--- isdn_userspace/libipt_dwisdn.c Thu Jan 1 00:00:00 1970 ++++ userspace/libipt_dwisdn.c Mon Feb 5 10:56:33 2001 +@@ -0,0 +1,393 @@ ++ ++ ++/* ++** Shared library add-on to iptables to add dwisdn matching support. ++** most parts are copied from libipt_mark.c ++** thanks for this ++*/ ++#include ++#include ++#include ++#include ++ ++#include ++#include ++ ++ ++#if ((CONFIG_ISDN || CONFIG_ISDN_MODULE) && \ ++ CONFIG_ISDN_WITH_ABC_IPTABLES_NETFILTER) ++ ++ ++#define IPT_ISDN_DWISDN_H_NEED_OPTS 1 ++#include ++#define DWISDN_INSTALLED 1 ++ ++#else ++#undef DWISDN_INSTALLED ++#endif ++ ++ ++ ++/* Function which prints out usage message. */ ++static void help(void) ++{ ++ printf( ++ "dwisdn v%d options: (MAX %d option's per rule) iptables-vers. %s\n" ++ "\tThe options below will be parsed from left to right\n" ++ ++ "[!] --con_stat [ o | d | c ] \n" ++ "\to == offline (not connected or dialing)\n" ++ "\td == dialing (not connected or offline)\n" ++ "\tc == connect (not dialing or offline)\n" ++ "\todc as one option are ORE'd\n" ++ "\t--con_stat cd == connected or dialing\n" ++ "\tmultiple --con_stat are AND'ed\n" ++ "\t--con_stat d --con_stat o == dialing and offline\n" ++ "\tperhaps it's never true but \n" ++ "\t--con_stat d ! --con_stat o \n" ++ "\tis sometimes true\n" ++ ++ "[!] --in_dev no values possible\n" ++ "\tuse in-interface for options follow this\n" ++ "\tdefault the kernel will use the out-interface\n" ++ "\twith ! --in_dev you can switch back to out-interface\n" ++ "\tthis is only usefull in a FORWARD or INPUT rule\n" ++ ++ "[!] --charge X ( X == numeric charge value )\n" ++ "\ttrue if the internal charge-counter >= X\n" ++ "\twith ! the rule is true if charge-counter < X\n" ++ "\ta range is possible with\n" ++ "\t--charge 25 ! --charge 50\n" ++ "\ttrue if the charge-counter >= 25 and < 50\n" ++ ++ "[!] --outgoing no values possible\n" ++ "\ttrue if the interface is dialing or connected as\n" ++ "\toutgoing call.\n" ++ "\twith ! true if the interface not dialing or \n" ++ "\tconnected as incoming call\n" ++ ++ "[!] --cbout no values possible\n" ++ "\ttrue if the interface configured for callback out\n" ++ "\twith ! the interface must be configured for callback in\n" ++ ++ "[!] --dialmode auto | manual | off\n" ++ "\ttrue if the interface configured with this dialmode\n" ++ "\t! is only the negation\n" ++ ++ "[!] --addr_ok no values possible\n" ++ "\tonly for dynip-interfaces.\n" ++ "\ttrue if the interface is online and the ip-addr is set.\n" ++ "\talways true for all other interfaces.\n" ++ ++ "[!] --f_eq_iadr no values possible\n" ++ "\tonly for dynip-interfaces.\n" ++ "\ttrue if the interface is online, ip-addr is set and\n" ++ "\tthe frame source-addr and interface-addr are equal.\n" ++ "\talways true for all other interfaces.\n" ++ "\n", ++#ifdef DWISDN_INSTALLED ++ IPTDWISDN_REVISION, ++ IPTDWISDN_MAXOPS, ++#else ++ 0, ++ 0, ++#endif ++ NETFILTER_VERSION); ++} ++ ++ ++#ifdef DWISDN_INSTALLED ++ ++/* Initialize the match. */ ++static void init(struct ipt_entry_match *m, unsigned int *nfcache) ++/************************************************************************ ++*************************************************************************/ ++{ ++ ++ if(m != NULL && m->data != NULL) ++ memset(m->data,0,sizeof(IPTDWISDN_INFO)); ++ ++ /* Can't cache this. */ ++ *nfcache |= NFC_UNKNOWN; ++} ++ ++ ++ ++/* Function which parses command options; returns true if it ++ ate an option */ ++ ++static int parse( int c, ++ char **argv, ++ int invert, ++ unsigned int *flags, ++ const struct ipt_entry *entry, ++ unsigned int *nfcache, ++ struct ipt_entry_match **match) ++/************************************************************************* ++**************************************************************************/ ++{ ++ IPTDWISDN_INFO *dw = (IPTDWISDN_INFO *)(*match)->data; ++ char *p = NULL; ++ int idx; ++ ++ if((idx = dw->parcount) >= IPTDWISDN_MAXOPS) { ++ ++ exit_error( PARAMETER_PROBLEM, ++ "dwisdn match: to many parameters."); ++ } ++ ++ dw->revision = IPTDWISDN_REVISION; ++ dw->inst[idx] = c; ++ dw->value[idx] = 0; ++ ++ switch ((enum iptdwisdn)c) { ++ default: return 0; ++ ++ case IPT_DWISDN_DIALMODE: ++ ++ if(check_inverse(optarg, &invert)) ++ optind++; ++ ++ if(!strcmp(optarg,"auto")) ++ dw->value[idx] = 1; ++ else if(!strcmp(optarg,"manual")) ++ dw->value[idx] = 2; ++ else if(!strcmp(optarg,"off")) ++ dw->value[idx] = 3; ++ else { ++ ++ exit_error( PARAMETER_PROBLEM, ++ "dwisdn match --dialmode usage: auto | manual | off"); ++ } ++ ++ break; ++ ++ case IPT_DWISDN_CBOUT: ++ case IPT_DWISDN_IDEV: ++ case IPT_DWISDN_ADDROK: ++ case IPT_DWISDN_OUTGOING: ++ case IPT_DWISDN_FEQIADR: ++ ++ if(check_inverse(optarg, &invert)) ++ optind++; ++ ++ break; ++ ++ case IPT_DWISDN_CHARGE: ++ ++ if(check_inverse(optarg, &invert)) ++ optind++; ++ ++ for(p = (char *)optarg; *p; p++) { ++ ++ if(*p < '0' || *p > '9') { ++ ++ exit_error( PARAMETER_PROBLEM, ++ "dwisdn match --charge x ( x must be nemueric )"); ++ } ++ } ++ ++ dw->value[idx] = atol(optarg); ++ break; ++ ++ case IPT_DWISDN_CON: ++ ++ if(check_inverse(optarg, &invert)) ++ optind++; ++ ++ for(p = (char *)optarg; *p; p++) { ++ ++ switch(*p) { ++ ++ default: ++ ++ exit_error( PARAMETER_PROBLEM, ++ "dwisdn match con_stat: Option %c unknown",*p); ++ ++ case ' ': ++ case '\t': continue; ++ ++ case 'O': ++ case 'o': ++ ++ dw->value[idx] |= IPTCS_DWISN_OFFL; ++ break; ++ ++ case 'D': ++ case 'd': ++ ++ dw->value[idx] |= IPTCS_DWISN_DIAL; ++ break; ++ ++ case 'C': ++ case 'c': ++ ++ dw->value[idx] |= IPTCS_DWISN_ONL; ++ break; ++ } ++ } ++ } ++ ++ *flags = 1; ++ ++ if(invert) ++ dw->inst[idx] |= IPT_DWISDN_NOT; ++ ++ dw->parcount++; ++ ++ return(1); ++} ++ ++static void final_check(unsigned int flags) ++/************************************************************************ ++*************************************************************************/ ++{ } ++ ++ ++static void myprint(IPTDWISDN_INFO *p) ++/************************************************************************* ++*************************************************************************/ ++{ ++ int shl = 0; ++ ++ for(;shl < IPTDWISDN_MAXOPS && shl < p->parcount;shl++) { ++ ++ int inst = p->inst[shl]; ++ u_long v = p->value[shl]; ++ ++ if(inst & IPT_DWISDN_NOT) ++ printf("! "); ++ ++ inst &= ~IPT_DWISDN_NOT; ++ ++ printf("--%s ",IPT_dwisdn_opts[inst-1].name); ++ ++ if(!v) ++ continue; ++ ++ switch(inst) { ++ ++ case IPT_DWISDN_CHARGE: ++ ++ printf("%lu",v); ++ break; ++ ++ case IPT_DWISDN_CON: ++ ++ if(v & IPTCS_DWISN_OFFL) ++ printf("o"); ++ ++ if(v & IPTCS_DWISN_DIAL) ++ printf("d"); ++ ++ if(v & IPTCS_DWISN_ONL) ++ printf("c"); ++ ++ break; ++ } ++ ++ printf(" "); ++ } ++} ++ ++/* Prints out the matchinfo. */ ++static void print( const struct ipt_ip *ip, ++ const struct ipt_entry_match *match, ++ int numeric) ++/************************************************************************* ++**************************************************************************/ ++{ ++ IPTDWISDN_INFO *dw = (IPTDWISDN_INFO *)match->data; ++ ++ printf("dwisdn "); ++ myprint(dw); ++} ++ ++/* Saves the union ipt_dwisdninfo in parsable form to stdout. */ ++static void save(const struct ipt_ip *ip, const struct ipt_entry_match *match) ++/*************************************************************************** ++***************************************************************************/ ++{ ++ IPTDWISDN_INFO *dw = (IPTDWISDN_INFO *)match->data; ++ myprint(dw); ++} ++ ++#else ++ ++typedef struct DUMMY_ISDN { ++ ++ long dummy[10]; ++ ++} IPTDWISDN_INFO; ++ ++ ++static struct option IPT_dwisdn_opts[] = { ++ {0} ++}; ++ ++static void init(struct ipt_entry_match *m, unsigned int *nfcache) {} ++ ++static void final_check(unsigned int flags) ++/************************************************************************ ++*************************************************************************/ ++{ ++ exit_error( PARAMETER_PROBLEM, ++ "dwisdn: Kernel lacks ISDN- or ISDN-IPTABLES-SUPPORT"); ++} ++ ++ ++static int parse( int c, ++ char **argv, ++ int invert, ++ unsigned int *flags, ++ const struct ipt_entry *entry, ++ unsigned int *nfcache, ++ struct ipt_entry_match **match) ++/************************************************************************* ++**************************************************************************/ ++{ ++ final_check(0); ++ return(0); ++} ++ ++ ++static void print( const struct ipt_ip *ip, ++ const struct ipt_entry_match *match, ++ int numeric) ++/************************************************************************* ++**************************************************************************/ ++{ } ++ ++static void save(const struct ipt_ip *ip, const struct ipt_entry_match *match) ++/*************************************************************************** ++***************************************************************************/ ++{ } ++ ++ ++#endif ++ ++ ++struct iptables_match dwisdn ++= { NULL, ++ "dwisdn", ++ NETFILTER_VERSION, ++ IPT_ALIGN(sizeof(IPTDWISDN_INFO)), ++ IPT_ALIGN(sizeof(IPTDWISDN_INFO)), ++ &help, ++ &init, ++ &parse, ++ &final_check, ++ &print, ++ &save, ++ IPT_dwisdn_opts, ++}; ++ ++ ++ ++void _init(void) ++/*************************************************************************** ++***************************************************************************/ ++{ ++ register_match(&dwisdn); ++} ++