1
0
mirror of git://projects.qi-hardware.com/openwrt-xburst.git synced 2024-11-26 01:34:40 +02:00

Updated libpcap to 0.9.4, tcpdump to 3.9.4

git-svn-id: svn://svn.openwrt.org/openwrt/trunk@3139 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
florian 2006-02-05 17:30:49 +00:00
parent e659c3738a
commit 732d131e00
6 changed files with 52 additions and 47 deletions

View File

@ -3,9 +3,9 @@
include $(TOPDIR)/rules.mk include $(TOPDIR)/rules.mk
PKG_NAME:=libpcap PKG_NAME:=libpcap
PKG_VERSION:=0.8.3 PKG_VERSION:=0.9.4
PKG_RELEASE:=2 PKG_RELEASE:=1
PKG_MD5SUM:=56a9d4615d8354fcfe8cff8c8443c77b PKG_MD5SUM:=79025766e8027df154cb1f32de8a7974
PKG_SOURCE_URL:=http://www.tcpdump.org/release/ PKG_SOURCE_URL:=http://www.tcpdump.org/release/
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz

View File

@ -1,12 +1,13 @@
--- libpcap-0.8.3-orig/Makefile.in 2003-12-15 02:42:23.000000000 +0100 diff -urN libpcap-0.9.4.orig/Makefile.in libpcap-0.9.4/Makefile.in
+++ libpcap-0.8.3-7/Makefile.in 2005-03-08 03:38:22.000000000 +0100 --- libpcap-0.9.4.orig/Makefile.in 2003-12-15 02:35:03.000000000 +0100
+++ libpcap-0.9.4/Makefile.in 2006-02-05 16:56:18.000000000 +0100
@@ -37,6 +37,15 @@ @@ -37,6 +37,15 @@
srcdir = @srcdir@ srcdir = @srcdir@
VPATH = @srcdir@ VPATH = @srcdir@
+# some defines for shared library compilation +# some defines for shared library compilation
+MAJ=0.8 +MAJ=0.9
+MIN=3 +MIN=4
+VERSION=$(MAJ).$(MIN) +VERSION=$(MAJ).$(MIN)
+LIBNAME=pcap +LIBNAME=pcap
+LIBRARY=lib$(LIBNAME).a +LIBRARY=lib$(LIBNAME).a
@ -16,7 +17,7 @@
# #
# You shouldn't need to edit anything below. # You shouldn't need to edit anything below.
# #
@@ -49,6 +58,7 @@ @@ -50,6 +59,7 @@
# Standard CFLAGS # Standard CFLAGS
CFLAGS = $(CCOPT) $(INCLS) $(DEFS) CFLAGS = $(CCOPT) $(INCLS) $(DEFS)
@ -24,20 +25,20 @@
INSTALL = @INSTALL@ INSTALL = @INSTALL@
INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_PROGRAM = @INSTALL_PROGRAM@
@@ -68,7 +78,11 @@ @@ -70,7 +80,12 @@
# problem if you don't own the file but can write to the directory.
.c.o: .c.o:
@rm -f $@ @rm -f $@
- $(CC) $(CFLAGS) -c $(srcdir)/$*.c $(CC) $(CFLAGS) -c $(srcdir)/$*.c
+ $(CC) $(CFLAGS) -c -o $@ $(srcdir)/$*.c + $(CC) $(CFLAGS) -c -o $@ $(srcdir)/$*.c
+
+%_pic.o: %.c +%_pic.o: %.c
+ @rm -f $@ + @rm -f $@
+ $(CC) -fPIC $(CFLAGS) -c -o $@ $(srcdir)/$*.c + $(CC) -fPIC $(CFLAGS) -c -o $@ $(srcdir)/$*.c
+
PSRC = pcap-@V_PCAP@.c PSRC = pcap-@V_PCAP@.c
FSRC = fad-@V_FINDALLDEVS@.c FSRC = fad-@V_FINDALLDEVS@.c
@@ -83,6 +97,7 @@ SSRC = @SSRC@
@@ -84,6 +99,7 @@
# We would like to say "OBJ = $(SRC:.c=.o)" but Ultrix's make cannot # We would like to say "OBJ = $(SRC:.c=.o)" but Ultrix's make cannot
# hack the extra indirection # hack the extra indirection
OBJ = $(PSRC:.c=.o) $(FSRC:.c=.o) $(CSRC:.c=.o) $(SSRC:.c=.o) $(GENSRC:.c=.o) $(LIBOBJS) OBJ = $(PSRC:.c=.o) $(FSRC:.c=.o) $(CSRC:.c=.o) $(SSRC:.c=.o) $(GENSRC:.c=.o) $(LIBOBJS)
@ -45,7 +46,7 @@
HDR = pcap.h pcap-int.h pcap-namedb.h pcap-nit.h pcap-pf.h \ HDR = pcap.h pcap-int.h pcap-namedb.h pcap-nit.h pcap-pf.h \
ethertype.h gencode.h gnuc.h ethertype.h gencode.h gnuc.h
GENHDR = \ GENHDR = \
@@ -94,15 +109,22 @@ @@ -95,15 +111,23 @@
TAGFILES = \ TAGFILES = \
$(SRC) $(HDR) $(TAGHDR) $(SRC) $(HDR) $(TAGHDR)
@ -67,20 +68,22 @@
+ ln -s $(SHAREDLIB) $(SOLIBRARY).$(MAJ) + ln -s $(SHAREDLIB) $(SOLIBRARY).$(MAJ)
+ ln -s $(SOLIBRARY).$(MAJ) $(SOLIBRARY) + ln -s $(SOLIBRARY).$(MAJ) $(SOLIBRARY)
+ +
scanner.c: $(srcdir)/scanner.l +
@rm -f $@ shared: libpcap.$(DYEXT)
$(LEX) -t $< > $$$$.$@; mv $$$$.$@ $@
@@ -110,6 +132,9 @@ #
@@ -129,6 +153,10 @@
scanner.o: scanner.c tokdefs.h scanner.o: scanner.c tokdefs.h
$(CC) $(CFLAGS) -c scanner.c $(CC) $(CFLAGS) -c scanner.c
+scanner_pic.o: scanner.c tokdefs.h +scanner_pic.o: scanner.c tokdefs.h
+ $(CC) -fPIC $(CFLAGS) -o $@ -c scanner.c + $(CC) -fPIC $(CFLAGS) -o $@ -c scanner.c
+
+ +
pcap.o: version.h pcap.o: version.h
tokdefs.h: grammar.c tokdefs.h: grammar.c
@@ -123,9 +148,17 @@ @@ -142,9 +170,16 @@
@rm -f $@ @rm -f $@
$(CC) $(CFLAGS) -Dyylval=pcap_lval -c grammar.c $(CC) $(CFLAGS) -Dyylval=pcap_lval -c grammar.c
@ -93,19 +96,19 @@
+version_pic.o: version.c +version_pic.o: version.c
+ $(CC) -fPIC $(CFLAGS) -c version.c -o $@ + $(CC) -fPIC $(CFLAGS) -c version.c -o $@
+
+ +
snprintf.o: $(srcdir)/missing/snprintf.c snprintf.o: $(srcdir)/missing/snprintf.c
$(CC) $(CFLAGS) -o $@ -c $(srcdir)/missing/snprintf.c $(CC) $(CFLAGS) -o $@ -c $(srcdir)/missing/snprintf.c
@@ -151,10 +184,16 @@ @@ -170,10 +205,17 @@
bpf_filter.o: bpf_filter.c bpf_filter.o: bpf_filter.c
$(CC) $(CFLAGS) -c bpf_filter.c $(CC) $(CFLAGS) -c bpf_filter.c
+bpf_filter_pic.o: bpf_filter.c +bpf_filter_pic.o: bpf_filter.c
+ $(CC) -fPIC $(CFLAGS) -c bpf_filter.c -o $@ + $(CC) -fPIC $(CFLAGS) -c bpf_filter.c -o $@
+ +
install: +
install: libpcap.a
[ -d $(DESTDIR)$(libdir) ] || \ [ -d $(DESTDIR)$(libdir) ] || \
(mkdir -p $(DESTDIR)$(libdir); chmod 755 $(DESTDIR)$(libdir)) (mkdir -p $(DESTDIR)$(libdir); chmod 755 $(DESTDIR)$(libdir))
$(INSTALL_DATA) libpcap.a $(DESTDIR)$(libdir)/libpcap.a $(INSTALL_DATA) libpcap.a $(DESTDIR)$(libdir)/libpcap.a

View File

@ -1,6 +1,7 @@
--- libpcap-0.8.3/Makefile.in.orig 2005-01-17 19:04:41.291056960 -0500 diff -urN libpcap-0.9.4.orig/Makefile.in libpcap-0.9.4/Makefile.in
+++ libpcap-0.8.3/Makefile.in 2005-01-17 19:04:47.836061968 -0500 --- libpcap-0.9.4.orig/Makefile.in 2006-02-05 16:57:16.000000000 +0100
@@ -100,7 +100,7 @@ +++ libpcap-0.9.4/Makefile.in 2006-02-05 16:57:03.000000000 +0100
@@ -117,7 +117,7 @@
libpcap.a: $(OBJ) libpcap.a: $(OBJ)
@rm -f $@ @rm -f $@
@ -8,4 +9,4 @@
+ $(AR) rc $@ $(OBJ) $(LIBS) + $(AR) rc $@ $(OBJ) $(LIBS)
$(RANLIB) $@ $(RANLIB) $@
scanner.c: $(srcdir)/scanner.l $(SHAREDLIB): $(OBJ_PIC)

View File

@ -1,6 +1,7 @@
--- libpcap-0.8.3-orig/nametoaddr.c 2003-11-19 19:13:48.000000000 +0100 diff -urN libpcap-0.9.4.orig/nametoaddr.c libpcap-0.9.4/nametoaddr.c
+++ libpcap-0.8.3-7/nametoaddr.c 2005-03-08 03:38:22.000000000 +0100 --- libpcap-0.9.4.orig/nametoaddr.c 2005-04-20 13:13:51.000000000 +0200
@@ -333,7 +333,7 @@ +++ libpcap-0.9.4/nametoaddr.c 2006-02-05 16:58:46.000000000 +0100
@@ -410,7 +410,7 @@
e = ep = (u_char *)malloc(6); e = ep = (u_char *)malloc(6);
while (*s) { while (*s) {
@ -9,17 +10,18 @@
s += 1; s += 1;
d = xdtoi(*s++); d = xdtoi(*s++);
if (isxdigit((unsigned char)*s)) { if (isxdigit((unsigned char)*s)) {
--- libpcap-0.8.3-orig/scanner.l 2004-03-28 23:45:33.000000000 +0200 diff -urN libpcap-0.9.4.orig/scanner.l libpcap-0.9.4/scanner.l
+++ libpcap-0.8.3-7/scanner.l 2005-03-08 03:38:22.000000000 +0100 --- libpcap-0.9.4.orig/scanner.l 2005-09-05 11:08:07.000000000 +0200
+++ libpcap-0.9.4/scanner.l 2006-02-05 17:00:13.000000000 +0100
@@ -80,6 +80,7 @@ @@ -80,6 +80,7 @@
N ([0-9]+|(0X|0x)[0-9A-Fa-f]+) N ([0-9]+|(0X|0x)[0-9A-Fa-f]+)
B ([0-9A-Fa-f][0-9A-Fa-f]?) B ([0-9A-Fa-f][0-9A-Fa-f]?)
W ([0-9A-Fa-f][0-9A-Fa-f]?[0-9A-Fa-f]?[0-9A-Fa-f]?) W ([0-9A-Fa-f][0-9A-Fa-f]?[0-9A-Fa-f]?[0-9A-Fa-f]?)
+X [0-9A-Fa-f] +X [0-9A-Fa-f]
%a 16000 %a 16000
%o 19000 %o 19000
@@ -296,7 +297,7 @@ @@ -306,7 +307,7 @@
{N} { yylval.i = stoi((char *)yytext); return NUM; } {N} { yylval.i = stoi((char *)yytext); return NUM; }
({N}\.{N})|({N}\.{N}\.{N})|({N}\.{N}\.{N}\.{N}) { ({N}\.{N})|({N}\.{N}\.{N})|({N}\.{N}\.{N}\.{N}) {
yylval.s = sdup((char *)yytext); return HID; } yylval.s = sdup((char *)yytext); return HID; }
@ -28,12 +30,11 @@
return EID; } return EID; }
{V6} { {V6} {
#ifdef INET6 #ifdef INET6
@@ -314,6 +315,8 @@ @@ -324,6 +325,7 @@
#endif /*INET6*/ #endif /*INET6*/
} }
{B}:+({B}:+)+ { bpf_error("bogus ethernet address %s", yytext); } {B}:+({B}:+)+ { bpf_error("bogus ethernet address %s", yytext); }
+{X}{12} { yylval.e = pcap_ether_aton((char *)yytext); return EID;} +{X}{12} { yylval.e = pcap_ether_aton((char *)yytext); return EID;}
+
icmptype { yylval.i = 0; return NUM; } icmptype { yylval.i = 0; return NUM; }
icmpcode { yylval.i = 1; return NUM; } icmpcode { yylval.i = 1; return NUM; }
icmp-echoreply { yylval.i = 0; return NUM; } icmp-echoreply { yylval.i = 0; return NUM; }

View File

@ -3,9 +3,9 @@
include $(TOPDIR)/rules.mk include $(TOPDIR)/rules.mk
PKG_NAME:=tcpdump PKG_NAME:=tcpdump
PKG_VERSION:=3.8.3 PKG_VERSION:=3.9.4
PKG_RELEASE:=1 PKG_RELEASE:=1
PKG_MD5SUM:=30645001f4b97019677cad88d3811904 PKG_MD5SUM:=4b64755bbc8ba1af49c747271a6df5b8
PKG_SOURCE_URL:=http://www.tcpdump.org/release/ \ PKG_SOURCE_URL:=http://www.tcpdump.org/release/ \
http://ftp.gwdg.de/pub/misc/tcpdump/ \ http://ftp.gwdg.de/pub/misc/tcpdump/ \

View File

@ -1,8 +1,8 @@
diff -urN tcpdump-3.8.3.old/tcpdump.c tcpdump-3.8.3.dev/tcpdump.c diff -urN tcpdump-3.9.4.orig/tcpdump.c tcpdump-3.9.4/tcpdump.c
--- tcpdump-3.8.3.old/tcpdump.c 2004-03-17 20:47:48.000000000 +0100 --- tcpdump-3.9.4.orig/tcpdump.c 2005-08-23 12:29:41.000000000 +0200
+++ tcpdump-3.8.3.dev/tcpdump.c 2005-04-29 00:53:20.000000000 +0200 +++ tcpdump-3.9.4/tcpdump.c 2006-02-05 17:52:37.000000000 +0100
@@ -596,20 +596,6 @@ @@ -762,20 +762,6 @@
error("invalid data link type %s", dlt_name); error("invalid data link type %s", gndo->ndo_dltname);
break; break;
-#if defined(HAVE_PCAP_DEBUG) || defined(HAVE_YYDEBUG) -#if defined(HAVE_PCAP_DEBUG) || defined(HAVE_YYDEBUG)
@ -19,6 +19,6 @@ diff -urN tcpdump-3.8.3.old/tcpdump.c tcpdump-3.8.3.dev/tcpdump.c
- } - }
- break; - break;
-#endif -#endif
default: case 'Z':
usage(); if (optarg) {
/* NOTREACHED */ username = strdup(optarg);