tcpdump/tcpdump.patch

changeset 657
fdb90fe1cf21
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/tcpdump/tcpdump.patch	Sun Sep 02 18:16:04 2012 +0200
     1.3 @@ -0,0 +1,162 @@
     1.4 +Index: configure.in
     1.5 +--- configure.in.orig	2010-03-12 02:56:44.000000000 +0100
     1.6 ++++ configure.in	2010-03-31 09:51:51.000000000 +0200
     1.7 +@@ -739,10 +739,10 @@
     1.8 + 
     1.9 + if test $ac_cv_func_pcap_lib_version = "no" ; then
    1.10 +     AC_MSG_CHECKING(whether pcap_version is defined by libpcap)
    1.11 +-    AC_TRY_LINK([],
    1.12 ++    AC_TRY_LINK(
    1.13 +        [
    1.14 + 	extern char pcap_version[];
    1.15 +-
    1.16 ++       ],[
    1.17 + 	return (int)pcap_version;
    1.18 +        ],
    1.19 +        ac_lbl_cv_pcap_version_defined=yes,
    1.20 +@@ -755,10 +755,10 @@
    1.21 +     fi
    1.22 + fi
    1.23 + AC_MSG_CHECKING(whether pcap_debug is defined by libpcap)
    1.24 +-AC_TRY_LINK([],
    1.25 ++AC_TRY_LINK(
    1.26 +    [
    1.27 + 	extern int pcap_debug;
    1.28 +-
    1.29 ++   ],[
    1.30 + 	return pcap_debug;
    1.31 +    ],
    1.32 +    ac_lbl_cv_pcap_debug_defined=yes,
    1.33 +@@ -772,10 +772,10 @@
    1.34 + 	# OK, what about "yydebug"?
    1.35 + 	#
    1.36 + 	AC_MSG_CHECKING(whether yydebug is defined by libpcap)
    1.37 +-	AC_TRY_LINK([],
    1.38 ++	AC_TRY_LINK(
    1.39 + 	   [
    1.40 + 		extern int yydebug;
    1.41 +-
    1.42 ++	   ],[
    1.43 + 		return yydebug;
    1.44 + 	   ],
    1.45 + 	   ac_lbl_cv_yydebug_defined=yes,
    1.46 +Index: ether.h
    1.47 +--- ether.h.orig	2010-03-12 02:56:44.000000000 +0100
    1.48 ++++ ether.h	2010-03-31 09:51:51.000000000 +0200
    1.49 +@@ -34,7 +34,9 @@
    1.50 +  *	@(#)if_ether.h	8.3 (Berkeley) 5/2/95
    1.51 +  */
    1.52 + 
    1.53 ++#ifndef ETHERMTU
    1.54 + #define	ETHERMTU	1500
    1.55 ++#endif
    1.56 + 
    1.57 + /*
    1.58 +  * The number of bytes in an ethernet (MAC) address.
    1.59 +@@ -44,7 +46,7 @@
    1.60 + /*
    1.61 +  * Structure of a DEC/Intel/Xerox or 802.3 Ethernet header.
    1.62 +  */
    1.63 +-struct	ether_header {
    1.64 ++struct	tcpdump_ether_header {
    1.65 + 	u_int8_t	ether_dhost[ETHER_ADDR_LEN];
    1.66 + 	u_int8_t	ether_shost[ETHER_ADDR_LEN];
    1.67 + 	u_int16_t	ether_type;
    1.68 +Index: print-ether.c
    1.69 +--- print-ether.c.orig	2010-03-12 02:56:44.000000000 +0100
    1.70 ++++ print-ether.c	2010-03-31 09:55:05.000000000 +0200
    1.71 +@@ -86,10 +86,10 @@
    1.72 + static inline void
    1.73 + ether_hdr_print(register const u_char *bp, u_int length)
    1.74 + {
    1.75 +-	register const struct ether_header *ep;
    1.76 ++	register const struct tcpdump_ether_header *ep;
    1.77 + 	u_int16_t ether_type;
    1.78 + 
    1.79 +-	ep = (const struct ether_header *)bp;
    1.80 ++	ep = (const struct tcpdump_ether_header *)bp;
    1.81 + 
    1.82 + 	(void)printf("%s > %s",
    1.83 + 		     etheraddr_string(ESRC(ep)),
    1.84 +@@ -123,7 +123,7 @@
    1.85 + ether_print(const u_char *p, u_int length, u_int caplen,
    1.86 +     void (*print_encap_header)(const u_char *), const u_char *encap_header_arg)
    1.87 + {
    1.88 +-	struct ether_header *ep;
    1.89 ++	struct tcpdump_ether_header *ep;
    1.90 + 	u_int orig_length;
    1.91 + 	u_short ether_type;
    1.92 + 	u_short extracted_ether_type;
    1.93 +@@ -142,7 +142,7 @@
    1.94 + 
    1.95 + 	length -= ETHER_HDRLEN;
    1.96 + 	caplen -= ETHER_HDRLEN;
    1.97 +-	ep = (struct ether_header *)p;
    1.98 ++	ep = (struct tcpdump_ether_header *)p;
    1.99 + 	p += ETHER_HDRLEN;
   1.100 + 
   1.101 + 	ether_type = EXTRACT_16BITS(&ep->ether_type);
   1.102 +Index: print-fddi.c
   1.103 +--- print-fddi.c.orig	2010-03-12 02:56:44.000000000 +0100
   1.104 ++++ print-fddi.c	2010-03-31 09:51:51.000000000 +0200
   1.105 +@@ -242,7 +242,7 @@
   1.106 + fddi_print(const u_char *p, u_int length, u_int caplen)
   1.107 + {
   1.108 + 	const struct fddi_header *fddip = (const struct fddi_header *)p;
   1.109 +-	struct ether_header ehdr;
   1.110 ++	struct tcpdump_ether_header ehdr;
   1.111 + 	u_short extracted_ethertype;
   1.112 + 
   1.113 + 	if (caplen < FDDI_HDRLEN) {
   1.114 +Index: print-ipfc.c
   1.115 +--- print-ipfc.c.orig	2010-03-12 02:56:44.000000000 +0100
   1.116 ++++ print-ipfc.c	2010-03-31 09:51:51.000000000 +0200
   1.117 +@@ -81,7 +81,7 @@
   1.118 + ipfc_print(const u_char *p, u_int length, u_int caplen)
   1.119 + {
   1.120 + 	const struct ipfc_header *ipfcp = (const struct ipfc_header *)p;
   1.121 +-	struct ether_header ehdr;
   1.122 ++	struct tcpdump_ether_header ehdr;
   1.123 + 	u_short extracted_ethertype;
   1.124 + 
   1.125 + 	if (caplen < IPFC_HDRLEN) {
   1.126 +Index: print-rrcp.c
   1.127 +--- print-rrcp.c.orig	2010-03-12 02:56:44.000000000 +0100
   1.128 ++++ print-rrcp.c	2010-03-31 09:55:19.000000000 +0200
   1.129 +@@ -88,11 +88,11 @@
   1.130 + 	const u_char *rrcp;
   1.131 + 	u_int8_t rrcp_proto;
   1.132 + 	u_int8_t rrcp_opcode;
   1.133 +-	register const struct ether_header *ep;
   1.134 ++	register const struct tcpdump_ether_header *ep;
   1.135 + 	char proto_str[16];
   1.136 + 	char opcode_str[32];
   1.137 + 
   1.138 +-	ep = (const struct ether_header *)cp;
   1.139 ++	ep = (const struct tcpdump_ether_header *)cp;
   1.140 + 	rrcp = cp + ETHER_HDRLEN;
   1.141 + 
   1.142 + 	ND_TCHECK(*(rrcp + RRCP_PROTO_OFFSET));
   1.143 +Index: print-token.c
   1.144 +--- print-token.c.orig	2010-03-12 02:56:44.000000000 +0100
   1.145 ++++ print-token.c	2010-03-31 09:51:51.000000000 +0200
   1.146 +@@ -103,7 +103,7 @@
   1.147 + {
   1.148 + 	const struct token_header *trp;
   1.149 + 	u_short extracted_ethertype;
   1.150 +-	struct ether_header ehdr;
   1.151 ++	struct tcpdump_ether_header ehdr;
   1.152 + 	u_int route_len = 0, hdr_len = TOKEN_HDRLEN;
   1.153 + 	int seg;
   1.154 + 
   1.155 +Index: print-pflog.c
   1.156 +--- print-pflog.c.orig	2010-03-12 02:56:44.000000000 +0100
   1.157 ++++ print-pflog.c	2010-03-31 10:00:24.000000000 +0200
   1.158 +@@ -44,6 +44,7 @@
   1.159 + 
   1.160 + #include "interface.h"
   1.161 + #include "addrtoname.h"
   1.162 ++#include "extract.h"
   1.163 + 
   1.164 + static struct tok pf_reasons[] = {
   1.165 + 	{ 0,	"0(match)" },

mercurial