Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/external/bsd/tcpdump merge conflicts.
details: https://anonhg.NetBSD.org/src/rev/6f12d2984d4a
branches: trunk
changeset: 350860:6f12d2984d4a
user: christos <christos%NetBSD.org@localhost>
date: Tue Jan 24 23:29:13 2017 +0000
description:
merge conflicts.
diffstat:
external/bsd/tcpdump/bin/Makefile | 28 +-
external/bsd/tcpdump/dist/addrtoname.c | 224 +-
external/bsd/tcpdump/dist/addrtostr.c | 5 +
external/bsd/tcpdump/dist/af.c | 7 +-
external/bsd/tcpdump/dist/ascii_strcasecmp.c | 5 +
external/bsd/tcpdump/dist/atmuni31.h | 85 -
external/bsd/tcpdump/dist/bpf_dump.c | 7 +-
external/bsd/tcpdump/dist/checksum.c | 15 +-
external/bsd/tcpdump/dist/configure | 1133 +++++-------
external/bsd/tcpdump/dist/configure.in | 412 +---
external/bsd/tcpdump/dist/cpack.c | 24 +-
external/bsd/tcpdump/dist/cpack.h | 10 +-
external/bsd/tcpdump/dist/ether.h | 11 +-
external/bsd/tcpdump/dist/gmpls.c | 7 +-
external/bsd/tcpdump/dist/gmt2local.c | 5 +-
external/bsd/tcpdump/dist/in_cksum.c | 5 +
external/bsd/tcpdump/dist/interface.h | 137 +-
external/bsd/tcpdump/dist/ip.h | 44 +-
external/bsd/tcpdump/dist/ip6.h | 7 +-
external/bsd/tcpdump/dist/ipproto.c | 7 +-
external/bsd/tcpdump/dist/l2vpn.c | 7 +-
external/bsd/tcpdump/dist/machdep.c | 4 +-
external/bsd/tcpdump/dist/missing/addrinfo.h | 117 -
external/bsd/tcpdump/dist/missing/getnameinfo.c | 276 ---
external/bsd/tcpdump/dist/missing/inet_aton.c | 53 -
external/bsd/tcpdump/dist/missing/inet_ntop.c | 216 --
external/bsd/tcpdump/dist/missing/inet_pton.c | 49 -
external/bsd/tcpdump/dist/nameser.h | 14 -
external/bsd/tcpdump/dist/netdissect.h | 601 +++---
external/bsd/tcpdump/dist/nlpid.c | 7 +-
external/bsd/tcpdump/dist/oui.c | 7 +-
external/bsd/tcpdump/dist/parsenfsfh.c | 13 +-
external/bsd/tcpdump/dist/print-802_11.c | 1786 ++++++++++++--------
external/bsd/tcpdump/dist/print-802_15_4.c | 5 +
external/bsd/tcpdump/dist/print-ah.c | 7 +-
external/bsd/tcpdump/dist/print-ahcp.c | 78 +-
external/bsd/tcpdump/dist/print-aodv.c | 69 +-
external/bsd/tcpdump/dist/print-aoe.c | 50 +-
external/bsd/tcpdump/dist/print-ap1394.c | 17 +-
external/bsd/tcpdump/dist/print-arcnet.c | 7 +-
external/bsd/tcpdump/dist/print-arp.c | 9 +-
external/bsd/tcpdump/dist/print-ascii.c | 7 +-
external/bsd/tcpdump/dist/print-atalk.c | 25 +-
external/bsd/tcpdump/dist/print-atm.c | 116 +-
external/bsd/tcpdump/dist/print-babel.c | 5 +
external/bsd/tcpdump/dist/print-beep.c | 9 +-
external/bsd/tcpdump/dist/print-bfd.c | 7 +-
external/bsd/tcpdump/dist/print-bgp.c | 390 ++--
external/bsd/tcpdump/dist/print-bootp.c | 9 +-
external/bsd/tcpdump/dist/print-bt.c | 7 +-
external/bsd/tcpdump/dist/print-calm-fast.c | 5 +
external/bsd/tcpdump/dist/print-carp.c | 5 +
external/bsd/tcpdump/dist/print-cdp.c | 21 +-
external/bsd/tcpdump/dist/print-cfm.c | 9 +-
external/bsd/tcpdump/dist/print-chdlc.c | 7 +-
external/bsd/tcpdump/dist/print-cip.c | 25 +-
external/bsd/tcpdump/dist/print-cnfp.c | 7 +-
external/bsd/tcpdump/dist/print-dccp.c | 48 +-
external/bsd/tcpdump/dist/print-decnet.c | 69 +-
external/bsd/tcpdump/dist/print-dhcp6.c | 91 +-
external/bsd/tcpdump/dist/print-domain.c | 22 +-
external/bsd/tcpdump/dist/print-dtp.c | 5 +
external/bsd/tcpdump/dist/print-dvmrp.c | 7 +-
external/bsd/tcpdump/dist/print-eap.c | 7 +-
external/bsd/tcpdump/dist/print-egp.c | 11 +-
external/bsd/tcpdump/dist/print-eigrp.c | 7 +-
external/bsd/tcpdump/dist/print-enc.c | 9 +-
external/bsd/tcpdump/dist/print-esp.c | 136 +-
external/bsd/tcpdump/dist/print-ether.c | 164 +-
external/bsd/tcpdump/dist/print-fddi.c | 50 +-
external/bsd/tcpdump/dist/print-forces.c | 84 +-
external/bsd/tcpdump/dist/print-fr.c | 47 +-
external/bsd/tcpdump/dist/print-frag6.c | 10 +-
external/bsd/tcpdump/dist/print-ftp.c | 5 +
external/bsd/tcpdump/dist/print-geneve.c | 5 +
external/bsd/tcpdump/dist/print-geonet.c | 5 +
external/bsd/tcpdump/dist/print-gre.c | 23 +-
external/bsd/tcpdump/dist/print-hncp.c | 5 +
external/bsd/tcpdump/dist/print-hsrp.c | 9 +-
external/bsd/tcpdump/dist/print-http.c | 5 +
external/bsd/tcpdump/dist/print-icmp.c | 41 +-
external/bsd/tcpdump/dist/print-icmp6.c | 183 +-
external/bsd/tcpdump/dist/print-igmp.c | 9 +-
external/bsd/tcpdump/dist/print-igrp.c | 25 +-
external/bsd/tcpdump/dist/print-ip.c | 26 +-
external/bsd/tcpdump/dist/print-ip6.c | 170 +-
external/bsd/tcpdump/dist/print-ip6opts.c | 13 +-
external/bsd/tcpdump/dist/print-ipcomp.c | 11 +-
external/bsd/tcpdump/dist/print-ipfc.c | 46 +-
external/bsd/tcpdump/dist/print-ipnet.c | 6 +
external/bsd/tcpdump/dist/print-ipx.c | 25 +-
external/bsd/tcpdump/dist/print-isakmp.c | 277 +-
external/bsd/tcpdump/dist/print-isoclns.c | 265 +-
external/bsd/tcpdump/dist/print-juniper.c | 27 +-
external/bsd/tcpdump/dist/print-krb.c | 11 +-
external/bsd/tcpdump/dist/print-l2tp.c | 73 +-
external/bsd/tcpdump/dist/print-lane.c | 11 +-
external/bsd/tcpdump/dist/print-ldp.c | 13 +-
external/bsd/tcpdump/dist/print-lisp.c | 5 +
external/bsd/tcpdump/dist/print-llc.c | 206 +-
external/bsd/tcpdump/dist/print-lldp.c | 11 +-
external/bsd/tcpdump/dist/print-lmp.c | 17 +-
external/bsd/tcpdump/dist/print-loopback.c | 26 +-
external/bsd/tcpdump/dist/print-lspping.c | 17 +-
external/bsd/tcpdump/dist/print-lwapp.c | 7 +-
external/bsd/tcpdump/dist/print-lwres.c | 39 +-
external/bsd/tcpdump/dist/print-m3ua.c | 28 +-
external/bsd/tcpdump/dist/print-medsa.c | 5 +
external/bsd/tcpdump/dist/print-mobile.c | 11 +-
external/bsd/tcpdump/dist/print-mobility.c | 41 +-
external/bsd/tcpdump/dist/print-mpcp.c | 7 +-
external/bsd/tcpdump/dist/print-mpls.c | 9 +-
external/bsd/tcpdump/dist/print-mptcp.c | 5 +
external/bsd/tcpdump/dist/print-msdp.c | 7 +-
external/bsd/tcpdump/dist/print-msnlb.c | 5 +
external/bsd/tcpdump/dist/print-nflog.c | 5 +
external/bsd/tcpdump/dist/print-nfs.c | 96 +-
external/bsd/tcpdump/dist/print-nsh.c | 5 +
external/bsd/tcpdump/dist/print-ntp.c | 29 +-
external/bsd/tcpdump/dist/print-null.c | 9 +-
external/bsd/tcpdump/dist/print-olsr.c | 5 +
external/bsd/tcpdump/dist/print-openflow-1.0.c | 5 +
external/bsd/tcpdump/dist/print-openflow.c | 5 +
external/bsd/tcpdump/dist/print-ospf.c | 147 +-
external/bsd/tcpdump/dist/print-ospf6.c | 65 +-
external/bsd/tcpdump/dist/print-otv.c | 5 +
external/bsd/tcpdump/dist/print-pflog.c | 7 +-
external/bsd/tcpdump/dist/print-pfsync.c | 50 +-
external/bsd/tcpdump/dist/print-pgm.c | 288 +-
external/bsd/tcpdump/dist/print-pim.c | 103 +-
external/bsd/tcpdump/dist/print-pktap.c | 20 +-
external/bsd/tcpdump/dist/print-ppi.c | 5 +
external/bsd/tcpdump/dist/print-ppp.c | 7 +-
external/bsd/tcpdump/dist/print-pppoe.c | 17 +-
external/bsd/tcpdump/dist/print-pptp.c | 39 +-
external/bsd/tcpdump/dist/print-radius.c | 55 +-
external/bsd/tcpdump/dist/print-raw.c | 7 +-
external/bsd/tcpdump/dist/print-resp.c | 5 +
external/bsd/tcpdump/dist/print-rip.c | 37 +-
external/bsd/tcpdump/dist/print-ripng.c | 12 +-
external/bsd/tcpdump/dist/print-rpki-rtr.c | 37 +-
external/bsd/tcpdump/dist/print-rrcp.c | 19 +-
external/bsd/tcpdump/dist/print-rsvp.c | 164 +-
external/bsd/tcpdump/dist/print-rt6.c | 32 +-
external/bsd/tcpdump/dist/print-rtsp.c | 5 +
external/bsd/tcpdump/dist/print-rx.c | 130 +-
external/bsd/tcpdump/dist/print-sctp.c | 221 +-
external/bsd/tcpdump/dist/print-sflow.c | 64 +-
external/bsd/tcpdump/dist/print-sip.c | 7 +-
external/bsd/tcpdump/dist/print-sl.c | 25 +-
external/bsd/tcpdump/dist/print-sll.c | 36 +-
external/bsd/tcpdump/dist/print-slow.c | 9 +-
external/bsd/tcpdump/dist/print-smb.c | 25 +-
external/bsd/tcpdump/dist/print-smtp.c | 5 +
external/bsd/tcpdump/dist/print-snmp.c | 80 +-
external/bsd/tcpdump/dist/print-stp.c | 9 +-
external/bsd/tcpdump/dist/print-sunatm.c | 7 +-
external/bsd/tcpdump/dist/print-sunrpc.c | 21 +-
external/bsd/tcpdump/dist/print-symantec.c | 15 +-
external/bsd/tcpdump/dist/print-syslog.c | 7 +-
external/bsd/tcpdump/dist/print-tcp.c | 228 +-
external/bsd/tcpdump/dist/print-telnet.c | 7 +-
external/bsd/tcpdump/dist/print-tftp.c | 9 +-
external/bsd/tcpdump/dist/print-timed.c | 15 +-
external/bsd/tcpdump/dist/print-tipc.c | 5 +
external/bsd/tcpdump/dist/print-token.c | 39 +-
external/bsd/tcpdump/dist/print-udld.c | 5 +
external/bsd/tcpdump/dist/print-udp.c | 247 +-
external/bsd/tcpdump/dist/print-usb.c | 5 +
external/bsd/tcpdump/dist/print-vjc.c | 16 +-
external/bsd/tcpdump/dist/print-vqp.c | 7 +-
external/bsd/tcpdump/dist/print-vrrp.c | 9 +-
external/bsd/tcpdump/dist/print-vtp.c | 5 +
external/bsd/tcpdump/dist/print-vxlan-gpe.c | 5 +
external/bsd/tcpdump/dist/print-vxlan.c | 5 +
external/bsd/tcpdump/dist/print-wb.c | 41 +-
external/bsd/tcpdump/dist/print-zephyr.c | 59 +-
external/bsd/tcpdump/dist/print-zeromq.c | 5 +
external/bsd/tcpdump/dist/print.c | 8 +
external/bsd/tcpdump/dist/setsignal.c | 4 +-
external/bsd/tcpdump/dist/signature.c | 94 +-
external/bsd/tcpdump/dist/smbutil.c | 12 +-
external/bsd/tcpdump/dist/strcasecmp.c | 93 -
external/bsd/tcpdump/dist/strtoaddr.c | 5 +
external/bsd/tcpdump/dist/tcp.h | 77 +-
external/bsd/tcpdump/dist/tcpdump-stdinc.h | 352 ----
external/bsd/tcpdump/dist/tcpdump.1.in | 29 +-
external/bsd/tcpdump/dist/tcpdump.c | 1157 ++++--------
external/bsd/tcpdump/dist/udp.h | 325 +++-
external/bsd/tcpdump/dist/util-print.c | 5 +
external/bsd/tcpdump/dist/util.c | 725 +--------
external/bsd/tcpdump/dist/vfprintf.c | 4 +-
external/bsd/tcpdump/dist/win32/Include/w32_fzs.h | 48 -
external/bsd/tcpdump/include/config.h | 50 +-
194 files changed, 6351 insertions(+), 8021 deletions(-)
diffs (truncated from 28738 to 300 lines):
diff -r ee3c04d1782c -r 6f12d2984d4a external/bsd/tcpdump/bin/Makefile
--- a/external/bsd/tcpdump/bin/Makefile Tue Jan 24 23:27:52 2017 +0000
+++ b/external/bsd/tcpdump/bin/Makefile Tue Jan 24 23:29:13 2017 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.16 2017/01/11 12:19:43 joerg Exp $
+# $NetBSD: Makefile,v 1.17 2017/01/24 23:29:13 christos Exp $
WARNS?= 1 # XXX: need to cleanup later
@@ -17,7 +17,8 @@
SRCS= addrtoname.c cpack.c gmpls.c gmt2local.c machdep.c oui.c parsenfsfh.c \
setsignal.c smbutil.c tcpdump.c util.c checksum.c signature.c \
- l2vpn.c nlpid.c ipproto.c af.c in_cksum.c pf_print_state.c
+ l2vpn.c nlpid.c ipproto.c af.c in_cksum.c pf_print_state.c \
+ util-print.c addrtostr.c ascii_strcasecmp.c print.c strtoaddr.c
SRCS+= bpf_dump.c
SRCS+= version.c
@@ -61,18 +62,17 @@
print-fddi.c \
print-forces.c \
print-fr.c \
-print-frag6.c \
print-ftp.c \
print-geneve.c \
print-geonet.c \
print-gre.c \
+print-hncp.c \
print-hsrp.c \
print-http.c \
print-icmp.c \
print-igmp.c \
print-igrp.c \
print-ip.c \
-print-ip6.c \
print-ipcomp.c \
print-ipfc.c \
print-ipnet.c \
@@ -84,6 +84,7 @@
print-l2tp.c \
print-lane.c \
print-ldp.c \
+print-lisp.c \
print-llc.c \
print-lldp.c \
print-lmp.c \
@@ -92,6 +93,7 @@
print-lwapp.c \
print-lwres.c \
print-m3ua.c \
+print-medsa.c \
print-mobile.c \
print-mobility.c \
print-mpcp.c \
@@ -101,11 +103,12 @@
print-msnlb.c \
print-nflog.c \
print-nfs.c \
+print-nsh.c \
print-ntp.c \
print-null.c \
print-olsr.c \
+print-openflow-1.0.c \
print-openflow.c \
-print-openflow-1.0.c \
print-ospf.c \
print-otv.c \
print-pflog.c \
@@ -119,6 +122,7 @@
print-pptp.c \
print-radius.c \
print-raw.c \
+print-resp.c \
print-rip.c \
print-ripng.c \
print-rpki-rtr.c \
@@ -153,6 +157,7 @@
print-vqp.c \
print-vrrp.c \
print-vtp.c \
+print-vxlan-gpe.c \
print-vxlan.c \
print-wb.c \
print-zephyr.c \
@@ -177,10 +182,17 @@
CPPFLAGS+=-DWITH_CHROOT=\"/var/chroot/tcpdump\"
.if (${USE_INET6} != "no")
-SRCS+= print-babel.c print-ip6opts.c print-icmp6.c \
- print-rt6.c print-dhcp6.c print-ospf6.c
+SRCS+= \
+print-babel.c \
+print-ip6opts.c \
+print-dhcp6.c \
+print-frag6.c \
+print-icmp6.c \
+print-ip6.c \
+print-ospf6.c \
+print-rt6.c
-CPPFLAGS+=-DINET6=1 -DHAVE_RES_USE_INET6=1
+CPPFLAGS+=-DHAVE_OS_IPV6_SUPPORT=1
.endif
.if (${MKCRYPTO} != "no")
diff -r ee3c04d1782c -r 6f12d2984d4a external/bsd/tcpdump/dist/addrtoname.c
--- a/external/bsd/tcpdump/dist/addrtoname.c Tue Jan 24 23:27:52 2017 +0000
+++ b/external/bsd/tcpdump/dist/addrtoname.c Tue Jan 24 23:29:13 2017 +0000
@@ -23,15 +23,14 @@
*/
#include <sys/cdefs.h>
#ifndef lint
-__RCSID("$NetBSD: addrtoname.c,v 1.7 2015/03/31 21:59:35 christos Exp $");
+__RCSID("$NetBSD: addrtoname.c,v 1.8 2017/01/24 23:29:13 christos Exp $");
#endif
-#define NETDISSECT_REWORKED
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
-#include <tcpdump-stdinc.h>
+#include <netdissect-stdinc.h>
#ifdef USE_ETHER_NTOHOST
#ifdef HAVE_NETINET_IF_ETHER_H
@@ -62,8 +61,10 @@
#include <string.h>
#include <stdlib.h>
-#include "interface.h"
+#include "netdissect.h"
#include "addrtoname.h"
+#include "addrtostr.h"
+#include "ethertype.h"
#include "llc.h"
#include "setsignal.h"
#include "extract.h"
@@ -76,7 +77,7 @@
/*
* hash tables for whatever-to-name translations
*
- * XXX there has to be error checks against strdup(3) failure
+ * ndo_error() called on strdup(3) failure
*/
#define HASHNAMESIZE 4096
@@ -94,7 +95,7 @@
static struct hnamemem dnaddrtable[HASHNAMESIZE];
static struct hnamemem ipxsaptable[HASHNAMESIZE];
-#if defined(INET6) && defined(WIN32)
+#ifdef _WIN32
/*
* fake gethostbyaddr for Win2k/XP
* gethostbyaddr() returns incorrect value when AF_INET6 is passed
@@ -132,9 +133,8 @@
}
}
#define gethostbyaddr win32_gethostbyaddr
-#endif /* INET6 & WIN32 */
+#endif /* _WIN32 */
-#ifdef INET6
struct h6namemem {
struct in6_addr addr;
char *name;
@@ -142,7 +142,6 @@
};
static struct h6namemem h6nametable[HASHNAMESIZE];
-#endif /* INET6 */
struct enamemem {
u_short e_addr0;
@@ -209,7 +208,7 @@
*
* NOTE: ap is *NOT* necessarily part of the packet data (not even if
* this is being called with the "ipaddr_string()" macro), so you
- * *CANNOT* use the TCHECK{2}/TTEST{2} macros on it. Furthermore,
+ * *CANNOT* use the ND_TCHECK{2}/ND_TTEST{2} macros on it. Furthermore,
* even in cases where it *is* part of the packet data, the caller
* would still have to check for a null return value, even if it's
* just printing the return value with "%s" - not all versions of
@@ -227,7 +226,7 @@
{
register struct hostent *hp;
uint32_t addr;
- static struct hnamemem *p; /* static for longjmp() */
+ struct hnamemem *p;
memcpy(&addr, ap, sizeof(addr));
p = &hnametable[addr & (HASHNAMESIZE-1)];
@@ -236,7 +235,7 @@
return (p->name);
}
p->addr = addr;
- p->nxt = newhnamemem();
+ p->nxt = newhnamemem(ndo);
/*
* Print names unless:
@@ -252,6 +251,9 @@
char *dotp;
p->name = strdup(hp->h_name);
+ if (p->name == NULL)
+ (*ndo->ndo_error)(ndo,
+ "getname: strdup(hp->h_name)");
if (ndo->ndo_Nflag) {
/* Remove domain qualifications */
dotp = strchr(p->name, '.');
@@ -262,10 +264,11 @@
}
}
p->name = strdup(intoa(addr));
+ if (p->name == NULL)
+ (*ndo->ndo_error)(ndo, "getname: strdup(intoa(addr))");
return (p->name);
}
-#ifdef INET6
/*
* Return a name for the IP6 address pointed to by ap. This address
* is assumed to be in network byte order.
@@ -281,7 +284,7 @@
uint16_t d;
} addra;
} addr;
- static struct h6namemem *p; /* static for longjmp() */
+ struct h6namemem *p;
register const char *cp;
char ntop_buf[INET6_ADDRSTRLEN];
@@ -292,7 +295,7 @@
return (p->name);
}
p->addr = addr.addr;
- p->nxt = newh6namemem();
+ p->nxt = newh6namemem(ndo);
/*
* Do not print names if -n was given.
@@ -303,6 +306,9 @@
char *dotp;
p->name = strdup(hp->h_name);
+ if (p->name == NULL)
+ (*ndo->ndo_error)(ndo,
+ "getname6: strdup(hp->h_name)");
if (ndo->ndo_Nflag) {
/* Remove domain qualifications */
dotp = strchr(p->name, '.');
@@ -312,11 +318,12 @@
return (p->name);
}
}
- cp = inet_ntop(AF_INET6, &addr, ntop_buf, sizeof(ntop_buf));
+ cp = addrtostr6(ap, ntop_buf, sizeof(ntop_buf));
p->name = strdup(cp);
+ if (p->name == NULL)
+ (*ndo->ndo_error)(ndo, "getname6: strdup(cp)");
return (p->name);
}
-#endif /* INET6 */
static const char hex[] = "0123456789abcdef";
@@ -324,7 +331,7 @@
/* Find the hash node that corresponds the ether address 'ep' */
static inline struct enamemem *
-lookup_emem(const u_char *ep)
+lookup_emem(netdissect_options *ndo, const u_char *ep)
{
register u_int i, j, k;
struct enamemem *tp;
@@ -346,7 +353,7 @@
tp->e_addr2 = k;
tp->e_nxt = (struct enamemem *)calloc(1, sizeof(*tp));
if (tp->e_nxt == NULL)
- error("lookup_emem: calloc");
+ (*ndo->ndo_error)(ndo, "lookup_emem: calloc");
return tp;
}
@@ -357,7 +364,8 @@
*/
static inline struct enamemem *
-lookup_bytestring(register const u_char *bs, const unsigned int nlen)
+lookup_bytestring(netdissect_options *ndo, register const u_char *bs,
+ const unsigned int nlen)
{
struct enamemem *tp;
register u_int i, j, k;
@@ -389,12 +397,12 @@
tp->e_bs = (u_char *) calloc(1, nlen + 1);
Home |
Main Index |
Thread Index |
Old Index