Thu, 04 Oct 2012 20:30:05 +0200
Correct out of date build configuration, porting to Solaris 11 network
link infrastructure and new libpcap logic. This additionally allows for
device drivers in subdirectories of /dev. Correct packaged nmap
personalities and signatures to work out of the box. Finally, hack
arpd logic to properly close sockets and quit on TERM by repeating
signaling in the run command script. Sadly, all this fails to correct
the run time behaviour of honeyd which fails to bind to the IP layer.
michael@657 | 1 | Index: configure.in |
michael@657 | 2 | --- configure.in.orig 2010-03-12 02:56:44.000000000 +0100 |
michael@657 | 3 | +++ configure.in 2010-03-31 09:51:51.000000000 +0200 |
michael@657 | 4 | @@ -739,10 +739,10 @@ |
michael@657 | 5 | |
michael@657 | 6 | if test $ac_cv_func_pcap_lib_version = "no" ; then |
michael@657 | 7 | AC_MSG_CHECKING(whether pcap_version is defined by libpcap) |
michael@657 | 8 | - AC_TRY_LINK([], |
michael@657 | 9 | + AC_TRY_LINK( |
michael@657 | 10 | [ |
michael@657 | 11 | extern char pcap_version[]; |
michael@657 | 12 | - |
michael@657 | 13 | + ],[ |
michael@657 | 14 | return (int)pcap_version; |
michael@657 | 15 | ], |
michael@657 | 16 | ac_lbl_cv_pcap_version_defined=yes, |
michael@657 | 17 | @@ -755,10 +755,10 @@ |
michael@657 | 18 | fi |
michael@657 | 19 | fi |
michael@657 | 20 | AC_MSG_CHECKING(whether pcap_debug is defined by libpcap) |
michael@657 | 21 | -AC_TRY_LINK([], |
michael@657 | 22 | +AC_TRY_LINK( |
michael@657 | 23 | [ |
michael@657 | 24 | extern int pcap_debug; |
michael@657 | 25 | - |
michael@657 | 26 | + ],[ |
michael@657 | 27 | return pcap_debug; |
michael@657 | 28 | ], |
michael@657 | 29 | ac_lbl_cv_pcap_debug_defined=yes, |
michael@657 | 30 | @@ -772,10 +772,10 @@ |
michael@657 | 31 | # OK, what about "yydebug"? |
michael@657 | 32 | # |
michael@657 | 33 | AC_MSG_CHECKING(whether yydebug is defined by libpcap) |
michael@657 | 34 | - AC_TRY_LINK([], |
michael@657 | 35 | + AC_TRY_LINK( |
michael@657 | 36 | [ |
michael@657 | 37 | extern int yydebug; |
michael@657 | 38 | - |
michael@657 | 39 | + ],[ |
michael@657 | 40 | return yydebug; |
michael@657 | 41 | ], |
michael@657 | 42 | ac_lbl_cv_yydebug_defined=yes, |
michael@657 | 43 | Index: ether.h |
michael@657 | 44 | --- ether.h.orig 2010-03-12 02:56:44.000000000 +0100 |
michael@657 | 45 | +++ ether.h 2010-03-31 09:51:51.000000000 +0200 |
michael@657 | 46 | @@ -34,7 +34,9 @@ |
michael@657 | 47 | * @(#)if_ether.h 8.3 (Berkeley) 5/2/95 |
michael@657 | 48 | */ |
michael@657 | 49 | |
michael@657 | 50 | +#ifndef ETHERMTU |
michael@657 | 51 | #define ETHERMTU 1500 |
michael@657 | 52 | +#endif |
michael@657 | 53 | |
michael@657 | 54 | /* |
michael@657 | 55 | * The number of bytes in an ethernet (MAC) address. |
michael@657 | 56 | @@ -44,7 +46,7 @@ |
michael@657 | 57 | /* |
michael@657 | 58 | * Structure of a DEC/Intel/Xerox or 802.3 Ethernet header. |
michael@657 | 59 | */ |
michael@657 | 60 | -struct ether_header { |
michael@657 | 61 | +struct tcpdump_ether_header { |
michael@657 | 62 | u_int8_t ether_dhost[ETHER_ADDR_LEN]; |
michael@657 | 63 | u_int8_t ether_shost[ETHER_ADDR_LEN]; |
michael@657 | 64 | u_int16_t ether_type; |
michael@657 | 65 | Index: print-ether.c |
michael@657 | 66 | --- print-ether.c.orig 2010-03-12 02:56:44.000000000 +0100 |
michael@657 | 67 | +++ print-ether.c 2010-03-31 09:55:05.000000000 +0200 |
michael@657 | 68 | @@ -86,10 +86,10 @@ |
michael@657 | 69 | static inline void |
michael@657 | 70 | ether_hdr_print(register const u_char *bp, u_int length) |
michael@657 | 71 | { |
michael@657 | 72 | - register const struct ether_header *ep; |
michael@657 | 73 | + register const struct tcpdump_ether_header *ep; |
michael@657 | 74 | u_int16_t ether_type; |
michael@657 | 75 | |
michael@657 | 76 | - ep = (const struct ether_header *)bp; |
michael@657 | 77 | + ep = (const struct tcpdump_ether_header *)bp; |
michael@657 | 78 | |
michael@657 | 79 | (void)printf("%s > %s", |
michael@657 | 80 | etheraddr_string(ESRC(ep)), |
michael@657 | 81 | @@ -123,7 +123,7 @@ |
michael@657 | 82 | ether_print(const u_char *p, u_int length, u_int caplen, |
michael@657 | 83 | void (*print_encap_header)(const u_char *), const u_char *encap_header_arg) |
michael@657 | 84 | { |
michael@657 | 85 | - struct ether_header *ep; |
michael@657 | 86 | + struct tcpdump_ether_header *ep; |
michael@657 | 87 | u_int orig_length; |
michael@657 | 88 | u_short ether_type; |
michael@657 | 89 | u_short extracted_ether_type; |
michael@657 | 90 | @@ -142,7 +142,7 @@ |
michael@657 | 91 | |
michael@657 | 92 | length -= ETHER_HDRLEN; |
michael@657 | 93 | caplen -= ETHER_HDRLEN; |
michael@657 | 94 | - ep = (struct ether_header *)p; |
michael@657 | 95 | + ep = (struct tcpdump_ether_header *)p; |
michael@657 | 96 | p += ETHER_HDRLEN; |
michael@657 | 97 | |
michael@657 | 98 | ether_type = EXTRACT_16BITS(&ep->ether_type); |
michael@657 | 99 | Index: print-fddi.c |
michael@657 | 100 | --- print-fddi.c.orig 2010-03-12 02:56:44.000000000 +0100 |
michael@657 | 101 | +++ print-fddi.c 2010-03-31 09:51:51.000000000 +0200 |
michael@657 | 102 | @@ -242,7 +242,7 @@ |
michael@657 | 103 | fddi_print(const u_char *p, u_int length, u_int caplen) |
michael@657 | 104 | { |
michael@657 | 105 | const struct fddi_header *fddip = (const struct fddi_header *)p; |
michael@657 | 106 | - struct ether_header ehdr; |
michael@657 | 107 | + struct tcpdump_ether_header ehdr; |
michael@657 | 108 | u_short extracted_ethertype; |
michael@657 | 109 | |
michael@657 | 110 | if (caplen < FDDI_HDRLEN) { |
michael@657 | 111 | Index: print-ipfc.c |
michael@657 | 112 | --- print-ipfc.c.orig 2010-03-12 02:56:44.000000000 +0100 |
michael@657 | 113 | +++ print-ipfc.c 2010-03-31 09:51:51.000000000 +0200 |
michael@657 | 114 | @@ -81,7 +81,7 @@ |
michael@657 | 115 | ipfc_print(const u_char *p, u_int length, u_int caplen) |
michael@657 | 116 | { |
michael@657 | 117 | const struct ipfc_header *ipfcp = (const struct ipfc_header *)p; |
michael@657 | 118 | - struct ether_header ehdr; |
michael@657 | 119 | + struct tcpdump_ether_header ehdr; |
michael@657 | 120 | u_short extracted_ethertype; |
michael@657 | 121 | |
michael@657 | 122 | if (caplen < IPFC_HDRLEN) { |
michael@657 | 123 | Index: print-rrcp.c |
michael@657 | 124 | --- print-rrcp.c.orig 2010-03-12 02:56:44.000000000 +0100 |
michael@657 | 125 | +++ print-rrcp.c 2010-03-31 09:55:19.000000000 +0200 |
michael@657 | 126 | @@ -88,11 +88,11 @@ |
michael@657 | 127 | const u_char *rrcp; |
michael@657 | 128 | u_int8_t rrcp_proto; |
michael@657 | 129 | u_int8_t rrcp_opcode; |
michael@657 | 130 | - register const struct ether_header *ep; |
michael@657 | 131 | + register const struct tcpdump_ether_header *ep; |
michael@657 | 132 | char proto_str[16]; |
michael@657 | 133 | char opcode_str[32]; |
michael@657 | 134 | |
michael@657 | 135 | - ep = (const struct ether_header *)cp; |
michael@657 | 136 | + ep = (const struct tcpdump_ether_header *)cp; |
michael@657 | 137 | rrcp = cp + ETHER_HDRLEN; |
michael@657 | 138 | |
michael@657 | 139 | ND_TCHECK(*(rrcp + RRCP_PROTO_OFFSET)); |
michael@657 | 140 | Index: print-token.c |
michael@657 | 141 | --- print-token.c.orig 2010-03-12 02:56:44.000000000 +0100 |
michael@657 | 142 | +++ print-token.c 2010-03-31 09:51:51.000000000 +0200 |
michael@657 | 143 | @@ -103,7 +103,7 @@ |
michael@657 | 144 | { |
michael@657 | 145 | const struct token_header *trp; |
michael@657 | 146 | u_short extracted_ethertype; |
michael@657 | 147 | - struct ether_header ehdr; |
michael@657 | 148 | + struct tcpdump_ether_header ehdr; |
michael@657 | 149 | u_int route_len = 0, hdr_len = TOKEN_HDRLEN; |
michael@657 | 150 | int seg; |
michael@657 | 151 | |
michael@657 | 152 | Index: print-pflog.c |
michael@657 | 153 | --- print-pflog.c.orig 2010-03-12 02:56:44.000000000 +0100 |
michael@657 | 154 | +++ print-pflog.c 2010-03-31 10:00:24.000000000 +0200 |
michael@657 | 155 | @@ -44,6 +44,7 @@ |
michael@657 | 156 | |
michael@657 | 157 | #include "interface.h" |
michael@657 | 158 | #include "addrtoname.h" |
michael@657 | 159 | +#include "extract.h" |
michael@657 | 160 | |
michael@657 | 161 | static struct tok pf_reasons[] = { |
michael@657 | 162 | { 0, "0(match)" }, |