diff options
author | darrenr <darrenr@FreeBSD.org> | 2000-05-24 02:14:22 +0000 |
---|---|---|
committer | darrenr <darrenr@FreeBSD.org> | 2000-05-24 02:14:22 +0000 |
commit | dda6755c7b3b3b5d3e9111b7d0c39a7d8b5f3e12 (patch) | |
tree | 8658a81b1c1fcbbbec3b1df568cc198dd98d44ee /contrib/ipfilter/iplang | |
parent | 1fa4f6782a7e92a232e56892d8bce7920d49292e (diff) | |
download | FreeBSD-src-dda6755c7b3b3b5d3e9111b7d0c39a7d8b5f3e12.zip FreeBSD-src-dda6755c7b3b3b5d3e9111b7d0c39a7d8b5f3e12.tar.gz |
Import IP Filter 3.4.4 into FreeBSD-current
Diffstat (limited to 'contrib/ipfilter/iplang')
-rw-r--r-- | contrib/ipfilter/iplang/Makefile | 17 | ||||
-rw-r--r-- | contrib/ipfilter/iplang/iplang_l.l | 36 | ||||
-rw-r--r-- | contrib/ipfilter/iplang/iplang_y.y | 2 |
3 files changed, 29 insertions, 26 deletions
diff --git a/contrib/ipfilter/iplang/Makefile b/contrib/ipfilter/iplang/Makefile index 4537e8d..32ae8e3 100644 --- a/contrib/ipfilter/iplang/Makefile +++ b/contrib/ipfilter/iplang/Makefile @@ -6,13 +6,13 @@ #CC=gcc -Wuninitialized -Wstrict-prototypes -Werror -O CFLAGS=-I.. -all: $(DESTDIR)/y.tab.o $(DESTDIR)/lex.yy.o y.tab.o lex.yy.o +all: $(DESTDIR)/y.tab.o $(DESTDIR)/lex.yy.o -$(DESTDIR)/y.tab.o: y.tab.c - $(CC) $(DEBUG) -I. -I.. -I../ipsend $(CFLAGS) $(LINUX) -c y.tab.c -o $@ +$(DESTDIR)/y.tab.o: $(DESTDIR)/y.tab.c + $(CC) $(DEBUG) -I. -I.. -I$(DESTDIR) -I../ipsend $(CFLAGS) $(LINUX) -c $(DESTDIR)/y.tab.c -o $@ -$(DESTDIR)/lex.yy.o: lex.yy.c - $(CC) $(DEBUG) -I. -I.. -I../ipsend $(CFLAGS) $(LINUX) -c lex.yy.c -o $@ +$(DESTDIR)/lex.yy.o: $(DESTDIR)/lex.yy.c + $(CC) $(DEBUG) -I. -I.. -I$(DESTDIR) -I../ipsend $(CFLAGS) $(LINUX) -c $(DESTDIR)/lex.yy.c -o $@ y.tab.o: y.tab.c $(CC) $(DEBUG) -I. -I.. -I../ipsend $(CFLAGS) $(LINUX) -c y.tab.c -o $@ @@ -20,11 +20,14 @@ y.tab.o: y.tab.c lex.yy.o: lex.yy.c $(CC) $(DEBUG) -I. -I.. -I../ipsend $(CFLAGS) $(LINUX) -c lex.yy.c -o $@ -lex.yy.c: iplang_l.l y.tab.h +$(DESTDIR)/lex.yy.c: iplang_l.l $(DESTDIR)/y.tab.h lex iplang_l.l + mv lex.yy.c $(DESTDIR) -y.tab.c y.tab.h: iplang_y.y +$(DESTDIR)/y.tab.c $(DESTDIR)/y.tab.h: iplang_y.y yacc -d iplang_y.y + mv y.tab.c $(DESTDIR) + mv y.tab.h $(DESTDIR) clean: /bin/rm -f *.o lex.yy.c y.tab.c y.tab.h diff --git a/contrib/ipfilter/iplang/iplang_l.l b/contrib/ipfilter/iplang/iplang_l.l index 36a4ec8..4139792 100644 --- a/contrib/ipfilter/iplang/iplang_l.l +++ b/contrib/ipfilter/iplang/iplang_l.l @@ -6,7 +6,7 @@ * provided that this notice is preserved and due credit is given * to the original author and the contributors. * - * $Id: iplang_l.l,v 2.1 1999/08/04 17:30:53 darrenr Exp $ + * $Id: iplang_l.l,v 2.2 2000/02/18 00:18:05 darrenr Exp $ */ #include <stdio.h> #include <string.h> @@ -31,7 +31,7 @@ extern int opts; -int lineNum = 0, proto = 0, oldproto = 0, next = -1, laststate = 0; +int lineNum = 0, ipproto = 0, oldipproto = 0, next = -1, laststate = 0; int *prstack = NULL, numpr = 0, state = 0, token = 0; void yyerror __P((char *)); @@ -197,14 +197,14 @@ void push_proto() prstack = (int *)malloc(sizeof(int)); else prstack = (int *)realloc((char *)prstack, numpr * sizeof(int)); - prstack[numpr - 1] = oldproto; + prstack[numpr - 1] = oldipproto; } void pop_proto() { numpr--; - proto = prstack[numpr]; + ipproto = prstack[numpr]; if (!numpr) { free(prstack); prstack = NULL; @@ -262,45 +262,45 @@ int nstate, fornext; case IL_DATA : case IL_INTERFACE : case IL_ARP : - oldproto = proto; - proto = nstate; + oldipproto = ipproto; + ipproto = nstate; break; case IL_SUM : - if (proto == IL_IPV4) + if (ipproto == IL_IPV4) nstate = IL_V4SUM; - else if (proto == IL_TCP) + else if (ipproto == IL_TCP) nstate = IL_TCPSUM; - else if (proto == IL_UDP) + else if (ipproto == IL_UDP) nstate = IL_UDPSUM; break; case IL_OPT : - if (proto == IL_IPV4) + if (ipproto == IL_IPV4) nstate = IL_V4OPT; - else if (proto == IL_TCP) + else if (ipproto == IL_TCP) nstate = IL_TCPOPT; break; case IL_IPO_NOP : - if (proto == IL_TCP) + if (ipproto == IL_TCP) nstate = IL_TCPO_NOP; break; case IL_IPO_EOL : - if (proto == IL_TCP) + if (ipproto == IL_TCP) nstate = IL_TCPO_EOL; break; case IL_IPO_TS : - if (proto == IL_TCP) + if (ipproto == IL_TCP) nstate = IL_TCPO_TS; break; case IL_OFF : - if (proto == IL_IPV4) + if (ipproto == IL_IPV4) nstate = IL_V4OFF; - else if (proto == IL_TCP) + else if (ipproto == IL_TCP) nstate = IL_TCPOFF; break; case IL_LEN : - if (proto == IL_IPV4) + if (ipproto == IL_IPV4) nstate = IL_V4LEN; - else if (proto == IL_UDP) + else if (ipproto == IL_UDP) nstate = IL_UDPLEN; break; } diff --git a/contrib/ipfilter/iplang/iplang_y.y b/contrib/ipfilter/iplang/iplang_y.y index 2c71b15..95f3419 100644 --- a/contrib/ipfilter/iplang/iplang_y.y +++ b/contrib/ipfilter/iplang/iplang_y.y @@ -6,7 +6,7 @@ * provided that this notice is preserved and due credit is given * to the original author and the contributors. * - * $Id: iplang_y.y,v 2.1.2.1 1999/11/21 11:05:09 darrenr Exp $ + * $Id: iplang_y.y,v 2.2 1999/12/04 03:37:04 darrenr Exp $ */ #include <stdio.h> |