From: Gabor Juhos Date: Thu, 16 Feb 2012 11:58:29 +0000 (+0000) Subject: packages: tcpdump: new upstream release 4.2.1 X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=5bffebd0f9bd5ad2db694ad4b7aec6473560b3db;p=openwrt%2Fsvn-archive%2Fpackages.git packages: tcpdump: new upstream release 4.2.1 Signed-off-by: Gabriel Kerneis SVN-Revision: 30579 --- diff --git a/net/tcpdump/Makefile b/net/tcpdump/Makefile index ec6703be4..0e76c58b8 100644 --- a/net/tcpdump/Makefile +++ b/net/tcpdump/Makefile @@ -8,15 +8,15 @@ include $(TOPDIR)/rules.mk PKG_NAME:=tcpdump -PKG_VERSION:=4.1.1 -PKG_RELEASE:=2 +PKG_VERSION:=4.2.1 +PKG_RELEASE:=1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=http://www.tcpdump.org/release/ \ http://ftp.gwdg.de/pub/misc/tcpdump/ \ http://www.at.tcpdump.org/ \ http://www.br.tcpdump.org/ -PKG_MD5SUM:=d0dd58bbd6cd36795e05c6f1f74420b0 +PKG_MD5SUM:=c202878c6db054767b52651041b9e60e PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION) diff --git a/net/tcpdump/patches/001-remove_pcap_debug.patch b/net/tcpdump/patches/001-remove_pcap_debug.patch index b67c43428..14d1b84e7 100644 --- a/net/tcpdump/patches/001-remove_pcap_debug.patch +++ b/net/tcpdump/patches/001-remove_pcap_debug.patch @@ -1,6 +1,6 @@ --- a/tcpdump.c +++ b/tcpdump.c -@@ -901,20 +901,6 @@ main(int argc, char **argv) +@@ -982,20 +982,6 @@ main(int argc, char **argv) error("invalid data link type %s", gndo->ndo_dltname); break; diff --git a/net/tcpdump/patches/002-remove_static_libpcap_check.patch b/net/tcpdump/patches/002-remove_static_libpcap_check.patch index 0bffaabec..8ab54aa6b 100644 --- a/net/tcpdump/patches/002-remove_static_libpcap_check.patch +++ b/net/tcpdump/patches/002-remove_static_libpcap_check.patch @@ -1,6 +1,6 @@ --- a/configure +++ b/configure -@@ -9440,28 +9440,6 @@ echo "${ECHO_T}Using $pfopen" >&6; } +@@ -7130,28 +7130,6 @@ echo "${ECHO_T}Using $pfopen" >&6; } LIBS="$LIBS $pfopen" fi fi @@ -29,10 +29,15 @@ # # Look for pcap-config. # -@@ -9580,40 +9558,6 @@ fi - echo "$as_me: error: see the INSTALL doc for more info" >&2;} - { (exit 1); exit 1; }; } - fi +@@ -7335,45 +7313,6 @@ if test $ac_cv_lib_pcap_main = yes; then + libpcap="-lpcap" + fi + +- if test $libpcap = FAIL ; then +- { { echo "$as_me:$LINENO: error: see the INSTALL doc for more info" >&5 +-echo "$as_me: error: see the INSTALL doc for more info" >&2;} +- { (exit 1); exit 1; }; } +- fi - { echo "$as_me:$LINENO: checking for extraneous pcap header directories" >&5 -echo $ECHO_N "checking for extraneous pcap header directories... $ECHO_C" >&6; } - if test \( ! -r /usr/local/include/pcap.h \) -a \ diff --git a/net/tcpdump/patches/004-fix_3g_iface.patch b/net/tcpdump/patches/004-fix_3g_iface.patch index cd101843e..35d105fa5 100644 --- a/net/tcpdump/patches/004-fix_3g_iface.patch +++ b/net/tcpdump/patches/004-fix_3g_iface.patch @@ -8,7 +8,7 @@ #ifndef WIN32 #include #include -@@ -566,6 +567,7 @@ main(int argc, char **argv) +@@ -625,6 +626,7 @@ main(int argc, char **argv) #ifdef HAVE_PCAP_FINDALLDEVS pcap_if_t *devpointer; int devnum; @@ -16,7 +16,7 @@ #endif int status; #ifdef WIN32 -@@ -708,7 +710,8 @@ main(int argc, char **argv) +@@ -775,7 +777,8 @@ main(int argc, char **argv) * It can be useful on Windows, where more than * one interface can have the same name. */ diff --git a/net/tcpdump/patches/100-tcpdump_mini.patch b/net/tcpdump/patches/100-tcpdump_mini.patch index 6d4403e51..d9537c426 100644 --- a/net/tcpdump/patches/100-tcpdump_mini.patch +++ b/net/tcpdump/patches/100-tcpdump_mini.patch @@ -1,58 +1,29 @@ --- a/Makefile.in +++ b/Makefile.in -@@ -68,34 +68,38 @@ RANLIB = @RANLIB@ +@@ -68,6 +68,22 @@ RANLIB = @RANLIB@ + @rm -f $@ + $(CC) $(FULL_CFLAGS) -c $(srcdir)/$*.c - CSRC = addrtoname.c af.c checksum.c cpack.c gmpls.c oui.c gmt2local.c ipproto.c \ - nlpid.c l2vpn.c machdep.c parsenfsfh.c \ -- print-802_11.c print-ap1394.c print-ah.c print-arcnet.c \ -- print-aodv.c print-arp.c print-ascii.c print-atalk.c print-atm.c \ -- print-beep.c print-bfd.c print-bgp.c print-bootp.c print-bt.c \ -- print-cdp.c print-cfm.c print-chdlc.c print-cip.c print-cnfp.c \ -- print-dccp.c print-decnet.c \ -- print-domain.c print-dtp.c print-dvmrp.c print-enc.c print-egp.c \ -- print-eap.c print-eigrp.c\ -- print-esp.c print-ether.c print-fddi.c print-fr.c \ -- print-gre.c print-hsrp.c print-icmp.c print-igmp.c \ -- print-igrp.c print-ip.c print-ipcomp.c print-ipfc.c print-ipnet.c \ -- print-ipx.c print-isoclns.c print-juniper.c print-krb.c \ -- print-l2tp.c print-lane.c print-ldp.c print-lldp.c print-llc.c \ -- print-lmp.c print-lspping.c print-lwapp.c \ -- print-lwres.c print-mobile.c print-mpcp.c print-mpls.c print-msdp.c \ ++ifdef TCPDUMP_MINI ++ ++CSRC = addrtoname.c af.c checksum.c cpack.c gmpls.c oui.c gmt2local.c ipproto.c \ ++ nlpid.c l2vpn.c machdep.c parsenfsfh.c in_cksum.c \ + print-802_11.c print-aodv.c print-arp.c print-ascii.c \ + print-bgp.c print-bootp.c print-cdp.c print-domain.c print-eap.c print-ether.c \ + print-gre.c print-icmp.c print-igmp.c print-ip.c \ + print-l2tp.c print-lldp.c print-llc.c \ - print-nfs.c print-ntp.c print-null.c print-olsr.c print-ospf.c \ -- print-pgm.c print-pim.c print-ppp.c print-pppoe.c print-pptp.c \ -- print-radius.c print-raw.c print-rip.c print-rrcp.c print-rsvp.c \ -- print-rx.c print-sctp.c print-sflow.c print-sip.c print-sl.c print-sll.c \ -- print-slow.c print-snmp.c print-stp.c print-sunatm.c print-sunrpc.c \ -- print-symantec.c print-syslog.c print-tcp.c print-telnet.c print-tftp.c \ -- print-timed.c print-token.c print-udld.c print-udp.c print-usb.c \ -- print-vjc.c print-vqp.c print-vrrp.c print-vtp.c print-forces.c \ -- print-wb.c print-zephyr.c signature.c setsignal.c tcpdump.c util.c ++ print-nfs.c print-ntp.c print-null.c print-olsr.c print-ospf.c \ + print-ppp.c print-pppoe.c print-pptp.c print-radius.c print-raw.c print-rsvp.c \ + print-sctp.c print-sip.c print-snmp.c print-stp.c print-sunrpc.c \ + print-syslog.c print-tcp.c print-telnet.c print-tftp.c print-udp.c \ + setsignal.c tcpdump.c util.c signature.c print-ipnet.c print-forces.c + -+ifndef TCPDUMP_MINI ++else + -+CSRC += \ -+ print-ah.c print-ap1394.c print-arcnet.c print-atalk.c print-atm.c \ -+ print-beep.c print-bfd.c print-bt.c print-cfm.c print-chdlc.c \ -+ print-cip.c print-cnfp.c print-dccp.c print-decnet.c print-dtp.c \ -+ print-dvmrp.c print-eigrp.c print-enc.c print-esp.c print-fddi.c print-fr.c print-hsrp.c \ -+ print-igrp.c print-ipfc.c print-ipx.c print-ipcomp.c print-isoclns.c print-juniper.c print-lane.c \ -+ print-ldp.c print-lmp.c print-lspping.c print-lwapp.c print-egp.c print-krb.c \ -+ print-lwres.c print-mobile.c print-mpcp.c print-mpls.c print-msdp.c \ -+ print-pim.c print-pgm.c print-rip.c print-rrcp.c print-rx.c print-sflow.c print-slow.c print-sl.c \ -+ print-sll.c print-sunatm.c print-symantec.c print-timed.c print-token.c print-udld.c \ -+ print-vjc.c print-vqp.c print-wb.c print-zephyr.c print-vrrp.c print-vtp.c \ -+ print-usb.c -+ - - LIBNETDISSECT_SRC=print-isakmp.c + CSRC = addrtoname.c af.c checksum.c cpack.c gmpls.c oui.c gmt2local.c ipproto.c \ + nlpid.c l2vpn.c machdep.c parsenfsfh.c in_cksum.c \ + print-802_11.c print-802_15_4.c print-ap1394.c print-ah.c \ +@@ -99,6 +115,8 @@ LIBNETDISSECT_SRC=print-isakmp.c LIBNETDISSECT_OBJ=$(LIBNETDISSECT_SRC:.c=.o) LIBNETDISSECT=libnetdissect.a @@ -61,9 +32,9 @@ LOCALSRC = @LOCALSRC@ GENSRC = version.c LIBOBJS = @LIBOBJS@ -@@ -358,10 +362,12 @@ $(PROG): $(OBJ) @V_PCAPDEP@ +@@ -361,10 +379,12 @@ $(PROG): $(OBJ) @V_PCAPDEP@ @rm -f $@ - $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(OBJ) $(LIBS) + $(CC) $(FULL_CFLAGS) $(LDFLAGS) -o $@ $(OBJ) $(LIBS) +ifndef TCPDUMP_MINI $(LIBNETDISSECT): $(LIBNETDISSECT_OBJ) @@ -73,10 +44,10 @@ +endif datalinks.o: $(srcdir)/missing/datalinks.c - $(CC) $(CFLAGS) -o $@ -c $(srcdir)/missing/datalinks.c + $(CC) $(FULL_CFLAGS) -o $@ -c $(srcdir)/missing/datalinks.c --- a/addrtoname.c +++ b/addrtoname.c -@@ -519,10 +519,10 @@ linkaddr_string(const u_char *ep, const +@@ -547,10 +547,10 @@ linkaddr_string(const u_char *ep, const unsigned int type, const unsigned int le if (type == LINKADDR_ETHER && len == ETHER_ADDR_LEN) return (etheraddr_string(ep)); @@ -89,7 +60,7 @@ tp = lookup_bytestring(ep, len); if (tp->e_name) return (tp->e_name); -@@ -1122,6 +1122,7 @@ init_addrtoname(u_int32_t localnet, u_in +@@ -1150,6 +1150,7 @@ init_addrtoname(u_int32_t localnet, u_int32_t mask) init_ipxsaparray(); } @@ -97,7 +68,7 @@ const char * dnaddr_string(u_short dnaddr) { -@@ -1141,6 +1142,7 @@ dnaddr_string(u_short dnaddr) +@@ -1169,6 +1170,7 @@ dnaddr_string(u_short dnaddr) return(tp->name); } @@ -105,285 +76,85 @@ /* Return a zero'ed hnamemem struct and cuts down on calloc() overhead */ struct hnamemem * ---- a/print-llc.c -+++ b/print-llc.c -@@ -195,7 +195,7 @@ llc_print(const u_char *p, u_int length, - control = EXTRACT_LE_16BITS(p + 2); - is_u = 0; - } -- -+#ifndef TCPDUMP_MINI - if (ssap_field == LLCSAP_GLOBAL && dsap_field == LLCSAP_GLOBAL) { - /* - * This is an Ethernet_802.3 IPX frame; it has an -@@ -218,6 +218,7 @@ llc_print(const u_char *p, u_int length, - ipx_print(p, length); - return (1); - } -+#endif - - dsap = dsap_field & ~LLC_IG; - ssap = ssap_field & ~LLC_GSAP; -@@ -250,6 +251,7 @@ llc_print(const u_char *p, u_int length, - return (1); - } - -+#ifndef TCPDUMP_MINI - if (ssap == LLCSAP_IPX && dsap == LLCSAP_IPX && - control == LLC_UI) { - /* -@@ -265,6 +267,7 @@ llc_print(const u_char *p, u_int length, - ipx_print(p+3, length-3); - return (1); - } -+#endif - - #ifdef TCPDUMP_DO_SMB - if (ssap == LLCSAP_NETBEUI && dsap == LLCSAP_NETBEUI -@@ -296,11 +299,13 @@ llc_print(const u_char *p, u_int length, - return (1); - } - #endif -+#ifndef TCPDUMP_MINI - if (ssap == LLCSAP_ISONS && dsap == LLCSAP_ISONS - && control == LLC_UI) { - isoclns_print(p + 3, length - 3, caplen - 3); - return (1); - } -+#endif - - if (ssap == LLCSAP_SNAP && dsap == LLCSAP_SNAP - && control == LLC_UI) { -@@ -443,6 +448,7 @@ snap_print(const u_char *p, u_int length - case PID_CISCO_CDP: - cdp_print(p, length, caplen); - return (1); -+#ifndef TCPDUMP_MINI - case PID_CISCO_DTP: - dtp_print(p, length); - return (1); -@@ -452,6 +458,7 @@ snap_print(const u_char *p, u_int length - case PID_CISCO_VTP: - vtp_print(p, length); - return (1); -+#endif - case PID_CISCO_PVST: - stp_print(p, length); - return (1); -@@ -482,6 +489,7 @@ snap_print(const u_char *p, u_int length - ether_print(p, length, caplen, NULL, NULL); - return (1); - -+#ifndef TCPDUMP_MINI - case PID_RFC2684_802_5_FCS: - case PID_RFC2684_802_5_NOFCS: - /* -@@ -523,6 +531,7 @@ snap_print(const u_char *p, u_int length - */ - fddi_print(p, length, caplen); - return (1); -+#endif - - case PID_RFC2684_BPDU: - stp_print(p, length); ---- a/print-null.c -+++ b/print-null.c -@@ -128,7 +128,7 @@ null_if_print(const struct pcap_pkthdr * - ip6_print(p, length); - break; - #endif -- -+#ifndef TCPDUMP_MINI - case BSD_AFNUM_ISO: - isoclns_print(p, length, caplen); - break; -@@ -140,7 +140,7 @@ null_if_print(const struct pcap_pkthdr * - case BSD_AFNUM_IPX: - ipx_print(p, length); - break; -- -+#endif - default: - /* unknown AF_ value */ - if (!eflag) ---- a/tcpdump.c -+++ b/tcpdump.c -@@ -148,11 +148,14 @@ struct ndo_printer { - - - static struct printer printers[] = { -+#ifndef TCPDUMP_MINI - { arcnet_if_print, DLT_ARCNET }, - #ifdef DLT_ARCNET_LINUX - { arcnet_linux_if_print, DLT_ARCNET_LINUX }, - #endif -+#endif - { ether_if_print, DLT_EN10MB }, -+#ifndef TCPDUMP_MINI - { token_if_print, DLT_IEEE802 }, - #ifdef DLT_LANE8023 - { lane_if_print, DLT_LANE8023 }, -@@ -167,19 +170,23 @@ static struct printer printers[] = { - #ifdef DLT_SLIP_BSDOS - { sl_bsdos_if_print, DLT_SLIP_BSDOS }, - #endif -+#endif - { ppp_if_print, DLT_PPP }, - #ifdef DLT_PPP_WITHDIRECTION - { ppp_if_print, DLT_PPP_WITHDIRECTION }, - #endif -+#ifndef TCPDUMP_MINI - #ifdef DLT_PPP_BSDOS - { ppp_bsdos_if_print, DLT_PPP_BSDOS }, - #endif - { fddi_if_print, DLT_FDDI }, -+#endif - { null_if_print, DLT_NULL }, - #ifdef DLT_LOOP - { null_if_print, DLT_LOOP }, - #endif - { raw_if_print, DLT_RAW }, -+#ifndef TCPDUMP_MINI - { atm_if_print, DLT_ATM_RFC1483 }, - #ifdef DLT_C_HDLC - { chdlc_if_print, DLT_C_HDLC }, -@@ -190,15 +197,19 @@ static struct printer printers[] = { - #ifdef DLT_PPP_SERIAL - { ppp_hdlc_if_print, DLT_PPP_SERIAL }, - #endif -+#endif - #ifdef DLT_PPP_ETHER - { pppoe_if_print, DLT_PPP_ETHER }, - #endif -+#ifndef TCPDUMP_MINI - #ifdef DLT_LINUX_SLL - { sll_if_print, DLT_LINUX_SLL }, - #endif -+#endif - #ifdef DLT_IEEE802_11 - { ieee802_11_if_print, DLT_IEEE802_11}, - #endif -+#ifndef TCPDUMP_MINI - #ifdef DLT_LTALK - { ltalk_if_print, DLT_LTALK }, - #endif -@@ -217,12 +228,14 @@ static struct printer printers[] = { - #ifdef DLT_IP_OVER_FC - { ipfc_if_print, DLT_IP_OVER_FC }, - #endif -+#endif - #ifdef DLT_PRISM_HEADER - { prism_if_print, DLT_PRISM_HEADER }, - #endif - #ifdef DLT_IEEE802_11_RADIO - { ieee802_11_radio_if_print, DLT_IEEE802_11_RADIO }, - #endif -+#ifndef TCPDUMP_MINI - #ifdef DLT_ENC - { enc_if_print, DLT_ENC }, - #endif -@@ -232,9 +245,11 @@ static struct printer printers[] = { - #ifdef DLT_APPLE_IP_OVER_IEEE1394 - { ap1394_if_print, DLT_APPLE_IP_OVER_IEEE1394 }, - #endif -+#endif - #ifdef DLT_IEEE802_11_RADIO_AVS - { ieee802_11_radio_avs_if_print, DLT_IEEE802_11_RADIO_AVS }, - #endif -+#ifndef TCPDUMP_MINI - #ifdef DLT_JUNIPER_ATM1 - { juniper_atm1_print, DLT_JUNIPER_ATM1 }, - #endif -@@ -300,6 +315,7 @@ static struct printer printers[] = { - #ifdef DLT_IPV6 - { raw_if_print, DLT_IPV6 }, - #endif -+#endif - { NULL, 0 }, - }; - --- a/print-ether.c +++ b/print-ether.c -@@ -269,6 +269,7 @@ ethertype_print(u_short ether_type, cons - arp_print(gndo, p, length, caplen); +@@ -338,6 +338,7 @@ ethertype_print(netdissect_options *ndo, + arp_print(ndo, p, length, caplen); return (1); +#ifndef TCPDUMP_MINI case ETHERTYPE_DN: - decnet_print(p, length, caplen); + decnet_print(/*ndo,*/p, length, caplen); return (1); -@@ -287,11 +288,13 @@ ethertype_print(u_short ether_type, cons - printf("(NOV-ETHII) "); - ipx_print(p, length); +@@ -356,10 +357,13 @@ ethertype_print(netdissect_options *ndo, + ND_PRINT((ndo, "(NOV-ETHII) ")); + ipx_print(/*ndo,*/p, length); return (1); +#endif +#ifndef TCPDUMP_MINI case ETHERTYPE_ISO: - isoclns_print(p+1, length-1, length-1); + isoclns_print(/*ndo,*/p+1, length-1, length-1); return(1); -- +#endif + case ETHERTYPE_PPPOED: case ETHERTYPE_PPPOES: - case ETHERTYPE_PPPOED2: -@@ -303,10 +306,11 @@ ethertype_print(u_short ether_type, cons - eap_print(gndo, p, length); +@@ -372,9 +376,11 @@ ethertype_print(netdissect_options *ndo, + eap_print(ndo, p, length); return (1); +#ifndef TCPDUMP_MINI case ETHERTYPE_RRCP: - rrcp_print(gndo, p - 14 , length + 14); + rrcp_print(ndo, p - 14 , length + 14); return (1); -- +#endif + case ETHERTYPE_PPP: if (length) { - printf(": "); -@@ -314,6 +318,7 @@ ethertype_print(u_short ether_type, cons +@@ -383,6 +389,7 @@ ethertype_print(netdissect_options *ndo, } return (1); +#ifndef TCPDUMP_MINI case ETHERTYPE_MPCP: - mpcp_print(p, length); + mpcp_print(/*ndo,*/p, length); return (1); -@@ -326,7 +331,7 @@ ethertype_print(u_short ether_type, cons +@@ -395,7 +402,7 @@ ethertype_print(netdissect_options *ndo, case ETHERTYPE_CFM_OLD: - cfm_print(p, length); + cfm_print(/*ndo,*/p, length); return (1); - +#endif case ETHERTYPE_LLDP: - lldp_print(p, length); + lldp_print(/*ndo,*/p, length); return (1); -@@ -334,11 +339,12 @@ ethertype_print(u_short ether_type, cons +@@ -403,10 +410,12 @@ ethertype_print(netdissect_options *ndo, case ETHERTYPE_LOOPBACK: return (1); +#ifndef TCPDUMP_MINI case ETHERTYPE_MPLS: case ETHERTYPE_MPLS_MULTI: - mpls_print(p, length); + mpls_print(/*ndo,*/p, length); return (1); -- +#endif + case ETHERTYPE_LAT: case ETHERTYPE_SCA: - case ETHERTYPE_MOPRC: --- a/print-gre.c +++ b/print-gre.c -@@ -213,6 +213,7 @@ gre_print_0(const u_char *bp, u_int leng - ip6_print(bp, len); +@@ -213,6 +213,7 @@ gre_print_0(const u_char *bp, u_int length) + ip6_print(gndo, bp, len); break; #endif +#ifndef TCPDUMP_MINI case ETHERTYPE_MPLS: mpls_print(bp, len); break; -@@ -228,6 +229,7 @@ gre_print_0(const u_char *bp, u_int leng +@@ -228,6 +229,7 @@ gre_print_0(const u_char *bp, u_int length) case ETHERTYPE_TEB: - ether_print(bp, len, len, NULL, NULL); + ether_print(gndo, bp, len, len, NULL, NULL); break; +#endif default: @@ -391,7 +162,7 @@ } --- a/print-igmp.c +++ b/print-igmp.c -@@ -303,6 +303,7 @@ igmp_print(register const u_char *bp, re +@@ -305,6 +305,7 @@ igmp_print(register const u_char *bp, register u_int len) TCHECK2(bp[4], 4); (void)printf("igmp leave %s", ipaddr_string(&bp[4])); break; @@ -399,7 +170,7 @@ case 0x13: (void)printf("igmp dvmrp"); if (len < 8) -@@ -314,6 +315,7 @@ igmp_print(register const u_char *bp, re +@@ -316,6 +317,7 @@ igmp_print(register const u_char *bp, register u_int len) (void)printf("igmp pimv1"); pimv1_print(bp, len); break; @@ -409,7 +180,7 @@ break; --- a/print-ip.c +++ b/print-ip.c -@@ -380,6 +380,7 @@ ip_print_demux(netdissect_options *ndo, +@@ -328,6 +328,7 @@ ip_print_demux(netdissect_options *ndo, again: switch (ipds->nh) { @@ -417,7 +188,7 @@ case IPPROTO_AH: ipds->nh = *ipds->cp; ipds->advance = ah_print(ipds->cp); -@@ -414,14 +415,16 @@ again: +@@ -362,14 +363,16 @@ again: ipds->nh = enh & 0xff; goto again; } @@ -435,7 +206,7 @@ case IPPROTO_TCP: /* pass on the MF bit plus the offset to detect fragments */ -@@ -441,6 +444,7 @@ again: +@@ -389,6 +392,7 @@ again: ipds->off & (IP_MF|IP_OFFMASK)); break; @@ -443,7 +214,7 @@ case IPPROTO_PIGP: /* * XXX - the current IANA protocol number assignments -@@ -461,15 +465,16 @@ again: +@@ -409,15 +413,16 @@ again: case IPPROTO_EIGRP: eigrp_print(ipds->cp, ipds->len); break; @@ -462,7 +233,7 @@ case IPPROTO_OSPF: ospf_print(ipds->cp, ipds->len, (const u_char *)ipds->ip); break; -@@ -503,10 +508,10 @@ again: +@@ -451,10 +456,10 @@ again: gre_print(ipds->cp, ipds->len); break; @@ -472,9 +243,9 @@ break; - case IPPROTO_PIM: - pim_print(ipds->cp, ipds->len, - in_cksum((const u_short*)ipds->cp, ipds->len, 0)); -@@ -519,7 +524,7 @@ again: + vec[0].ptr = ipds->cp; + vec[0].len = ipds->len; +@@ -480,7 +485,7 @@ again: case IPPROTO_PGM: pgm_print(ipds->cp, ipds->len, (const u_char *)ipds->ip); break; @@ -483,6 +254,152 @@ default: if ((proto = getprotobynumber(ipds->nh)) != NULL) ND_PRINT((ndo, " %s", proto->p_name)); +--- a/print-ip6.c ++++ b/print-ip6.c +@@ -192,9 +192,11 @@ ip6_print(netdissect_options *ndo, const u_char *bp, u_int length) + case IPPROTO_SCTP: + sctp_print(cp, (const u_char *)ip6, len); + return; ++#ifndef TCPDUMP_MINI + case IPPROTO_DCCP: + dccp_print(cp, (const u_char *)ip6, len); + return; ++#endif + case IPPROTO_TCP: + tcp_print(cp, len, (const u_char *)ip6, fragmented); + return; +@@ -204,6 +206,7 @@ ip6_print(netdissect_options *ndo, const u_char *bp, u_int length) + case IPPROTO_ICMPV6: + icmp6_print(ndo, cp, len, (const u_char *)ip6, fragmented); + return; ++#ifndef TCPDUMP_MINI + case IPPROTO_AH: + advance = ah_print(cp); + nh = *cp; +@@ -228,7 +231,7 @@ ip6_print(netdissect_options *ndo, const u_char *bp, u_int length) + pim_print(cp, len, nextproto6_cksum(ip6, cp, len, + IPPROTO_PIM)); + return; +- ++#endif + case IPPROTO_OSPF: + ospf6_print(cp, len); + return; +@@ -240,11 +243,11 @@ ip6_print(netdissect_options *ndo, const u_char *bp, u_int length) + case IPPROTO_IPV4: + ip_print(ndo, cp, len); + return; +- ++#ifndef TCPDUMP_MINI + case IPPROTO_PGM: + pgm_print(cp, len, (const u_char *)ip6); + return; +- ++#endif + case IPPROTO_GRE: + gre_print(cp, len); + return; +--- a/print-llc.c ++++ b/print-llc.c +@@ -195,7 +195,7 @@ llc_print(const u_char *p, u_int length, u_int caplen, + control = EXTRACT_LE_16BITS(p + 2); + is_u = 0; + } +- ++#ifndef TCPDUMP_MINI + if (ssap_field == LLCSAP_GLOBAL && dsap_field == LLCSAP_GLOBAL) { + /* + * This is an Ethernet_802.3 IPX frame; it has an +@@ -218,6 +218,7 @@ llc_print(const u_char *p, u_int length, u_int caplen, + ipx_print(p, length); + return (1); + } ++#endif + + dsap = dsap_field & ~LLC_IG; + ssap = ssap_field & ~LLC_GSAP; +@@ -250,6 +251,7 @@ llc_print(const u_char *p, u_int length, u_int caplen, + return (1); + } + ++#ifndef TCPDUMP_MINI + if (ssap == LLCSAP_IPX && dsap == LLCSAP_IPX && + control == LLC_UI) { + /* +@@ -265,6 +267,7 @@ llc_print(const u_char *p, u_int length, u_int caplen, + ipx_print(p+3, length-3); + return (1); + } ++#endif + + #ifdef TCPDUMP_DO_SMB + if (ssap == LLCSAP_NETBEUI && dsap == LLCSAP_NETBEUI +@@ -296,11 +299,13 @@ llc_print(const u_char *p, u_int length, u_int caplen, + return (1); + } + #endif ++#ifndef TCPDUMP_MINI + if (ssap == LLCSAP_ISONS && dsap == LLCSAP_ISONS + && control == LLC_UI) { + isoclns_print(p + 3, length - 3, caplen - 3); + return (1); + } ++#endif + + if (ssap == LLCSAP_SNAP && dsap == LLCSAP_SNAP + && control == LLC_UI) { +@@ -443,6 +448,7 @@ snap_print(const u_char *p, u_int length, u_int caplen, u_int bridge_pad) + case PID_CISCO_CDP: + cdp_print(p, length, caplen); + return (1); ++#ifndef TCPDUMP_MINI + case PID_CISCO_DTP: + dtp_print(p, length); + return (1); +@@ -452,6 +458,7 @@ snap_print(const u_char *p, u_int length, u_int caplen, u_int bridge_pad) + case PID_CISCO_VTP: + vtp_print(p, length); + return (1); ++#endif + case PID_CISCO_PVST: + stp_print(p, length); + return (1); +@@ -482,6 +489,7 @@ snap_print(const u_char *p, u_int length, u_int caplen, u_int bridge_pad) + ether_print(gndo, p, length, caplen, NULL, NULL); + return (1); + ++#ifndef TCPDUMP_MINI + case PID_RFC2684_802_5_FCS: + case PID_RFC2684_802_5_NOFCS: + /* +@@ -523,6 +531,7 @@ snap_print(const u_char *p, u_int length, u_int caplen, u_int bridge_pad) + */ + fddi_print(p, length, caplen); + return (1); ++#endif + + case PID_RFC2684_BPDU: + stp_print(p, length); +--- a/print-null.c ++++ b/print-null.c +@@ -128,7 +128,7 @@ null_if_print(const struct pcap_pkthdr *h, const u_char *p) + ip6_print(gndo, p, length); + break; + #endif +- ++#ifndef TCPDUMP_MINI + case BSD_AFNUM_ISO: + isoclns_print(p, length, caplen); + break; +@@ -140,7 +140,7 @@ null_if_print(const struct pcap_pkthdr *h, const u_char *p) + case BSD_AFNUM_IPX: + ipx_print(p, length); + break; +- ++#endif + default: + /* unknown AF_ value */ + if (!eflag) --- a/print-ppp.c +++ b/print-ppp.c @@ -1262,7 +1262,7 @@ trunc: @@ -515,15 +432,15 @@ switch (proto) { case PPP_LCP: /* fall through */ case PPP_IPCP: -@@ -1371,6 +1373,7 @@ handle_ppp(u_int proto, const u_char *p, - ip6_print(p, length); +@@ -1371,6 +1373,7 @@ handle_ppp(u_int proto, const u_char *p, int length) + ip6_print(gndo, p, length); break; #endif +#ifndef TCPDUMP_MINI case ETHERTYPE_IPX: /*XXX*/ case PPP_IPX: ipx_print(p, length); -@@ -1382,6 +1385,7 @@ handle_ppp(u_int proto, const u_char *p, +@@ -1382,6 +1385,7 @@ handle_ppp(u_int proto, const u_char *p, int length) case PPP_MPLS_MCAST: mpls_print(p, length); break; @@ -531,7 +448,7 @@ case PPP_COMP: printf("compressed PPP data"); break; -@@ -1520,6 +1524,7 @@ ppp_if_print(const struct pcap_pkthdr *h +@@ -1520,6 +1524,7 @@ ppp_if_print(const struct pcap_pkthdr *h, register const u_char *p) return (0); } @@ -550,7 +467,7 @@ * Local Variables: --- a/print-tcp.c +++ b/print-tcp.c -@@ -649,8 +649,10 @@ tcp_print(register const u_char *bp, reg +@@ -652,8 +652,10 @@ tcp_print(register const u_char *bp, register u_int length, else if (sport == SMB_PORT || dport == SMB_PORT) smb_tcp_print(bp, length); #endif @@ -561,16 +478,17 @@ else if (length > 2 && (sport == NAMESERVER_PORT || dport == NAMESERVER_PORT || sport == MULTICASTDNS_PORT || dport == MULTICASTDNS_PORT)) { -@@ -659,11 +661,12 @@ tcp_print(register const u_char *bp, reg +@@ -662,6 +664,7 @@ tcp_print(register const u_char *bp, register u_int length, * XXX packet could be unaligned, it can go strange */ ns_print(bp + 2, length - 2, 0); +#ifndef TCPDUMP_MINI } else if (sport == MSDP_PORT || dport == MSDP_PORT) { msdp_print(bp, length); -- } -- else if (length > 0 && (sport == LDP_PORT || dport == LDP_PORT)) { -+ } else if (length > 0 && (sport == LDP_PORT || dport == LDP_PORT)) { + } else if (sport == RPKI_RTR_PORT || dport == RPKI_RTR_PORT) { +@@ -669,6 +672,7 @@ tcp_print(register const u_char *bp, register u_int length, + } + else if (length > 0 && (sport == LDP_PORT || dport == LDP_PORT)) { ldp_print(bp, length); +#endif } @@ -578,7 +496,7 @@ return; --- a/print-udp.c +++ b/print-udp.c -@@ -478,11 +478,12 @@ udp_print(register const u_char *bp, u_i +@@ -418,11 +418,12 @@ udp_print(register const u_char *bp, u_int length, vat_print((void *)(up + 1), up); break; @@ -592,7 +510,7 @@ case PT_RPC: rp = (struct sunrpc_msg *)(up + 1); direction = (enum sunrpc_msg_type)EXTRACT_32BITS(&rp->rm_direction); -@@ -510,11 +511,12 @@ udp_print(register const u_char *bp, u_i +@@ -450,11 +451,12 @@ udp_print(register const u_char *bp, u_int length, snmp_print((const u_char *)(up + 1), length); break; @@ -606,7 +524,7 @@ case PT_TFTP: udpipaddr_print(ip, sport, dport); tftp_print(cp, length); -@@ -557,6 +559,7 @@ udp_print(register const u_char *bp, u_i +@@ -497,6 +499,7 @@ udp_print(register const u_char *bp, u_int length, } #endif } @@ -614,7 +532,7 @@ if (TTEST(((struct LAP *)cp)->type) && ((struct LAP *)cp)->type == lapDDP && (atalk_port(sport) || atalk_port(dport))) { -@@ -565,6 +568,7 @@ udp_print(register const u_char *bp, u_i +@@ -505,6 +508,7 @@ udp_print(register const u_char *bp, u_int length, llap_print(cp, length); return; } @@ -622,7 +540,7 @@ } udpipaddr_print(ip, sport, dport); -@@ -600,14 +604,18 @@ udp_print(register const u_char *bp, u_i +@@ -555,14 +559,18 @@ udp_print(register const u_char *bp, u_int length, ns_print((const u_char *)(up + 1), length, 0); else if (ISPORT(MULTICASTDNS_PORT)) ns_print((const u_char *)(up + 1), length, 1); @@ -641,7 +559,7 @@ else if (ISPORT(AODV_PORT)) aodv_print((const u_char *)(up + 1), length, #ifdef INET6 -@@ -615,6 +623,7 @@ udp_print(register const u_char *bp, u_i +@@ -570,6 +578,7 @@ udp_print(register const u_char *bp, u_int length, #else 0); #endif @@ -649,7 +567,7 @@ else if (ISPORT(ISAKMP_PORT)) isakmp_print(gndo, (const u_char *)(up + 1), length, bp2); else if (ISPORT(ISAKMP_PORT_NATT)) -@@ -623,12 +632,15 @@ udp_print(register const u_char *bp, u_i +@@ -578,12 +587,15 @@ udp_print(register const u_char *bp, u_int length, else if (ISPORT(ISAKMP_PORT_USER1) || ISPORT(ISAKMP_PORT_USER2)) isakmp_print(gndo, (const u_char *)(up + 1), length, bp2); #endif @@ -665,7 +583,7 @@ else if (ISPORT(L2TP_PORT)) l2tp_print((const u_char *)(up + 1), length); #ifdef TCPDUMP_DO_SMB -@@ -639,6 +651,7 @@ udp_print(register const u_char *bp, u_i +@@ -594,6 +606,7 @@ udp_print(register const u_char *bp, u_int length, #endif else if (dport == 3456) vat_print((const void *)(up + 1), up); @@ -673,7 +591,7 @@ else if (ISPORT(ZEPHYR_SRV_PORT) || ISPORT(ZEPHYR_CLT_PORT)) zephyr_print((const void *)(up + 1), length); /* -@@ -649,6 +662,7 @@ udp_print(register const u_char *bp, u_i +@@ -604,6 +617,7 @@ udp_print(register const u_char *bp, u_int length, (dport >= RX_PORT_LOW && dport <= RX_PORT_HIGH)) rx_print((const void *)(up + 1), length, sport, dport, (u_char *) ip); @@ -681,7 +599,7 @@ #ifdef INET6 else if (ISPORT(RIPNG_PORT)) ripng_print((const u_char *)(up + 1), length); -@@ -659,21 +673,25 @@ udp_print(register const u_char *bp, u_i +@@ -615,21 +629,25 @@ udp_print(register const u_char *bp, u_int length, /* * Kludge in test for whiteboard packets. */ @@ -707,7 +625,7 @@ else if (ISPORT(OLSR_PORT)) olsr_print((const u_char *)(up + 1), length, #if INET6 -@@ -681,6 +699,7 @@ udp_print(register const u_char *bp, u_i +@@ -637,6 +655,7 @@ udp_print(register const u_char *bp, u_int length, #else 0); #endif @@ -715,7 +633,7 @@ else if (ISPORT(MPLS_LSP_PING_PORT)) lspping_print((const u_char *)(up + 1), length); else if (dport == BFD_CONTROL_PORT || -@@ -698,6 +717,7 @@ udp_print(register const u_char *bp, u_i +@@ -654,6 +673,7 @@ udp_print(register const u_char *bp, u_int length, lwapp_control_print((const u_char *)(up + 1), length, 0); else if (ISPORT(LWAPP_DATA_PORT)) lwapp_data_print((const u_char *)(up + 1), length); @@ -723,48 +641,108 @@ else if (ISPORT(SIP_PORT)) sip_print((const u_char *)(up + 1), length); else if (ISPORT(SYSLOG_PORT)) ---- a/print-ip6.c -+++ b/print-ip6.c -@@ -186,9 +186,11 @@ ip6_print(register const u_char *bp, reg - case IPPROTO_SCTP: - sctp_print(cp, (const u_char *)ip6, len); - return; +--- a/tcpdump.c ++++ b/tcpdump.c +@@ -148,6 +148,7 @@ struct ndo_printer { + + + static struct printer printers[] = { +#ifndef TCPDUMP_MINI - case IPPROTO_DCCP: - dccp_print(cp, (const u_char *)ip6, len); - return; + { arcnet_if_print, DLT_ARCNET }, + #ifdef DLT_ARCNET_LINUX + { arcnet_linux_if_print, DLT_ARCNET_LINUX }, +@@ -166,19 +167,23 @@ static struct printer printers[] = { + #ifdef DLT_SLIP_BSDOS + { sl_bsdos_if_print, DLT_SLIP_BSDOS }, + #endif +#endif - case IPPROTO_TCP: - tcp_print(cp, len, (const u_char *)ip6, fragmented); - return; -@@ -198,6 +200,7 @@ ip6_print(register const u_char *bp, reg - case IPPROTO_ICMPV6: - icmp6_print(gndo, cp, len, (const u_char *)ip6, fragmented); - return; + { ppp_if_print, DLT_PPP }, + #ifdef DLT_PPP_WITHDIRECTION + { ppp_if_print, DLT_PPP_WITHDIRECTION }, + #endif +#ifndef TCPDUMP_MINI - case IPPROTO_AH: - advance = ah_print(cp); - nh = *cp; -@@ -222,7 +225,7 @@ ip6_print(register const u_char *bp, reg - pim_print(cp, len, nextproto6_cksum(ip6, (u_short *)cp, len, - IPPROTO_PIM)); - return; -- + #ifdef DLT_PPP_BSDOS + { ppp_bsdos_if_print, DLT_PPP_BSDOS }, + #endif + { fddi_if_print, DLT_FDDI }, +#endif - case IPPROTO_OSPF: - ospf6_print(cp, len); - return; -@@ -234,11 +237,11 @@ ip6_print(register const u_char *bp, reg - case IPPROTO_IPV4: - ip_print(gndo, cp, len); - return; -- + { null_if_print, DLT_NULL }, + #ifdef DLT_LOOP + { null_if_print, DLT_LOOP }, + #endif + { raw_if_print, DLT_RAW }, +#ifndef TCPDUMP_MINI - case IPPROTO_PGM: - pgm_print(cp, len, (const u_char *)ip6); - return; -- + { atm_if_print, DLT_ATM_RFC1483 }, + #ifdef DLT_C_HDLC + { chdlc_if_print, DLT_C_HDLC }, +@@ -189,15 +194,19 @@ static struct printer printers[] = { + #ifdef DLT_PPP_SERIAL + { ppp_hdlc_if_print, DLT_PPP_SERIAL }, + #endif +#endif - case IPPROTO_GRE: - gre_print(cp, len); - return; + #ifdef DLT_PPP_ETHER + { pppoe_if_print, DLT_PPP_ETHER }, + #endif ++#ifndef TCPDUMP_MINI + #ifdef DLT_LINUX_SLL + { sll_if_print, DLT_LINUX_SLL }, + #endif ++#endif + #ifdef DLT_IEEE802_11 + { ieee802_11_if_print, DLT_IEEE802_11}, + #endif ++#ifndef TCPDUMP_MINI + #ifdef DLT_LTALK + { ltalk_if_print, DLT_LTALK }, + #endif +@@ -216,12 +225,14 @@ static struct printer printers[] = { + #ifdef DLT_IP_OVER_FC + { ipfc_if_print, DLT_IP_OVER_FC }, + #endif ++#endif + #ifdef DLT_PRISM_HEADER + { prism_if_print, DLT_PRISM_HEADER }, + #endif + #ifdef DLT_IEEE802_11_RADIO + { ieee802_11_radio_if_print, DLT_IEEE802_11_RADIO }, + #endif ++#ifndef TCPDUMP_MINI + #ifdef DLT_ENC + { enc_if_print, DLT_ENC }, + #endif +@@ -231,9 +242,11 @@ static struct printer printers[] = { + #ifdef DLT_APPLE_IP_OVER_IEEE1394 + { ap1394_if_print, DLT_APPLE_IP_OVER_IEEE1394 }, + #endif ++#endif + #ifdef DLT_IEEE802_11_RADIO_AVS + { ieee802_11_radio_avs_if_print, DLT_IEEE802_11_RADIO_AVS }, + #endif ++#ifndef TCPDUMP_MINI + #ifdef DLT_JUNIPER_ATM1 + { juniper_atm1_print, DLT_JUNIPER_ATM1 }, + #endif +@@ -299,6 +312,7 @@ static struct printer printers[] = { + #ifdef DLT_IPV6 + { raw_if_print, DLT_IPV6 }, + #endif ++#endif + { NULL, 0 }, + }; + +@@ -307,6 +321,7 @@ static struct ndo_printer ndo_printers[] = { + #ifdef DLT_IPNET + { ipnet_if_print, DLT_IPNET }, + #endif ++#ifndef TCPDUMP_MINI + #ifdef DLT_IEEE802_15_4 + { ieee802_15_4_if_print, DLT_IEEE802_15_4 }, + #endif +@@ -316,6 +331,7 @@ static struct ndo_printer ndo_printers[] = { + #ifdef DLT_PPI + { ppi_if_print, DLT_PPI }, + #endif ++#endif + #ifdef DLT_NETANALYZER + { netanalyzer_if_print, DLT_NETANALYZER }, + #endif