CVS commit: src/external/bsd/tcpdump

2023-11-08 Thread Simon Burge
Module Name:src
Committed By:   simonb
Date:   Wed Nov  8 14:25:13 UTC 2023

Modified Files:
src/external/bsd/tcpdump: tcpdump2netbsd

Log Message:
Fix some comments.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/external/bsd/tcpdump/tcpdump2netbsd

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/tcpdump/tcpdump2netbsd
diff -u src/external/bsd/tcpdump/tcpdump2netbsd:1.3 src/external/bsd/tcpdump/tcpdump2netbsd:1.4
--- src/external/bsd/tcpdump/tcpdump2netbsd:1.3	Tue Oct  1 16:06:15 2019
+++ src/external/bsd/tcpdump/tcpdump2netbsd	Wed Nov  8 14:25:13 2023
@@ -1,6 +1,6 @@
 #! /bin/sh
 #
-#	$NetBSD: tcpdump2netbsd,v 1.3 2019/10/01 16:06:15 christos Exp $
+#	$NetBSD: tcpdump2netbsd,v 1.4 2023/11/08 14:25:13 simonb Exp $
 #
 # Copyright (c) 2000 The NetBSD Foundation, Inc.
 # All rights reserved.
@@ -26,14 +26,14 @@
 # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 # POSSIBILITY OF SUCH DAMAGE.
 #
-# amd2netbsd:  convert an amd source tree into a
-# netbsd amd source tree, under src/dist,
+# tcpdump2netbsd:  convert an tcpdump source tree into a
+# netbsd tcpdump source tree, under src/dist,
 # based on bind2netbsd by Bernd Ernesti and changes by Simon Burge
 #
-# Rough instructions for importing new amd release:
+# Rough instructions for importing new tcpdump release:
 #
 #	$ cd /some/where/temporary
-#	$ tar xpfz /new/amd/release/tar/file
+#	$ tar xpfz /new/tcpdump/release/tar/file
 #	$ sh /usr/src/external/bsd/tcpdump/dist/tcpdump2netbsd tcpdump-x.y.z
 #	$ cd src/external/bsd/tcpdump
 #	$ cvs -d cvs.netbsd.org:/cvsroot import -m "Import tcpdump x.y.z" src/external/bsd/tcpdump/dist TCPDUMP tcpdump-x-y-z



CVS commit: src/external/bsd/tcpdump

2023-11-08 Thread Simon Burge
Module Name:src
Committed By:   simonb
Date:   Wed Nov  8 14:25:13 UTC 2023

Modified Files:
src/external/bsd/tcpdump: tcpdump2netbsd

Log Message:
Fix some comments.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/external/bsd/tcpdump/tcpdump2netbsd

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/external/bsd/tcpdump/bin

2023-08-18 Thread Tobias Nygren
Module Name:src
Committed By:   tnn
Date:   Fri Aug 18 12:55:50 UTC 2023

Modified Files:
src/external/bsd/tcpdump/bin: Makefile

Log Message:
tcpdump: print-medsa.c is gone


To generate a diff of this commit:
cvs rdiff -u -r1.26 -r1.27 src/external/bsd/tcpdump/bin/Makefile

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/tcpdump/bin/Makefile
diff -u src/external/bsd/tcpdump/bin/Makefile:1.26 src/external/bsd/tcpdump/bin/Makefile:1.27
--- src/external/bsd/tcpdump/bin/Makefile:1.26	Thu Aug 17 20:19:39 2023
+++ src/external/bsd/tcpdump/bin/Makefile	Fri Aug 18 12:55:50 2023
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.26 2023/08/17 20:19:39 christos Exp $	
+#	$NetBSD: Makefile,v 1.27 2023/08/18 12:55:50 tnn Exp $	
 
 WARNS?=	1	# XXX: need to cleanup later
 
@@ -101,7 +101,6 @@ print-lwapp.c \
 print-lwres.c \
 print-m3ua.c \
 print-macsec.c \
-print-medsa.c \
 print-mobile.c \
 print-mobility.c \
 print-mpcp.c \



CVS commit: src/external/bsd/tcpdump/bin

2023-08-18 Thread Tobias Nygren
Module Name:src
Committed By:   tnn
Date:   Fri Aug 18 12:55:50 UTC 2023

Modified Files:
src/external/bsd/tcpdump/bin: Makefile

Log Message:
tcpdump: print-medsa.c is gone


To generate a diff of this commit:
cvs rdiff -u -r1.26 -r1.27 src/external/bsd/tcpdump/bin/Makefile

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/external/bsd/tcpdump/dist

2023-08-18 Thread Tobias Nygren
Module Name:src
Committed By:   tnn
Date:   Fri Aug 18 12:53:04 UTC 2023

Added Files:
src/external/bsd/tcpdump/dist: ntp.h

Log Message:
tcpdump: fix mismerge (revive ntp.h)


To generate a diff of this commit:
cvs rdiff -u -r0 -r1.3 src/external/bsd/tcpdump/dist/ntp.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/external/bsd/tcpdump/dist

2023-08-18 Thread Tobias Nygren
Module Name:src
Committed By:   tnn
Date:   Fri Aug 18 12:53:04 UTC 2023

Added Files:
src/external/bsd/tcpdump/dist: ntp.h

Log Message:
tcpdump: fix mismerge (revive ntp.h)


To generate a diff of this commit:
cvs rdiff -u -r0 -r1.3 src/external/bsd/tcpdump/dist/ntp.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Added files:

Index: src/external/bsd/tcpdump/dist/ntp.h
diff -u /dev/null src/external/bsd/tcpdump/dist/ntp.h:1.3
--- /dev/null	Fri Aug 18 12:53:04 2023
+++ src/external/bsd/tcpdump/dist/ntp.h	Fri Aug 18 12:53:03 2023
@@ -0,0 +1,54 @@
+/*
+ * Copyright (c) 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997
+ *	The Regents of the University of California.  All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that: (1) source code distributions
+ * retain the above copyright notice and this paragraph in its entirety, (2)
+ * distributions including binary code include the above copyright notice and
+ * this paragraph in its entirety in the documentation or other materials
+ * provided with the distribution, and (3) all advertising materials mentioning
+ * features or use of this software display the following acknowledgement:
+ * ``This product includes software developed by the University of California,
+ * Lawrence Berkeley Laboratory and its contributors.'' Neither the name of
+ * the University nor the names of its contributors may be used to endorse
+ * or promote products derived from this software without specific prior
+ * written permission.
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+ *
+ */
+
+#include "netdissect-stdinc.h"
+
+#include "netdissect.h"
+
+/*
+ * Structure definitions for NTP fixed point values
+ *
+ *0			  1		  2			  3
+ *0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+ *   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ *   |			   Integer Part			 |
+ *   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ *   |			   Fraction Part			 |
+ *   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ *
+ *0			  1		  2			  3
+ *0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+ *   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ *   |		  Integer Part	 |	   Fraction Part	 |
+ *   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+*/
+struct l_fixedpt {
+	nd_uint32_t int_part;
+	nd_uint32_t fraction;
+};
+
+struct s_fixedpt {
+	nd_uint16_t int_part;
+	nd_uint16_t fraction;
+};
+
+void p_ntp_time(netdissect_options *, const struct l_fixedpt *);



CVS commit: src/external/bsd/tcpdump

2023-08-17 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Thu Aug 17 20:19:42 UTC 2023

Modified Files:
src/external/bsd/tcpdump/bin: Makefile
src/external/bsd/tcpdump/dist: addrtoname.c addrtostr.c af.c ah.h
ascii_strcasecmp.c bpf_dump.c checksum.c config.guess config.sub
configure cpack.c cpack.h extract.h gmpls.c in_cksum.c interface.h
ip.h ip6.h ipproto.c ipproto.h l2vpn.c machdep.c nameser.h
netdissect-stdinc.h netdissect.c netdissect.h nfs.h nlpid.c oui.c
parsenfsfh.c print-802_11.c print-802_15_4.c print-ah.c
print-ahcp.c print-aodv.c print-aoe.c print-ap1394.c print-arcnet.c
print-arp.c print-ascii.c print-atalk.c print-atm.c print-babel.c
print-beep.c print-bfd.c print-bgp.c print-bootp.c print-bt.c
print-calm-fast.c print-carp.c print-cdp.c print-cfm.c
print-chdlc.c print-cip.c print-cnfp.c print-dccp.c print-decnet.c
print-dhcp6.c print-domain.c print-dtp.c print-dvmrp.c print-eap.c
print-egp.c print-eigrp.c print-enc.c print-esp.c print-ether.c
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-icmp6.c print-igmp.c print-igrp.c
print-ip.c print-ip6.c print-ip6opts.c print-ipcomp.c print-ipfc.c
print-ipnet.c print-ipx.c print-isakmp.c print-isoclns.c
print-juniper.c print-krb.c print-l2tp.c print-lane.c print-ldp.c
print-lisp.c print-llc.c print-lldp.c print-lmp.c print-loopback.c
print-lspping.c print-lwapp.c print-lwres.c print-m3ua.c
print-mobile.c print-mobility.c print-mpcp.c print-mpls.c
print-mptcp.c print-msdp.c 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-ospf.c print-ospf6.c
print-otv.c print-pflog.c print-pfsync.c print-pgm.c print-pim.c
print-pktap.c print-ppi.c print-ppp.c print-pppoe.c print-pptp.c
print-radius.c print-raw.c print-resp.c print-rip.c print-ripng.c
print-rpki-rtr.c print-rsvp.c print-rt6.c print-rtsp.c print-rx.c
print-sctp.c print-sflow.c print-sip.c print-sl.c print-sll.c
print-slow.c print-smb.c print-smtp.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-tipc.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-vxlan-gpe.c
print-vxlan.c print-wb.c print-zephyr.c print-zeromq.c print.c
signature.c smbutil.c strtoaddr.c tcp.h tcpdump.1.in tcpdump.c
udp.h util-print.c
src/external/bsd/tcpdump/include: config.h
Removed Files:
src/external/bsd/tcpdump/dist: CONTRIBUTING INSTALL.txt PLATFORMS
Readme.Win32 ether.h getopt_long.h gmt2local.c gmt2local.h
pcap_dump_ftell.c print-medsa.c print-rrcp.c rpl.h setsignal.c
setsignal.h vfprintf.c
src/external/bsd/tcpdump/dist/tests: SMBLIST TESTonce TESTrun.sh
ahcp.pcap bgp_mvpn_6_and_7.out bgp_mvpn_6_and_7.pcap crypto.sh
cve-2018-10105-segv-sflowprint.out
cve-2018-10105-segv-sflowprint.pcapng
cve-2018-10105_smbprint-readofsize1.out
cve-2018-10105_smbprint-readofsize1.pcap
cve-2018-10105_smbutil_withoutasan.out
cve-2018-10105_smbutil_withoutasan.pcap
cve2015-0261-ipv6.out.stderr eapon2.out eapon2.pcap esp4.out
hdlc_slarp.pcap heapoverflow-EXTRACT_16BITS.out
heapoverflow-EXTRACT_16BITS.pcap heapoverflow-ip_print_demux.out
heapoverflow-ip_print_demux.pcap hncp_prefix-oobr.pcapng
icmp-cksum-oobr-3.pcap icmp-cksum-oobr-4.pcap
ikev2pI2-segfault.pcap isakmp-no-none-np.pcap isis-seg-fault-1-v.sh
isis-seg-fault-1.pcap isis-seg-fault-2.pcap isis-seg-fault-3.pcap
juniper_atm1.out juniper_atm1.pcap juniper_es.out juniper_es.pcap
kday1.out.stderr kday2.out.stderr kday3.out.stderr kday4.out.stderr
kday5.out.stderr kday6.out.stderr kday7.out.stderr kday8.out.stderr
kh-addrfail-001.out kh-addrfail-001.out.stderr kh-addrfail-001.pcap
kh-addrfail-002.out kh-addrfail-002.out.stderr kh-addrfail-002.pcap
kh-addrfail-003.out kh-addrfail-003.out.stderr kh-addrfail-003.pcap
kh-addrfail-004.out kh-addrfail-004.out.stderr kh-addrfail-004.pcap
kh-addrfail-005.out kh-addrfail-005.out.stderr kh-addrfail-005.pcap
kh-addrfail-006.out kh-addrfail-006.out.stderr kh-addrfail-006.pcap
kh-addrfail-007.out 

CVS commit: src/external/bsd/tcpdump

2023-08-17 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Thu Aug 17 20:19:42 UTC 2023

Modified Files:
src/external/bsd/tcpdump/bin: Makefile
src/external/bsd/tcpdump/dist: addrtoname.c addrtostr.c af.c ah.h
ascii_strcasecmp.c bpf_dump.c checksum.c config.guess config.sub
configure cpack.c cpack.h extract.h gmpls.c in_cksum.c interface.h
ip.h ip6.h ipproto.c ipproto.h l2vpn.c machdep.c nameser.h
netdissect-stdinc.h netdissect.c netdissect.h nfs.h nlpid.c oui.c
parsenfsfh.c print-802_11.c print-802_15_4.c print-ah.c
print-ahcp.c print-aodv.c print-aoe.c print-ap1394.c print-arcnet.c
print-arp.c print-ascii.c print-atalk.c print-atm.c print-babel.c
print-beep.c print-bfd.c print-bgp.c print-bootp.c print-bt.c
print-calm-fast.c print-carp.c print-cdp.c print-cfm.c
print-chdlc.c print-cip.c print-cnfp.c print-dccp.c print-decnet.c
print-dhcp6.c print-domain.c print-dtp.c print-dvmrp.c print-eap.c
print-egp.c print-eigrp.c print-enc.c print-esp.c print-ether.c
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-icmp6.c print-igmp.c print-igrp.c
print-ip.c print-ip6.c print-ip6opts.c print-ipcomp.c print-ipfc.c
print-ipnet.c print-ipx.c print-isakmp.c print-isoclns.c
print-juniper.c print-krb.c print-l2tp.c print-lane.c print-ldp.c
print-lisp.c print-llc.c print-lldp.c print-lmp.c print-loopback.c
print-lspping.c print-lwapp.c print-lwres.c print-m3ua.c
print-mobile.c print-mobility.c print-mpcp.c print-mpls.c
print-mptcp.c print-msdp.c 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-ospf.c print-ospf6.c
print-otv.c print-pflog.c print-pfsync.c print-pgm.c print-pim.c
print-pktap.c print-ppi.c print-ppp.c print-pppoe.c print-pptp.c
print-radius.c print-raw.c print-resp.c print-rip.c print-ripng.c
print-rpki-rtr.c print-rsvp.c print-rt6.c print-rtsp.c print-rx.c
print-sctp.c print-sflow.c print-sip.c print-sl.c print-sll.c
print-slow.c print-smb.c print-smtp.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-tipc.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-vxlan-gpe.c
print-vxlan.c print-wb.c print-zephyr.c print-zeromq.c print.c
signature.c smbutil.c strtoaddr.c tcp.h tcpdump.1.in tcpdump.c
udp.h util-print.c
src/external/bsd/tcpdump/include: config.h
Removed Files:
src/external/bsd/tcpdump/dist: CONTRIBUTING INSTALL.txt PLATFORMS
Readme.Win32 ether.h getopt_long.h gmt2local.c gmt2local.h
pcap_dump_ftell.c print-medsa.c print-rrcp.c rpl.h setsignal.c
setsignal.h vfprintf.c
src/external/bsd/tcpdump/dist/tests: SMBLIST TESTonce TESTrun.sh
ahcp.pcap bgp_mvpn_6_and_7.out bgp_mvpn_6_and_7.pcap crypto.sh
cve-2018-10105-segv-sflowprint.out
cve-2018-10105-segv-sflowprint.pcapng
cve-2018-10105_smbprint-readofsize1.out
cve-2018-10105_smbprint-readofsize1.pcap
cve-2018-10105_smbutil_withoutasan.out
cve-2018-10105_smbutil_withoutasan.pcap
cve2015-0261-ipv6.out.stderr eapon2.out eapon2.pcap esp4.out
hdlc_slarp.pcap heapoverflow-EXTRACT_16BITS.out
heapoverflow-EXTRACT_16BITS.pcap heapoverflow-ip_print_demux.out
heapoverflow-ip_print_demux.pcap hncp_prefix-oobr.pcapng
icmp-cksum-oobr-3.pcap icmp-cksum-oobr-4.pcap
ikev2pI2-segfault.pcap isakmp-no-none-np.pcap isis-seg-fault-1-v.sh
isis-seg-fault-1.pcap isis-seg-fault-2.pcap isis-seg-fault-3.pcap
juniper_atm1.out juniper_atm1.pcap juniper_es.out juniper_es.pcap
kday1.out.stderr kday2.out.stderr kday3.out.stderr kday4.out.stderr
kday5.out.stderr kday6.out.stderr kday7.out.stderr kday8.out.stderr
kh-addrfail-001.out kh-addrfail-001.out.stderr kh-addrfail-001.pcap
kh-addrfail-002.out kh-addrfail-002.out.stderr kh-addrfail-002.pcap
kh-addrfail-003.out kh-addrfail-003.out.stderr kh-addrfail-003.pcap
kh-addrfail-004.out kh-addrfail-004.out.stderr kh-addrfail-004.pcap
kh-addrfail-005.out kh-addrfail-005.out.stderr kh-addrfail-005.pcap
kh-addrfail-006.out kh-addrfail-006.out.stderr kh-addrfail-006.pcap
kh-addrfail-007.out 

CVS commit: src/external/bsd/tcpdump/bin

2023-05-09 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Tue May  9 20:55:39 UTC 2023

Modified Files:
src/external/bsd/tcpdump/bin: Makefile

Log Message:
Handle OpenSSL-3.x


To generate a diff of this commit:
cvs rdiff -u -r1.21 -r1.22 src/external/bsd/tcpdump/bin/Makefile

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/tcpdump/bin/Makefile
diff -u src/external/bsd/tcpdump/bin/Makefile:1.21 src/external/bsd/tcpdump/bin/Makefile:1.22
--- src/external/bsd/tcpdump/bin/Makefile:1.21	Sun Apr 11 22:54:07 2021
+++ src/external/bsd/tcpdump/bin/Makefile	Tue May  9 16:55:39 2023
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.21 2021/04/12 02:54:07 mrg Exp $	
+#	$NetBSD: Makefile,v 1.22 2023/05/09 20:55:39 christos Exp $	
 
 WARNS?=	1	# XXX: need to cleanup later
 
@@ -208,5 +208,7 @@ tcpdump.8: tcpdump.1.in
 CWARNFLAGS.clang+=	-Wno-error=address-of-packed-member
 CWARNFLAGS.gcc+=	${GCC_NO_ADDR_OF_PACKED_MEMBER}
 COPTS.print-bgp.c+=	${GCC_NO_FORMAT_TRUNCATION}
+COPTS.signature.c+=	-Wno-error=deprecated-declarations
+COPTS.print-tcp.c+=	-Wno-error=deprecated-declarations
 
 .include 



CVS commit: src/external/bsd/tcpdump/bin

2023-05-09 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Tue May  9 20:55:39 UTC 2023

Modified Files:
src/external/bsd/tcpdump/bin: Makefile

Log Message:
Handle OpenSSL-3.x


To generate a diff of this commit:
cvs rdiff -u -r1.21 -r1.22 src/external/bsd/tcpdump/bin/Makefile

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/external/bsd/tcpdump/dist

2021-05-30 Thread Jason R Thorpe
Module Name:src
Committed By:   thorpej
Date:   Sun May 30 21:48:42 UTC 2021

Modified Files:
src/external/bsd/tcpdump/dist: print-icmp6.c

Log Message:
Minimal change to suppress unaligned access errors on NetBSD/alpha; add
the UNALIGNED decoration to icmp6 related structures.

PR bin/56199.


To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.14 src/external/bsd/tcpdump/dist/print-icmp6.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/tcpdump/dist/print-icmp6.c
diff -u src/external/bsd/tcpdump/dist/print-icmp6.c:1.13 src/external/bsd/tcpdump/dist/print-icmp6.c:1.14
--- src/external/bsd/tcpdump/dist/print-icmp6.c:1.13	Mon Feb 24 18:39:47 2020
+++ src/external/bsd/tcpdump/dist/print-icmp6.c	Sun May 30 21:48:42 2021
@@ -21,7 +21,7 @@
 
 #include 
 #ifndef lint
-__RCSID("$NetBSD: print-icmp6.c,v 1.13 2020/02/24 18:39:47 kamil Exp $");
+__RCSID("$NetBSD: print-icmp6.c,v 1.14 2021/05/30 21:48:42 thorpej Exp $");
 #endif
 
 /* \summary: IPv6 Internet Control Message Protocol (ICMPv6) printer */
@@ -91,7 +91,7 @@ struct icmp6_hdr {
 		uint16_t	icmp6_un_data16[2]; /* type-specific field */
 		uint8_t		icmp6_un_data8[4];  /* type-specific field */
 	} icmp6_dataun;
-};
+} UNALIGNED;
 
 #define icmp6_data32	icmp6_dataun.icmp6_un_data32
 #define icmp6_data16	icmp6_dataun.icmp6_un_data16
@@ -183,7 +183,7 @@ struct icmp6_hdr {
 struct mld6_hdr {
 	struct icmp6_hdr	mld6_hdr;
 	struct in6_addr		mld6_addr; /* multicast address */
-};
+} UNALIGNED;
 
 #define mld6_type	mld6_hdr.icmp6_type
 #define mld6_code	mld6_hdr.icmp6_code
@@ -201,7 +201,7 @@ struct mld6_hdr {
 struct nd_router_solicit {	/* router solicitation */
 	struct icmp6_hdr 	nd_rs_hdr;
 	/* could be followed by options */
-};
+} UNALIGNED;
 
 #define nd_rs_type	nd_rs_hdr.icmp6_type
 #define nd_rs_code	nd_rs_hdr.icmp6_code
@@ -213,7 +213,7 @@ struct nd_router_advert {	/* router adve
 	uint32_t		nd_ra_reachable;	/* reachable time */
 	uint32_t		nd_ra_retransmit;	/* retransmit timer */
 	/* could be followed by options */
-};
+} UNALIGNED;
 
 #define nd_ra_type		nd_ra_hdr.icmp6_type
 #define nd_ra_code		nd_ra_hdr.icmp6_code
@@ -241,7 +241,7 @@ struct nd_neighbor_solicit {	/* neighbor
 	struct icmp6_hdr	nd_ns_hdr;
 	struct in6_addr		nd_ns_target;	/*target address */
 	/* could be followed by options */
-};
+} UNALIGNED;
 
 #define nd_ns_type		nd_ns_hdr.icmp6_type
 #define nd_ns_code		nd_ns_hdr.icmp6_code
@@ -252,7 +252,7 @@ struct nd_neighbor_advert {	/* neighbor 
 	struct icmp6_hdr	nd_na_hdr;
 	struct in6_addr		nd_na_target;	/* target address */
 	/* could be followed by options */
-};
+} UNALIGNED;
 
 #define nd_na_type		nd_na_hdr.icmp6_type
 #define nd_na_code		nd_na_hdr.icmp6_code
@@ -268,7 +268,7 @@ struct nd_redirect {		/* redirect */
 	struct in6_addr		nd_rd_target;	/* target address */
 	struct in6_addr		nd_rd_dst;	/* destination address */
 	/* could be followed by options */
-};
+} UNALIGNED;
 
 #define nd_rd_type		nd_rd_hdr.icmp6_type
 #define nd_rd_code		nd_rd_hdr.icmp6_code
@@ -301,7 +301,7 @@ struct nd_opt_prefix_info {	/* prefix in
 	nd_uint32_t		nd_opt_pi_preferred_time;
 	nd_uint32_t		nd_opt_pi_reserved2;
 	struct in6_addr	nd_opt_pi_prefix;
-};
+} UNALIGNED;
 
 #define ND_OPT_PI_FLAG_ONLINK		0x80
 #define ND_OPT_PI_FLAG_AUTO		0x40
@@ -313,14 +313,14 @@ struct nd_opt_rd_hdr { /* redire
 	uint16_t	nd_opt_rh_reserved1;
 	uint32_t	nd_opt_rh_reserved2;
 	/* followed by IP header and data */
-};
+} UNALIGNED;
 
 struct nd_opt_mtu {		/* MTU option */
 	uint8_t		nd_opt_mtu_type;
 	uint8_t		nd_opt_mtu_len;
 	uint16_t	nd_opt_mtu_reserved;
 	uint32_t	nd_opt_mtu_mtu;
-};
+} UNALIGNED;
 
 struct nd_opt_rdnss {		/* RDNSS RFC 6106 5.1 */
 	uint8_t		nd_opt_rdnss_type;
@@ -328,7 +328,7 @@ struct nd_opt_rdnss {		/* RDNSS RFC 6106
 	uint16_t	nd_opt_rdnss_reserved;
 	uint32_t	nd_opt_rdnss_lifetime;
 	struct in6_addr nd_opt_rdnss_addr[1];	/* variable-length */
-};
+} UNALIGNED;
 
 struct nd_opt_dnssl {		/* DNSSL RFC 6106 5.2 */
 	uint8_t  nd_opt_dnssl_type;
@@ -336,14 +336,14 @@ struct nd_opt_dnssl {		/* DNSSL RFC 6106
 	uint16_t nd_opt_dnssl_reserved;
 	uint32_t nd_opt_dnssl_lifetime;
 	/* followed by list of DNS search domains, variable-length */
-};
+} UNALIGNED;
 
 struct nd_opt_advinterval {	/* Advertisement interval option */
 	uint8_t		nd_opt_adv_type;
 	uint8_t		nd_opt_adv_len;
 	uint16_t	nd_opt_adv_reserved;
 	uint32_t	nd_opt_adv_interval;
-};
+} UNALIGNED;
 
 struct nd_opt_homeagent_info {	/* Home Agent info */
 	uint8_t		nd_opt_hai_type;
@@ -351,7 +351,7 @@ struct nd_opt_homeagent_info {	/* Home A
 	uint16_t	nd_opt_hai_reserved;
 	int16_t		nd_opt_hai_preference;
 	uint16_t	nd_opt_hai_lifetime;
-};
+} UNALIGNED;
 
 struct nd_opt_route_info {	/* route info */
 	uint8_t		nd_opt_rti_type;
@@ -360,7 +360,7 @@ struct nd_opt_route_info {	/* route info
 	uint8_t		nd_opt_rti_flags;
 	uint32_t	nd_opt_rti_lifetime;
 	/* prefix 

CVS commit: src/external/bsd/tcpdump/dist

2021-05-30 Thread Jason R Thorpe
Module Name:src
Committed By:   thorpej
Date:   Sun May 30 21:48:42 UTC 2021

Modified Files:
src/external/bsd/tcpdump/dist: print-icmp6.c

Log Message:
Minimal change to suppress unaligned access errors on NetBSD/alpha; add
the UNALIGNED decoration to icmp6 related structures.

PR bin/56199.


To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.14 src/external/bsd/tcpdump/dist/print-icmp6.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/external/bsd/tcpdump/dist

2021-05-30 Thread Jason R Thorpe
Module Name:src
Committed By:   thorpej
Date:   Sun May 30 21:01:43 UTC 2021

Modified Files:
src/external/bsd/tcpdump/dist: print-icmp.c

Log Message:
Minimal change to suppress unaligned access errors on NetBSD/alpha; add
the UNALIGNED decoration to struct icmp.

PR bin/56199.


To generate a diff of this commit:
cvs rdiff -u -r1.11 -r1.12 src/external/bsd/tcpdump/dist/print-icmp.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/external/bsd/tcpdump/dist

2021-05-30 Thread Jason R Thorpe
Module Name:src
Committed By:   thorpej
Date:   Sun May 30 21:01:43 UTC 2021

Modified Files:
src/external/bsd/tcpdump/dist: print-icmp.c

Log Message:
Minimal change to suppress unaligned access errors on NetBSD/alpha; add
the UNALIGNED decoration to struct icmp.

PR bin/56199.


To generate a diff of this commit:
cvs rdiff -u -r1.11 -r1.12 src/external/bsd/tcpdump/dist/print-icmp.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/tcpdump/dist/print-icmp.c
diff -u src/external/bsd/tcpdump/dist/print-icmp.c:1.11 src/external/bsd/tcpdump/dist/print-icmp.c:1.12
--- src/external/bsd/tcpdump/dist/print-icmp.c:1.11	Mon Feb 24 18:39:47 2020
+++ src/external/bsd/tcpdump/dist/print-icmp.c	Sun May 30 21:01:43 2021
@@ -21,7 +21,7 @@
 
 #include 
 #ifndef lint
-__RCSID("$NetBSD: print-icmp.c,v 1.11 2020/02/24 18:39:47 kamil Exp $");
+__RCSID("$NetBSD: print-icmp.c,v 1.12 2021/05/30 21:01:43 thorpej Exp $");
 #endif
 
 /* \summary: Internet Control Message Protocol (ICMP) printer */
@@ -89,7 +89,7 @@ struct icmp {
 #define	icmp_ip		icmp_dun.id_ip.idi_ip
 #define	icmp_mask	icmp_dun.id_mask
 #define	icmp_data	icmp_dun.id_data
-};
+} UNALIGNED;
 
 #define ICMP_MPLS_EXT_EXTRACT_VERSION(x) (((x)&0xf0)>>4)
 #define ICMP_MPLS_EXT_VERSION 2



CVS commit: src/external/bsd/tcpdump/dist

2020-02-24 Thread Kamil Rytarowski
Module Name:src
Committed By:   kamil
Date:   Mon Feb 24 18:39:47 UTC 2020

Modified Files:
src/external/bsd/tcpdump/dist: print-ah.c print-bgp.c print-esp.c
print-icmp.c print-icmp6.c print-igmp.c print-m3ua.c print-msnlb.c
print-nfs.c print-ntp.c print-ospf6.c print-pgm.c print-rip.c
print-ripng.c print-sctp.c print-tcp.c print-timed.c print-tipc.c
print-udp.c print-wb.c

Log Message:
Use UNALIGNED_OK to disable unaligned pointer arithmetic checks in UBSan

Upstream fixed it differently by refactoring the code and the problem will
go away on upgrade to 5.0.


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/external/bsd/tcpdump/dist/print-ah.c \
src/external/bsd/tcpdump/dist/print-timed.c
cvs rdiff -u -r1.10 -r1.11 src/external/bsd/tcpdump/dist/print-bgp.c \
src/external/bsd/tcpdump/dist/print-esp.c \
src/external/bsd/tcpdump/dist/print-icmp.c
cvs rdiff -u -r1.12 -r1.13 src/external/bsd/tcpdump/dist/print-icmp6.c
cvs rdiff -u -r1.7 -r1.8 src/external/bsd/tcpdump/dist/print-igmp.c \
src/external/bsd/tcpdump/dist/print-ntp.c \
src/external/bsd/tcpdump/dist/print-rip.c \
src/external/bsd/tcpdump/dist/print-ripng.c
cvs rdiff -u -r1.5 -r1.6 src/external/bsd/tcpdump/dist/print-m3ua.c
cvs rdiff -u -r1.3 -r1.4 src/external/bsd/tcpdump/dist/print-msnlb.c \
src/external/bsd/tcpdump/dist/print-tipc.c
cvs rdiff -u -r1.9 -r1.10 src/external/bsd/tcpdump/dist/print-nfs.c \
src/external/bsd/tcpdump/dist/print-ospf6.c \
src/external/bsd/tcpdump/dist/print-pgm.c \
src/external/bsd/tcpdump/dist/print-tcp.c \
src/external/bsd/tcpdump/dist/print-wb.c
cvs rdiff -u -r1.8 -r1.9 src/external/bsd/tcpdump/dist/print-sctp.c \
src/external/bsd/tcpdump/dist/print-udp.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/tcpdump/dist/print-ah.c
diff -u src/external/bsd/tcpdump/dist/print-ah.c:1.6 src/external/bsd/tcpdump/dist/print-ah.c:1.7
--- src/external/bsd/tcpdump/dist/print-ah.c:1.6	Sun Feb  5 04:05:05 2017
+++ src/external/bsd/tcpdump/dist/print-ah.c	Mon Feb 24 18:39:47 2020
@@ -23,7 +23,7 @@
 
 #include 
 #ifndef lint
-__RCSID("$NetBSD: print-ah.c,v 1.6 2017/02/05 04:05:05 spz Exp $");
+__RCSID("$NetBSD: print-ah.c,v 1.7 2020/02/24 18:39:47 kamil Exp $");
 #endif
 
 /* \summary: IPSEC Authentication Header printer */
@@ -39,6 +39,7 @@ __RCSID("$NetBSD: print-ah.c,v 1.6 2017/
 #include "netdissect.h"
 #include "extract.h"
 
+UNALIGNED_OK
 int
 ah_print(netdissect_options *ndo, register const u_char *bp)
 {
Index: src/external/bsd/tcpdump/dist/print-timed.c
diff -u src/external/bsd/tcpdump/dist/print-timed.c:1.6 src/external/bsd/tcpdump/dist/print-timed.c:1.7
--- src/external/bsd/tcpdump/dist/print-timed.c:1.6	Sun Feb  5 04:05:05 2017
+++ src/external/bsd/tcpdump/dist/print-timed.c	Mon Feb 24 18:39:47 2020
@@ -21,7 +21,7 @@
 
 #include 
 #ifndef lint
-__RCSID("$NetBSD: print-timed.c,v 1.6 2017/02/05 04:05:05 spz Exp $");
+__RCSID("$NetBSD: print-timed.c,v 1.7 2020/02/24 18:39:47 kamil Exp $");
 #endif
 
 /* \summary: BSD time daemon protocol printer */
@@ -99,6 +99,7 @@ static const char *tsptype[TSPTYPENUMBER
   "DATE", "DATEREQ", "DATEACK", "TRACEON", "TRACEOFF", "MSITE", "MSITEREQ",
   "TEST", "SETDATE", "SETDATEREQ", "LOOP" };
 
+UNALIGNED_OK
 void
 timed_print(netdissect_options *ndo,
 register const u_char *bp)

Index: src/external/bsd/tcpdump/dist/print-bgp.c
diff -u src/external/bsd/tcpdump/dist/print-bgp.c:1.10 src/external/bsd/tcpdump/dist/print-bgp.c:1.11
--- src/external/bsd/tcpdump/dist/print-bgp.c:1.10	Tue Oct  1 16:06:16 2019
+++ src/external/bsd/tcpdump/dist/print-bgp.c	Mon Feb 24 18:39:47 2020
@@ -32,7 +32,7 @@
 
 #include 
 #ifndef lint
-__RCSID("$NetBSD: print-bgp.c,v 1.10 2019/10/01 16:06:16 christos Exp $");
+__RCSID("$NetBSD: print-bgp.c,v 1.11 2020/02/24 18:39:47 kamil Exp $");
 #endif
 
 /* \summary: Border Gateway Protocol (BGP) printer */
@@ -921,6 +921,7 @@ static const struct tok bgp_multicast_vp
 { 0, NULL}
 };
 
+UNALIGNED_OK
 static int
 decode_multicast_vpn(netdissect_options *ndo,
  const u_char *pptr, char *buf, u_int buflen)
Index: src/external/bsd/tcpdump/dist/print-esp.c
diff -u src/external/bsd/tcpdump/dist/print-esp.c:1.10 src/external/bsd/tcpdump/dist/print-esp.c:1.11
--- src/external/bsd/tcpdump/dist/print-esp.c:1.10	Tue Oct  1 16:06:16 2019
+++ src/external/bsd/tcpdump/dist/print-esp.c	Mon Feb 24 18:39:47 2020
@@ -23,7 +23,7 @@
 
 #include 
 #ifndef lint
-__RCSID("$NetBSD: print-esp.c,v 1.10 2019/10/01 16:06:16 christos Exp $");
+__RCSID("$NetBSD: print-esp.c,v 1.11 2020/02/24 18:39:47 kamil Exp $");
 #endif
 
 /* \summary: IPSEC Encapsulating Security Payload (ESP) printer */
@@ -654,6 +654,7 @@ void esp_print_decodesecret(netdissect_o
 
 #endif
 
+UNALIGNED_OK
 #ifdef HAVE_LIBCRYPTO
 USES_APPLE_DEPRECATED_API
 #endif

CVS commit: src/external/bsd/tcpdump/dist

2020-02-24 Thread Kamil Rytarowski
Module Name:src
Committed By:   kamil
Date:   Mon Feb 24 18:39:47 UTC 2020

Modified Files:
src/external/bsd/tcpdump/dist: print-ah.c print-bgp.c print-esp.c
print-icmp.c print-icmp6.c print-igmp.c print-m3ua.c print-msnlb.c
print-nfs.c print-ntp.c print-ospf6.c print-pgm.c print-rip.c
print-ripng.c print-sctp.c print-tcp.c print-timed.c print-tipc.c
print-udp.c print-wb.c

Log Message:
Use UNALIGNED_OK to disable unaligned pointer arithmetic checks in UBSan

Upstream fixed it differently by refactoring the code and the problem will
go away on upgrade to 5.0.


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/external/bsd/tcpdump/dist/print-ah.c \
src/external/bsd/tcpdump/dist/print-timed.c
cvs rdiff -u -r1.10 -r1.11 src/external/bsd/tcpdump/dist/print-bgp.c \
src/external/bsd/tcpdump/dist/print-esp.c \
src/external/bsd/tcpdump/dist/print-icmp.c
cvs rdiff -u -r1.12 -r1.13 src/external/bsd/tcpdump/dist/print-icmp6.c
cvs rdiff -u -r1.7 -r1.8 src/external/bsd/tcpdump/dist/print-igmp.c \
src/external/bsd/tcpdump/dist/print-ntp.c \
src/external/bsd/tcpdump/dist/print-rip.c \
src/external/bsd/tcpdump/dist/print-ripng.c
cvs rdiff -u -r1.5 -r1.6 src/external/bsd/tcpdump/dist/print-m3ua.c
cvs rdiff -u -r1.3 -r1.4 src/external/bsd/tcpdump/dist/print-msnlb.c \
src/external/bsd/tcpdump/dist/print-tipc.c
cvs rdiff -u -r1.9 -r1.10 src/external/bsd/tcpdump/dist/print-nfs.c \
src/external/bsd/tcpdump/dist/print-ospf6.c \
src/external/bsd/tcpdump/dist/print-pgm.c \
src/external/bsd/tcpdump/dist/print-tcp.c \
src/external/bsd/tcpdump/dist/print-wb.c
cvs rdiff -u -r1.8 -r1.9 src/external/bsd/tcpdump/dist/print-sctp.c \
src/external/bsd/tcpdump/dist/print-udp.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



Re: CVS commit: src/external/bsd/tcpdump/dist

2020-02-24 Thread Kamil Rytarowski
On 24.02.2020 17:44, Valery Ushakov wrote:
> On Mon, Feb 24, 2020 at 16:19:35 +, Kamil Rytarowski wrote:
> 
>> Module Name: src
>> Committed By:kamil
>> Date:Mon Feb 24 16:19:35 UTC 2020
>>
>> Modified Files:
>>  src/external/bsd/tcpdump/dist: extract.h
>>
>> Log Message:
>> Rearrange the code to make UNALIGNED_OK available for __NetBSD__
> 
> s/unsigned/undefined/ in the comment
> 
> We have __GNUC_PREREQ__() for version tests
> 
> -uwe
> 

This is the original tcpdump code that used to be shadowed by our local
__NetBSD__ code block.



signature.asc
Description: OpenPGP digital signature


Re: CVS commit: src/external/bsd/tcpdump/dist

2020-02-24 Thread Valery Ushakov
On Mon, Feb 24, 2020 at 16:19:35 +, Kamil Rytarowski wrote:

> Module Name:  src
> Committed By: kamil
> Date: Mon Feb 24 16:19:35 UTC 2020
> 
> Modified Files:
>   src/external/bsd/tcpdump/dist: extract.h
> 
> Log Message:
> Rearrange the code to make UNALIGNED_OK available for __NetBSD__

s/unsigned/undefined/ in the comment

We have __GNUC_PREREQ__() for version tests

-uwe


CVS commit: src/external/bsd/tcpdump/dist

2020-02-24 Thread Kamil Rytarowski
Module Name:src
Committed By:   kamil
Date:   Mon Feb 24 16:19:35 UTC 2020

Modified Files:
src/external/bsd/tcpdump/dist: extract.h

Log Message:
Rearrange the code to make UNALIGNED_OK available for __NetBSD__


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/external/bsd/tcpdump/dist/extract.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/tcpdump/dist/extract.h
diff -u src/external/bsd/tcpdump/dist/extract.h:1.8 src/external/bsd/tcpdump/dist/extract.h:1.9
--- src/external/bsd/tcpdump/dist/extract.h:1.8	Fri Sep  8 14:01:12 2017
+++ src/external/bsd/tcpdump/dist/extract.h	Mon Feb 24 16:19:35 2020
@@ -19,6 +19,37 @@
  * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
  */
 
+
+/*
+ * If we have versions of GCC or Clang that support an __attribute__
+ * to say "if we're building with unsigned behavior sanitization,
+ * don't complain about undefined behavior in this function", we
+ * label these functions with that attribute - we *know* it's undefined
+ * in the C standard, but we *also* know it does what we want with
+ * the ISA we're targeting and the compiler we're using.
+ *
+ * For GCC 4.9.0 and later, we use __attribute__((no_sanitize_undefined));
+ * pre-5.0 GCC doesn't have __has_attribute, and I'm not sure whether
+ * GCC or Clang first had __attribute__((no_sanitize(XXX)).
+ *
+ * For Clang, we check for __attribute__((no_sanitize(XXX)) with
+ * __has_attribute, as there are versions of Clang that support
+ * __attribute__((no_sanitize("undefined")) but don't support
+ * __attribute__((no_sanitize_undefined)).
+ *
+ * We define this here, rather than in funcattrs.h, because we
+ * only want it used here, we don't want it to be broadly used.
+ * (Any printer will get this defined, but this should at least
+ * make it harder for people to find.)
+ */
+#if defined(__GNUC__) && ((__GNUC__ * 100 + __GNUC_MINOR__) >= 409)
+#define UNALIGNED_OK	__attribute__((no_sanitize_undefined))
+#elif __has_attribute(no_sanitize)
+#define UNALIGNED_OK	__attribute__((no_sanitize("undefined")))
+#else
+#define UNALIGNED_OK
+#endif
+
 #ifdef __NetBSD__
 #include 
 
@@ -139,36 +170,6 @@ static inline uint64_t EXTRACT_LE_64BITS
  */
 #include "funcattrs.h"
 
-/*
- * If we have versions of GCC or Clang that support an __attribute__
- * to say "if we're building with unsigned behavior sanitization,
- * don't complain about undefined behavior in this function", we
- * label these functions with that attribute - we *know* it's undefined
- * in the C standard, but we *also* know it does what we want with
- * the ISA we're targeting and the compiler we're using.
- *
- * For GCC 4.9.0 and later, we use __attribute__((no_sanitize_undefined));
- * pre-5.0 GCC doesn't have __has_attribute, and I'm not sure whether
- * GCC or Clang first had __attribute__((no_sanitize(XXX)).
- *
- * For Clang, we check for __attribute__((no_sanitize(XXX)) with
- * __has_attribute, as there are versions of Clang that support
- * __attribute__((no_sanitize("undefined")) but don't support
- * __attribute__((no_sanitize_undefined)).
- *
- * We define this here, rather than in funcattrs.h, because we
- * only want it used here, we don't want it to be broadly used.
- * (Any printer will get this defined, but this should at least
- * make it harder for people to find.)
- */
-#if defined(__GNUC__) && ((__GNUC__ * 100 + __GNUC_MINOR__) >= 409)
-#define UNALIGNED_OK	__attribute__((no_sanitize_undefined))
-#elif __has_attribute(no_sanitize)
-#define UNALIGNED_OK	__attribute__((no_sanitize("undefined")))
-#else
-#define UNALIGNED_OK
-#endif
-
 #ifdef LBL_ALIGN
 /*
  * The processor doesn't natively handle unaligned loads.



CVS commit: src/external/bsd/tcpdump/dist

2020-02-24 Thread Kamil Rytarowski
Module Name:src
Committed By:   kamil
Date:   Mon Feb 24 16:19:35 UTC 2020

Modified Files:
src/external/bsd/tcpdump/dist: extract.h

Log Message:
Rearrange the code to make UNALIGNED_OK available for __NetBSD__


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/external/bsd/tcpdump/dist/extract.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/external/bsd/tcpdump/dist

2020-02-16 Thread Valeriy E. Ushakov
Module Name:src
Committed By:   uwe
Date:   Sun Feb 16 22:38:28 UTC 2020

Modified Files:
src/external/bsd/tcpdump/dist: tcpdump.1.in

Log Message:
Fix comments to not break formatting.


To generate a diff of this commit:
cvs rdiff -u -r1.15 -r1.16 src/external/bsd/tcpdump/dist/tcpdump.1.in

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/tcpdump/dist/tcpdump.1.in
diff -u src/external/bsd/tcpdump/dist/tcpdump.1.in:1.15 src/external/bsd/tcpdump/dist/tcpdump.1.in:1.16
--- src/external/bsd/tcpdump/dist/tcpdump.1.in:1.15	Sun Feb 16 22:20:31 2020
+++ src/external/bsd/tcpdump/dist/tcpdump.1.in	Sun Feb 16 22:38:28 2020
@@ -1,4 +1,4 @@
-.\"	$NetBSD: tcpdump.1.in,v 1.15 2020/02/16 22:20:31 gutteridge Exp $
+.\"	$NetBSD: tcpdump.1.in,v 1.16 2020/02/16 22:38:28 uwe Exp $
 .\"
 .\" Copyright (c) 1987, 1988, 1989, 1990, 1991, 1992, 1994, 1995, 1996, 1997
 .\"	The Regents of the University of California.  All rights reserved.
@@ -207,13 +207,13 @@ On platforms that support the SIGINFO si
 (including Mac OS X) and Digital/Tru64 UNIX, it will report those counts
 when it receives a SIGINFO signal (generated, for example, by typing
 your ``status'' character, typically control-T)
-\" , although on some
-\" platforms, such as Mac OS X, the ``status'' character is not set by
-\" default, so you must set it with
-\" .BR stty (1)
-\" in order to use it) and will continue capturing packets. On platforms that
-\" do not support the SIGINFO signal, the same can be achieved by using the
-\" SIGUSR1 signal.
+.\" , although on some
+.\" platforms, such as Mac OS X, the ``status'' character is not set by
+.\" default, so you must set it with
+.\" .BR stty (1)
+.\" in order to use it) and will continue capturing packets. On platforms that
+.\" do not support the SIGINFO signal, the same can be achieved by using the
+.\" SIGUSR1 signal.
 and will continue capturing packets.
 .LP
 Reading packets from a network interface may require that you have



CVS commit: src/external/bsd/tcpdump/dist

2020-02-16 Thread Valeriy E. Ushakov
Module Name:src
Committed By:   uwe
Date:   Sun Feb 16 22:38:28 UTC 2020

Modified Files:
src/external/bsd/tcpdump/dist: tcpdump.1.in

Log Message:
Fix comments to not break formatting.


To generate a diff of this commit:
cvs rdiff -u -r1.15 -r1.16 src/external/bsd/tcpdump/dist/tcpdump.1.in

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/external/bsd/tcpdump/dist

2020-02-16 Thread David H. Gutteridge
Module Name:src
Committed By:   gutteridge
Date:   Sun Feb 16 22:20:31 UTC 2020

Modified Files:
src/external/bsd/tcpdump/dist: tcpdump.1.in

Log Message:
tcpdump.1.in: fix stray line from merge botch


To generate a diff of this commit:
cvs rdiff -u -r1.14 -r1.15 src/external/bsd/tcpdump/dist/tcpdump.1.in

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/tcpdump/dist/tcpdump.1.in
diff -u src/external/bsd/tcpdump/dist/tcpdump.1.in:1.14 src/external/bsd/tcpdump/dist/tcpdump.1.in:1.15
--- src/external/bsd/tcpdump/dist/tcpdump.1.in:1.14	Tue Oct  1 16:06:16 2019
+++ src/external/bsd/tcpdump/dist/tcpdump.1.in	Sun Feb 16 22:20:31 2020
@@ -1,4 +1,4 @@
-.\"	NetBSD: tcpdump.8,v 1.9 2003/03/31 00:18:17 perry Exp 
+.\"	$NetBSD: tcpdump.1.in,v 1.15 2020/02/16 22:20:31 gutteridge Exp $
 .\"
 .\" Copyright (c) 1987, 1988, 1989, 1990, 1991, 1992, 1994, 1995, 1996, 1997
 .\"	The Regents of the University of California.  All rights reserved.
@@ -20,7 +20,7 @@
 .\" WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
 .\" MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
 .\"
-.TH TCPDUMP 8  "2 February 2017"
+.TH TCPDUMP 8  "16 February 2020"
 .SH NAME
 tcpdump \- dump traffic on a network
 .SH SYNOPSIS
@@ -213,7 +213,7 @@ your ``status'' character, typically con
 \" .BR stty (1)
 \" in order to use it) and will continue capturing packets. On platforms that
 \" do not support the SIGINFO signal, the same can be achieved by using the
-SIGUSR1 signal.
+\" SIGUSR1 signal.
 and will continue capturing packets.
 .LP
 Reading packets from a network interface may require that you have



CVS commit: src/external/bsd/tcpdump/dist

2020-02-16 Thread David H. Gutteridge
Module Name:src
Committed By:   gutteridge
Date:   Sun Feb 16 22:20:31 UTC 2020

Modified Files:
src/external/bsd/tcpdump/dist: tcpdump.1.in

Log Message:
tcpdump.1.in: fix stray line from merge botch


To generate a diff of this commit:
cvs rdiff -u -r1.14 -r1.15 src/external/bsd/tcpdump/dist/tcpdump.1.in

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/external/bsd/tcpdump/dist

2019-11-16 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Nov 16 21:41:02 UTC 2019

Modified Files:
src/external/bsd/tcpdump/dist: parsenfsfh.c

Log Message:
Fix always false test (typo). Note by joerg@


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/external/bsd/tcpdump/dist/parsenfsfh.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/external/bsd/tcpdump/dist

2019-11-16 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Nov 16 21:41:02 UTC 2019

Modified Files:
src/external/bsd/tcpdump/dist: parsenfsfh.c

Log Message:
Fix always false test (typo). Note by joerg@


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/external/bsd/tcpdump/dist/parsenfsfh.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/tcpdump/dist/parsenfsfh.c
diff -u src/external/bsd/tcpdump/dist/parsenfsfh.c:1.8 src/external/bsd/tcpdump/dist/parsenfsfh.c:1.9
--- src/external/bsd/tcpdump/dist/parsenfsfh.c:1.8	Sat Feb  4 23:05:05 2017
+++ src/external/bsd/tcpdump/dist/parsenfsfh.c	Sat Nov 16 16:41:02 2019
@@ -42,7 +42,7 @@
 
 #include 
 #ifndef lint
-__RCSID("$NetBSD: parsenfsfh.c,v 1.8 2017/02/05 04:05:05 spz Exp $");
+__RCSID("$NetBSD: parsenfsfh.c,v 1.9 2019/11/16 21:41:02 christos Exp $");
 #endif
 
 #ifdef HAVE_CONFIG_H
@@ -211,7 +211,7 @@ Parse_fh(register const unsigned char *f
 		if ((fhp[6] == 0) && (fhp[7] == 0)) {
 			/* for ffs sizeof(ufid) == 16 bytes */
 			if ((fhp[8] == 0x10 && fhp[9] == 0x0) ||
-			(fhp[9] == 0x0 && fhp[9] == 0x10))
+			(fhp[8] == 0x0 && fhp[9] == 0x10))
 fhtype = FHT_NETBSD;
 			else
 fhtype = FHT_BSD44;



CVS commit: src/external/bsd/tcpdump

2019-10-01 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Tue Oct  1 16:06:16 UTC 2019

Modified Files:
src/external/bsd/tcpdump: tcpdump2netbsd
src/external/bsd/tcpdump/dist: addrtoname.c config.guess config.sub
configure netdissect.h print-802_11.c print-aoe.c print-babel.c
print-bfd.c print-bgp.c print-bootp.c print-dccp.c print-decnet.c
print-domain.c print-dvmrp.c print-eigrp.c print-esp.c print-fr.c
print-hncp.c print-icmp.c print-icmp6.c print-ipnet.c
print-isakmp.c print-juniper.c print-l2tp.c print-ldp.c print-lmp.c
print-nfs.c print-openflow.c print-ospf.c print-ospf6.c print-ppi.c
print-rsvp.c print-rx.c print-sflow.c print-sl.c print-sll.c
print-smb.c print-tcp.c print-vrrp.c print-vtp.c print-wb.c
signature.c smbutil.c tcpdump.1.in tcpdump.c util-print.c
src/external/bsd/tcpdump/include: config.h
Removed Files:
src/external/bsd/tcpdump/dist: configure.in
src/external/bsd/tcpdump/dist/tests: pcap-ng-invalid-vers-1.out
pcap-ng-invalid-vers-1.pcap pcap-ng-invalid-vers-2.out
pcap-ng-invalid-vers-2.pcap

Log Message:
merge conflicts


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/external/bsd/tcpdump/tcpdump2netbsd
cvs rdiff -u -r1.10 -r1.11 src/external/bsd/tcpdump/dist/addrtoname.c \
src/external/bsd/tcpdump/dist/print-isakmp.c \
src/external/bsd/tcpdump/dist/print-lmp.c \
src/external/bsd/tcpdump/dist/print-rsvp.c
cvs rdiff -u -r1.2 -r1.3 src/external/bsd/tcpdump/dist/config.guess \
src/external/bsd/tcpdump/dist/config.sub
cvs rdiff -u -r1.9 -r1.10 src/external/bsd/tcpdump/dist/configure \
src/external/bsd/tcpdump/dist/print-bgp.c \
src/external/bsd/tcpdump/dist/print-bootp.c \
src/external/bsd/tcpdump/dist/print-decnet.c \
src/external/bsd/tcpdump/dist/print-eigrp.c \
src/external/bsd/tcpdump/dist/print-esp.c \
src/external/bsd/tcpdump/dist/print-fr.c \
src/external/bsd/tcpdump/dist/print-icmp.c \
src/external/bsd/tcpdump/dist/print-juniper.c \
src/external/bsd/tcpdump/dist/print-ldp.c
cvs rdiff -u -r1.9 -r0 src/external/bsd/tcpdump/dist/configure.in
cvs rdiff -u -r1.6 -r1.7 src/external/bsd/tcpdump/dist/netdissect.h \
src/external/bsd/tcpdump/dist/print-dvmrp.c \
src/external/bsd/tcpdump/dist/print-vrrp.c \
src/external/bsd/tcpdump/dist/smbutil.c
cvs rdiff -u -r1.8 -r1.9 src/external/bsd/tcpdump/dist/print-802_11.c \
src/external/bsd/tcpdump/dist/print-domain.c \
src/external/bsd/tcpdump/dist/print-l2tp.c \
src/external/bsd/tcpdump/dist/print-nfs.c \
src/external/bsd/tcpdump/dist/print-ospf.c \
src/external/bsd/tcpdump/dist/print-ospf6.c \
src/external/bsd/tcpdump/dist/print-rx.c \
src/external/bsd/tcpdump/dist/print-sflow.c \
src/external/bsd/tcpdump/dist/print-sl.c \
src/external/bsd/tcpdump/dist/print-sll.c \
src/external/bsd/tcpdump/dist/print-tcp.c \
src/external/bsd/tcpdump/dist/print-wb.c \
src/external/bsd/tcpdump/dist/signature.c
cvs rdiff -u -r1.4 -r1.5 src/external/bsd/tcpdump/dist/print-aoe.c \
src/external/bsd/tcpdump/dist/print-vtp.c
cvs rdiff -u -r1.3 -r1.4 src/external/bsd/tcpdump/dist/print-babel.c \
src/external/bsd/tcpdump/dist/print-ipnet.c \
src/external/bsd/tcpdump/dist/print-openflow.c \
src/external/bsd/tcpdump/dist/print-ppi.c
cvs rdiff -u -r1.7 -r1.8 src/external/bsd/tcpdump/dist/print-bfd.c \
src/external/bsd/tcpdump/dist/print-dccp.c \
src/external/bsd/tcpdump/dist/print-smb.c
cvs rdiff -u -r1.5 -r1.6 src/external/bsd/tcpdump/dist/print-hncp.c \
src/external/bsd/tcpdump/dist/util-print.c
cvs rdiff -u -r1.11 -r1.12 src/external/bsd/tcpdump/dist/print-icmp6.c
cvs rdiff -u -r1.13 -r1.14 src/external/bsd/tcpdump/dist/tcpdump.1.in
cvs rdiff -u -r1.17 -r1.18 src/external/bsd/tcpdump/dist/tcpdump.c
cvs rdiff -u -r1.1.1.1 -r0 \
src/external/bsd/tcpdump/dist/tests/pcap-ng-invalid-vers-1.out \
src/external/bsd/tcpdump/dist/tests/pcap-ng-invalid-vers-1.pcap \
src/external/bsd/tcpdump/dist/tests/pcap-ng-invalid-vers-2.out \
src/external/bsd/tcpdump/dist/tests/pcap-ng-invalid-vers-2.pcap
cvs rdiff -u -r1.11 -r1.12 src/external/bsd/tcpdump/include/config.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/external/bsd/tcpdump/dist

2019-02-04 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Tue Feb  5 07:27:47 UTC 2019

Modified Files:
src/external/bsd/tcpdump/dist: print-hncp.c

Log Message:
- pass correct size of buffer to snprintf() to avoid potential truncation


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/external/bsd/tcpdump/dist/print-hncp.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/tcpdump/dist/print-hncp.c
diff -u src/external/bsd/tcpdump/dist/print-hncp.c:1.4 src/external/bsd/tcpdump/dist/print-hncp.c:1.5
--- src/external/bsd/tcpdump/dist/print-hncp.c:1.4	Fri Sep  8 14:01:13 2017
+++ src/external/bsd/tcpdump/dist/print-hncp.c	Tue Feb  5 07:27:46 2019
@@ -28,7 +28,7 @@
 
 #include 
 #ifndef lint
-__RCSID("$NetBSD: print-hncp.c,v 1.4 2017/09/08 14:01:13 christos Exp $");
+__RCSID("$NetBSD: print-hncp.c,v 1.5 2019/02/05 07:27:46 mrg Exp $");
 #endif
 
 /* \summary: Home Networking Control Protocol (HNCP) printer */
@@ -177,7 +177,7 @@ format_256(const u_char *data)
 static char buf[4][64+5];
 static int i = 0;
 i = (i + 1) % 4;
-snprintf(buf[i], 28, "%016" PRIx64 "%016" PRIx64 "%016" PRIx64 "%016" PRIx64,
+snprintf(buf[i], sizeof buf[i], "%016" PRIx64 "%016" PRIx64 "%016" PRIx64 "%016" PRIx64,
  EXTRACT_64BITS(data),
  EXTRACT_64BITS(data + 8),
  EXTRACT_64BITS(data + 16),



CVS commit: src/external/bsd/tcpdump/dist

2019-02-04 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Tue Feb  5 07:27:47 UTC 2019

Modified Files:
src/external/bsd/tcpdump/dist: print-hncp.c

Log Message:
- pass correct size of buffer to snprintf() to avoid potential truncation


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/external/bsd/tcpdump/dist/print-hncp.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/external/bsd/tcpdump/dist

2018-12-23 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Mon Dec 24 02:39:12 UTC 2018

Modified Files:
src/external/bsd/tcpdump/dist: tcpdump.c

Log Message:
make pcap_debug weak.


To generate a diff of this commit:
cvs rdiff -u -r1.16 -r1.17 src/external/bsd/tcpdump/dist/tcpdump.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/tcpdump/dist/tcpdump.c
diff -u src/external/bsd/tcpdump/dist/tcpdump.c:1.16 src/external/bsd/tcpdump/dist/tcpdump.c:1.17
--- src/external/bsd/tcpdump/dist/tcpdump.c:1.16	Fri Sep  8 10:01:13 2017
+++ src/external/bsd/tcpdump/dist/tcpdump.c	Sun Dec 23 21:39:12 2018
@@ -30,7 +30,7 @@
 static const char copyright[] _U_ =
 "@(#) Copyright (c) 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 2000\n\
 The Regents of the University of California.  All rights reserved.\n";
-__RCSID("$NetBSD: tcpdump.c,v 1.16 2017/09/08 14:01:13 christos Exp $");
+__RCSID("$NetBSD: tcpdump.c,v 1.17 2018/12/24 02:39:12 christos Exp $");
 #endif
 
 /*
@@ -261,9 +261,10 @@ static void
 pcap_set_parser_debug(int value)
 {
 #ifdef HAVE_PCAP_DEBUG
-	extern int pcap_debug;
+	extern int pcap_debug __weak;
 
-	pcap_debug = value;
+	if (_debug)
+		pcap_debug = value;
 #else /* HAVE_PCAP_DEBUG */
 	extern int yydebug;
 



CVS commit: src/external/bsd/tcpdump/dist

2018-12-23 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Mon Dec 24 02:39:12 UTC 2018

Modified Files:
src/external/bsd/tcpdump/dist: tcpdump.c

Log Message:
make pcap_debug weak.


To generate a diff of this commit:
cvs rdiff -u -r1.16 -r1.17 src/external/bsd/tcpdump/dist/tcpdump.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/external/bsd/tcpdump

2017-09-08 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Fri Sep  8 14:01:13 UTC 2017

Modified Files:
src/external/bsd/tcpdump: tcpdump2netbsd
src/external/bsd/tcpdump/dist: addrtoname.c addrtostr.c af.c checksum.c
configure configure.in extract.h gmpls.c ip6.h ipproto.c ipproto.h
l2vpn.c netdissect-stdinc.h netdissect.h nlpid.c oui.c
print-802_11.c print-802_15_4.c print-aodv.c print-arp.c
print-atm.c print-beep.c print-bfd.c print-bgp.c print-bootp.c
print-cfm.c print-chdlc.c print-cnfp.c print-decnet.c print-dhcp6.c
print-domain.c print-eap.c print-eigrp.c print-esp.c print-ether.c
print-fr.c print-frag6.c print-gre.c print-hncp.c print-icmp.c
print-icmp6.c print-ip.c print-ip6.c print-ip6opts.c print-isakmp.c
print-isoclns.c print-juniper.c print-l2tp.c print-ldp.c
print-llc.c print-lldp.c print-lmp.c print-lspping.c print-m3ua.c
print-mobility.c print-mpcp.c print-mpls.c print-mptcp.c
print-nfs.c print-null.c print-olsr.c print-ospf6.c print-pgm.c
print-pim.c print-pktap.c print-ppp.c print-radius.c print-resp.c
print-ripng.c print-rpki-rtr.c print-rsvp.c print-rt6.c print-rx.c
print-sip.c print-sl.c print-slow.c print-stp.c print-syslog.c
print-telnet.c print-tftp.c print-vqp.c print-vtp.c print-wb.c
print-zephyr.c print.c signature.c smbutil.c tcpdump.1.in tcpdump.c
util-print.c
src/external/bsd/tcpdump/include: config.h
Removed Files:
src/external/bsd/tcpdump/dist: README tcpdump2netbsd

Log Message:
merge changes.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/external/bsd/tcpdump/tcpdump2netbsd
cvs rdiff -u -r1.3 -r0 src/external/bsd/tcpdump/dist/README
cvs rdiff -u -r1.9 -r1.10 src/external/bsd/tcpdump/dist/addrtoname.c \
src/external/bsd/tcpdump/dist/print-isakmp.c \
src/external/bsd/tcpdump/dist/print-lmp.c \
src/external/bsd/tcpdump/dist/print-pim.c \
src/external/bsd/tcpdump/dist/print-rsvp.c
cvs rdiff -u -r1.3 -r1.4 src/external/bsd/tcpdump/dist/addrtostr.c \
src/external/bsd/tcpdump/dist/print-802_15_4.c \
src/external/bsd/tcpdump/dist/print-hncp.c \
src/external/bsd/tcpdump/dist/print-mptcp.c \
src/external/bsd/tcpdump/dist/print-olsr.c \
src/external/bsd/tcpdump/dist/print-resp.c \
src/external/bsd/tcpdump/dist/print-vtp.c \
src/external/bsd/tcpdump/dist/print.c
cvs rdiff -u -r1.5 -r1.6 src/external/bsd/tcpdump/dist/af.c \
src/external/bsd/tcpdump/dist/gmpls.c src/external/bsd/tcpdump/dist/ip6.h \
src/external/bsd/tcpdump/dist/ipproto.c \
src/external/bsd/tcpdump/dist/netdissect.h \
src/external/bsd/tcpdump/dist/smbutil.c
cvs rdiff -u -r1.6 -r1.7 src/external/bsd/tcpdump/dist/checksum.c \
src/external/bsd/tcpdump/dist/l2vpn.c \
src/external/bsd/tcpdump/dist/nlpid.c \
src/external/bsd/tcpdump/dist/print-beep.c \
src/external/bsd/tcpdump/dist/print-bfd.c \
src/external/bsd/tcpdump/dist/print-eap.c \
src/external/bsd/tcpdump/dist/print-frag6.c \
src/external/bsd/tcpdump/dist/print-ip6opts.c \
src/external/bsd/tcpdump/dist/print-ripng.c \
src/external/bsd/tcpdump/dist/print-rt6.c \
src/external/bsd/tcpdump/dist/print-vqp.c
cvs rdiff -u -r1.8 -r1.9 src/external/bsd/tcpdump/dist/configure \
src/external/bsd/tcpdump/dist/configure.in \
src/external/bsd/tcpdump/dist/print-arp.c \
src/external/bsd/tcpdump/dist/print-atm.c \
src/external/bsd/tcpdump/dist/print-bgp.c \
src/external/bsd/tcpdump/dist/print-bootp.c \
src/external/bsd/tcpdump/dist/print-cfm.c \
src/external/bsd/tcpdump/dist/print-chdlc.c \
src/external/bsd/tcpdump/dist/print-decnet.c \
src/external/bsd/tcpdump/dist/print-eigrp.c \
src/external/bsd/tcpdump/dist/print-esp.c \
src/external/bsd/tcpdump/dist/print-ether.c \
src/external/bsd/tcpdump/dist/print-fr.c \
src/external/bsd/tcpdump/dist/print-gre.c \
src/external/bsd/tcpdump/dist/print-icmp.c \
src/external/bsd/tcpdump/dist/print-isoclns.c \
src/external/bsd/tcpdump/dist/print-juniper.c \
src/external/bsd/tcpdump/dist/print-ldp.c \
src/external/bsd/tcpdump/dist/print-llc.c \
src/external/bsd/tcpdump/dist/print-lldp.c \
src/external/bsd/tcpdump/dist/print-lspping.c \
src/external/bsd/tcpdump/dist/print-pgm.c \
src/external/bsd/tcpdump/dist/print-ppp.c \
src/external/bsd/tcpdump/dist/print-radius.c \
src/external/bsd/tcpdump/dist/print-slow.c
cvs rdiff -u -r1.7 -r1.8 src/external/bsd/tcpdump/dist/extract.h \
src/external/bsd/tcpdump/dist/oui.c \
src/external/bsd/tcpdump/dist/print-802_11.c \
src/external/bsd/tcpdump/dist/print-aodv.c \
src/external/bsd/tcpdump/dist/print-cnfp.c \
src/external/bsd/tcpdump/dist/print-dhcp6.c \
src/external/bsd/tcpdump/dist/print-domain.c \

CVS commit: src/external/bsd/tcpdump/include

2017-01-30 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Mon Jan 30 13:27:26 UTC 2017

Modified Files:
src/external/bsd/tcpdump/include: config.h

Log Message:
broken test.


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/external/bsd/tcpdump/include/config.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/tcpdump/include/config.h
diff -u src/external/bsd/tcpdump/include/config.h:1.9 src/external/bsd/tcpdump/include/config.h:1.10
--- src/external/bsd/tcpdump/include/config.h:1.9	Tue Jan 24 18:29:14 2017
+++ src/external/bsd/tcpdump/include/config.h	Mon Jan 30 08:27:26 2017
@@ -128,7 +128,7 @@
 #define HAVE_PCAP_FREE_DATALINKS 1
 
 /* Define to 1 if the system has the type `pcap_if_t'. */
-/* #undef HAVE_PCAP_IF_T */
+#define HAVE_PCAP_IF_T 1
 
 /* Define to 1 if you have the `pcap_lib_version' function. */
 #define HAVE_PCAP_LIB_VERSION 1



CVS commit: src/external/bsd/tcpdump/include

2017-01-30 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Mon Jan 30 13:27:26 UTC 2017

Modified Files:
src/external/bsd/tcpdump/include: config.h

Log Message:
broken test.


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/external/bsd/tcpdump/include/config.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/external/bsd/tcpdump/dist

2017-01-30 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Mon Jan 30 13:15:43 UTC 2017

Modified Files:
src/external/bsd/tcpdump/dist: tcpdump.c

Log Message:
protect variable with the macro that uses it.


To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.14 src/external/bsd/tcpdump/dist/tcpdump.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/tcpdump/dist/tcpdump.c
diff -u src/external/bsd/tcpdump/dist/tcpdump.c:1.13 src/external/bsd/tcpdump/dist/tcpdump.c:1.14
--- src/external/bsd/tcpdump/dist/tcpdump.c:1.13	Tue Jan 24 18:29:14 2017
+++ src/external/bsd/tcpdump/dist/tcpdump.c	Mon Jan 30 08:15:43 2017
@@ -30,7 +30,7 @@
 static const char copyright[] _U_ =
 "@(#) Copyright (c) 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 2000\n\
 The Regents of the University of California.  All rights reserved.\n";
-__RCSID("$NetBSD: tcpdump.c,v 1.13 2017/01/24 23:29:14 christos Exp $");
+__RCSID("$NetBSD: tcpdump.c,v 1.14 2017/01/30 13:15:43 christos Exp $");
 #endif
 
 /*
@@ -195,6 +195,7 @@ RETSIGTYPE requestinfo(int);
 static void info(int);
 static u_int packets_captured;
 
+#ifdef HAVE_PCAP_FINDALLDEVS
 static const struct tok status_flags[] = {
 #ifdef PCAP_IF_UP
 	{ PCAP_IF_UP,   "Up"   },
@@ -205,6 +206,7 @@ static const struct tok status_flags[] =
 	{ PCAP_IF_LOOPBACK, "Loopback" },
 	{ 0, NULL }
 };
+#endif
 
 static pcap_t *pd;
 



CVS commit: src/external/bsd/tcpdump/dist

2017-01-30 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Mon Jan 30 13:15:43 UTC 2017

Modified Files:
src/external/bsd/tcpdump/dist: tcpdump.c

Log Message:
protect variable with the macro that uses it.


To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.14 src/external/bsd/tcpdump/dist/tcpdump.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/external/bsd/tcpdump/dist

2017-01-25 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Jan 25 14:46:16 UTC 2017

Modified Files:
src/external/bsd/tcpdump/dist: netdissect-stdinc.h

Log Message:
- don't use their ntoh{l,s}/hton{l,s} implementation
- fix their ntohl/htonl implementations to use unsigned int instead of
  unsigned long so they work on _LP64.


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.1 -r1.2 \
src/external/bsd/tcpdump/dist/netdissect-stdinc.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/tcpdump/dist/netdissect-stdinc.h
diff -u src/external/bsd/tcpdump/dist/netdissect-stdinc.h:1.1.1.1 src/external/bsd/tcpdump/dist/netdissect-stdinc.h:1.2
--- src/external/bsd/tcpdump/dist/netdissect-stdinc.h:1.1.1.1	Tue Jan 24 16:33:38 2017
+++ src/external/bsd/tcpdump/dist/netdissect-stdinc.h	Wed Jan 25 09:46:16 2017
@@ -279,13 +279,13 @@ typedef char* caddr_t;
  * avoid the bswap instruction, as OS X only supports machines that
  * have it.)
  */
-#if defined(__GNUC__) && defined(__i386__) && !defined(__APPLE__) && !defined(__ntohl)
+#if defined(__GNUC__) && defined(__i386__) && !defined(__APPLE__) && !defined(__ntohl) && !defined(ntohl)
   #undef ntohl
   #undef ntohs
   #undef htonl
   #undef htons
 
-  static __inline__ unsigned long __ntohl (unsigned long x);
+  static __inline__ unsigned int __ntohl (unsigned int x);
   static __inline__ unsigned short __ntohs (unsigned short x);
 
   #define ntohl(x)  __ntohl(x)
@@ -293,7 +293,7 @@ typedef char* caddr_t;
   #define htonl(x)  __ntohl(x)
   #define htons(x)  __ntohs(x)
 
-  static __inline__ unsigned long __ntohl (unsigned long x)
+  static __inline__ unsigned int __ntohl (unsigned int x)
   {
 __asm__ ("xchgb %b0, %h0\n\t"   /* swap lower bytes  */
  "rorl  $16, %0\n\t"/* swap words*/



CVS commit: src/external/bsd/tcpdump/dist

2017-01-25 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Jan 25 14:46:16 UTC 2017

Modified Files:
src/external/bsd/tcpdump/dist: netdissect-stdinc.h

Log Message:
- don't use their ntoh{l,s}/hton{l,s} implementation
- fix their ntohl/htonl implementations to use unsigned int instead of
  unsigned long so they work on _LP64.


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.1 -r1.2 \
src/external/bsd/tcpdump/dist/netdissect-stdinc.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/external/bsd/tcpdump/dist

2017-01-25 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Wed Jan 25 08:20:15 UTC 2017

Modified Files:
src/external/bsd/tcpdump/dist: print-ip.c

Log Message:
Add missing argument


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/external/bsd/tcpdump/dist/print-ip.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/tcpdump/dist/print-ip.c
diff -u src/external/bsd/tcpdump/dist/print-ip.c:1.9 src/external/bsd/tcpdump/dist/print-ip.c:1.10
--- src/external/bsd/tcpdump/dist/print-ip.c:1.9	Tue Jan 24 23:29:14 2017
+++ src/external/bsd/tcpdump/dist/print-ip.c	Wed Jan 25 08:20:15 2017
@@ -21,7 +21,7 @@
 
 #include 
 #ifndef lint
-__RCSID("$NetBSD: print-ip.c,v 1.9 2017/01/24 23:29:14 christos Exp $");
+__RCSID("$NetBSD: print-ip.c,v 1.10 2017/01/25 08:20:15 martin Exp $");
 #endif
 
 #ifdef HAVE_CONFIG_H
@@ -483,7 +483,7 @@ again:
 		break;
 
 	case IPPROTO_PFSYNC:
-		pfsync_ip_print(ipds->cp, ipds->len, (const u_char *)ipds->ip);
+		pfsync_ip_print(ndo, ipds->cp, ipds->len, (const u_char *)ipds->ip);
 		break;
 
 	default:



CVS commit: src/external/bsd/tcpdump/dist

2017-01-25 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Wed Jan 25 08:20:15 UTC 2017

Modified Files:
src/external/bsd/tcpdump/dist: print-ip.c

Log Message:
Add missing argument


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/external/bsd/tcpdump/dist/print-ip.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/external/bsd/tcpdump/dist

2017-01-25 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Wed Jan 25 08:14:07 UTC 2017

Modified Files:
src/external/bsd/tcpdump/dist: util-print.c

Log Message:
toupper() takes an unsigned char.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/external/bsd/tcpdump/dist/util-print.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/tcpdump/dist/util-print.c
diff -u src/external/bsd/tcpdump/dist/util-print.c:1.2 src/external/bsd/tcpdump/dist/util-print.c:1.3
--- src/external/bsd/tcpdump/dist/util-print.c:1.2	Tue Jan 24 23:29:14 2017
+++ src/external/bsd/tcpdump/dist/util-print.c	Wed Jan 25 08:14:07 2017
@@ -37,7 +37,7 @@
 
 #include 
 #ifndef lint
-__RCSID("$NetBSD: util-print.c,v 1.2 2017/01/24 23:29:14 christos Exp $");
+__RCSID("$NetBSD: util-print.c,v 1.3 2017/01/25 08:14:07 martin Exp $");
 #endif
 
 #ifdef HAVE_CONFIG_H
@@ -788,7 +788,7 @@ txtproto_print(netdissect_options *ndo, 
 
 	/* Capitalize the protocol name */
 	for (pnp = protoname; *pnp != '\0'; pnp++)
-		ND_PRINT((ndo, "%c", toupper(*pnp)));
+		ND_PRINT((ndo, "%c", toupper((unsigned char)*pnp)));
 
 	if (is_reqresp) {
 		/*



CVS commit: src/external/bsd/tcpdump/dist

2017-01-25 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Wed Jan 25 08:14:07 UTC 2017

Modified Files:
src/external/bsd/tcpdump/dist: util-print.c

Log Message:
toupper() takes an unsigned char.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/external/bsd/tcpdump/dist/util-print.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/external/bsd/tcpdump

2017-01-24 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Tue Jan 24 23:29:14 UTC 2017

Modified Files:
src/external/bsd/tcpdump/bin: Makefile
src/external/bsd/tcpdump/dist: addrtoname.c addrtostr.c af.c
ascii_strcasecmp.c bpf_dump.c checksum.c configure configure.in
cpack.c cpack.h ether.h gmpls.c gmt2local.c in_cksum.c interface.h
ip.h ip6.h ipproto.c l2vpn.c machdep.c nameser.h netdissect.h
nlpid.c oui.c parsenfsfh.c print-802_11.c print-802_15_4.c
print-ah.c print-ahcp.c print-aodv.c print-aoe.c print-ap1394.c
print-arcnet.c print-arp.c print-ascii.c print-atalk.c print-atm.c
print-babel.c print-beep.c print-bfd.c print-bgp.c print-bootp.c
print-bt.c print-calm-fast.c print-carp.c print-cdp.c print-cfm.c
print-chdlc.c print-cip.c print-cnfp.c print-dccp.c print-decnet.c
print-dhcp6.c print-domain.c print-dtp.c print-dvmrp.c print-eap.c
print-egp.c print-eigrp.c print-enc.c print-esp.c print-ether.c
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-icmp6.c print-igmp.c print-igrp.c
print-ip.c print-ip6.c print-ip6opts.c print-ipcomp.c print-ipfc.c
print-ipnet.c print-ipx.c print-isakmp.c print-isoclns.c
print-juniper.c print-krb.c print-l2tp.c print-lane.c print-ldp.c
print-lisp.c print-llc.c print-lldp.c print-lmp.c print-loopback.c
print-lspping.c print-lwapp.c print-lwres.c print-m3ua.c
print-medsa.c print-mobile.c print-mobility.c print-mpcp.c
print-mpls.c print-mptcp.c print-msdp.c 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-ospf.c print-ospf6.c
print-otv.c print-pflog.c print-pfsync.c print-pgm.c print-pim.c
print-pktap.c print-ppi.c print-ppp.c print-pppoe.c print-pptp.c
print-radius.c print-raw.c print-resp.c print-rip.c print-ripng.c
print-rpki-rtr.c print-rrcp.c print-rsvp.c print-rt6.c print-rtsp.c
print-rx.c print-sctp.c print-sflow.c print-sip.c print-sl.c
print-sll.c print-slow.c print-smb.c print-smtp.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-tipc.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-vxlan-gpe.c print-vxlan.c print-wb.c print-zephyr.c
print-zeromq.c print.c setsignal.c signature.c smbutil.c
strtoaddr.c tcp.h tcpdump.1.in tcpdump.c udp.h util-print.c util.c
vfprintf.c
src/external/bsd/tcpdump/include: config.h
Removed Files:
src/external/bsd/tcpdump/dist: atmuni31.h strcasecmp.c tcpdump-stdinc.h
src/external/bsd/tcpdump/dist/missing: addrinfo.h getnameinfo.c
inet_aton.c inet_ntop.c inet_pton.c
src/external/bsd/tcpdump/dist/win32/Include: w32_fzs.h

Log Message:
merge conflicts.


To generate a diff of this commit:
cvs rdiff -u -r1.16 -r1.17 src/external/bsd/tcpdump/bin/Makefile
cvs rdiff -u -r1.7 -r1.8 src/external/bsd/tcpdump/dist/addrtoname.c \
src/external/bsd/tcpdump/dist/print-isakmp.c \
src/external/bsd/tcpdump/dist/print-lmp.c \
src/external/bsd/tcpdump/dist/print-pim.c \
src/external/bsd/tcpdump/dist/print-rsvp.c
cvs rdiff -u -r1.1.1.1 -r1.2 src/external/bsd/tcpdump/dist/addrtostr.c \
src/external/bsd/tcpdump/dist/ascii_strcasecmp.c \
src/external/bsd/tcpdump/dist/print-hncp.c \
src/external/bsd/tcpdump/dist/print-lisp.c \
src/external/bsd/tcpdump/dist/print-medsa.c \
src/external/bsd/tcpdump/dist/print-nsh.c \
src/external/bsd/tcpdump/dist/print-resp.c \
src/external/bsd/tcpdump/dist/print-vxlan-gpe.c \
src/external/bsd/tcpdump/dist/print.c \
src/external/bsd/tcpdump/dist/strtoaddr.c \
src/external/bsd/tcpdump/dist/util-print.c
cvs rdiff -u -r1.4 -r1.5 src/external/bsd/tcpdump/dist/af.c \
src/external/bsd/tcpdump/dist/bpf_dump.c \
src/external/bsd/tcpdump/dist/ether.h \
src/external/bsd/tcpdump/dist/gmpls.c \
src/external/bsd/tcpdump/dist/gmt2local.c \
src/external/bsd/tcpdump/dist/ip6.h \
src/external/bsd/tcpdump/dist/ipproto.c \
src/external/bsd/tcpdump/dist/l2vpn.c \
src/external/bsd/tcpdump/dist/nameser.h \
src/external/bsd/tcpdump/dist/print-ah.c \
src/external/bsd/tcpdump/dist/print-ap1394.c \
src/external/bsd/tcpdump/dist/print-beep.c \
src/external/bsd/tcpdump/dist/print-bfd.c \
src/external/bsd/tcpdump/dist/print-bt.c \
src/external/bsd/tcpdump/dist/print-cip.c \

CVS commit: src/external/bsd/tcpdump/bin

2016-12-01 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Fri Dec  2 02:14:03 UTC 2016

Modified Files:
src/external/bsd/tcpdump/bin: Makefile

Log Message:
print-ip6.c is needed even with MKINET6=no.

Provides print_ip6 used by various other objects, with different
definitions depending on #ifdef INET6.


To generate a diff of this commit:
cvs rdiff -u -r1.14 -r1.15 src/external/bsd/tcpdump/bin/Makefile

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/external/bsd/tcpdump/bin

2016-12-01 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Fri Dec  2 02:14:03 UTC 2016

Modified Files:
src/external/bsd/tcpdump/bin: Makefile

Log Message:
print-ip6.c is needed even with MKINET6=no.

Provides print_ip6 used by various other objects, with different
definitions depending on #ifdef INET6.


To generate a diff of this commit:
cvs rdiff -u -r1.14 -r1.15 src/external/bsd/tcpdump/bin/Makefile

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/tcpdump/bin/Makefile
diff -u src/external/bsd/tcpdump/bin/Makefile:1.14 src/external/bsd/tcpdump/bin/Makefile:1.15
--- src/external/bsd/tcpdump/bin/Makefile:1.14	Wed Jun 29 19:45:14 2016
+++ src/external/bsd/tcpdump/bin/Makefile	Fri Dec  2 02:14:03 2016
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.14 2016/06/29 19:45:14 christos Exp $	
+#	$NetBSD: Makefile,v 1.15 2016/12/02 02:14:03 riastradh Exp $	
 
 WARNS?=	1	# XXX: need to cleanup later
 
@@ -72,6 +72,7 @@ print-icmp.c \
 print-igmp.c \
 print-igrp.c \
 print-ip.c \
+print-ip6.c \
 print-ipcomp.c \
 print-ipfc.c \
 print-ipnet.c \
@@ -176,7 +177,7 @@ CPPFLAGS+=-DWITH_USER=\"_tcpdump\"
 CPPFLAGS+=-DWITH_CHROOT=\"/var/chroot/tcpdump\"
 
 .if (${USE_INET6} != "no")
-SRCS+=	print-babel.c print-ip6.c print-ip6opts.c print-icmp6.c \
+SRCS+=	print-babel.c print-ip6opts.c print-icmp6.c \
 	print-rt6.c print-dhcp6.c print-ospf6.c 
 
 CPPFLAGS+=-DINET6=1 -DHAVE_RES_USE_INET6=1 



CVS commit: src/external/bsd/tcpdump

2016-06-29 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Jun 29 19:45:14 UTC 2016

Modified Files:
src/external/bsd/tcpdump/bin: Makefile
src/external/bsd/tcpdump/include: config.h

Log Message:
Fix MKCRYPTO=no build


To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.14 src/external/bsd/tcpdump/bin/Makefile
cvs rdiff -u -r1.7 -r1.8 src/external/bsd/tcpdump/include/config.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/tcpdump/bin/Makefile
diff -u src/external/bsd/tcpdump/bin/Makefile:1.13 src/external/bsd/tcpdump/bin/Makefile:1.14
--- src/external/bsd/tcpdump/bin/Makefile:1.13	Tue Mar 31 17:59:35 2015
+++ src/external/bsd/tcpdump/bin/Makefile	Wed Jun 29 15:45:14 2016
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.13 2015/03/31 21:59:35 christos Exp $	
+#	$NetBSD: Makefile,v 1.14 2016/06/29 19:45:14 christos Exp $	
 
 WARNS?=	1	# XXX: need to cleanup later
 
@@ -183,7 +183,7 @@ CPPFLAGS+=-DINET6=1 -DHAVE_RES_USE_INET6
 .endif
 
 .if (${MKCRYPTO} != "no")
-CPPFLAGS+=-DHAVE_LIBCRYPTO=1 
+CPPFLAGS+=-DHAVE_LIBCRYPTO=1 -DHAVE_OPENSSL_EVP_H 
 LDADD+=	-lcrypto -lcrypt
 DPADD+=	${LIBCRYPTO} ${LIBCRYPT}
 .endif

Index: src/external/bsd/tcpdump/include/config.h
diff -u src/external/bsd/tcpdump/include/config.h:1.7 src/external/bsd/tcpdump/include/config.h:1.8
--- src/external/bsd/tcpdump/include/config.h:1.7	Tue Mar 31 17:59:35 2015
+++ src/external/bsd/tcpdump/include/config.h	Wed Jun 29 15:45:14 2016
@@ -60,7 +60,8 @@
 /* #undef HAVE_LIBCAP_NG */
 
 /* Define to 1 if you have the `crypto' library (-lcrypto). */
-#define HAVE_LIBCRYPTO 1
+/* in the Makefile */
+/* #undef HAVE_LIBCRYPTO */
 
 /* Define to 1 if you have the `rpc' library (-lrpc). */
 /* #undef HAVE_LIBRPC */
@@ -87,7 +88,8 @@
 #define HAVE_OPENAT 1
 
 /* Define to 1 if you have the  header file. */
-#define HAVE_OPENSSL_EVP_H 1
+/* in the Makefile */
+/* #undef HAVE_OPENSSL_EVP_H */
 
 /* if there's an os_proto.h for this platform, to use additional prototypes */
 /* #undef HAVE_OS_PROTO_H */



CVS commit: src/external/bsd/tcpdump

2016-06-29 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Jun 29 19:45:14 UTC 2016

Modified Files:
src/external/bsd/tcpdump/bin: Makefile
src/external/bsd/tcpdump/include: config.h

Log Message:
Fix MKCRYPTO=no build


To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.14 src/external/bsd/tcpdump/bin/Makefile
cvs rdiff -u -r1.7 -r1.8 src/external/bsd/tcpdump/include/config.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/external/bsd/tcpdump/dist

2016-01-23 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Jan 23 19:08:02 UTC 2016

Modified Files:
src/external/bsd/tcpdump/dist: print-pfsync.c

Log Message:
don't include 


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/external/bsd/tcpdump/dist/print-pfsync.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/tcpdump/dist/print-pfsync.c
diff -u src/external/bsd/tcpdump/dist/print-pfsync.c:1.2 src/external/bsd/tcpdump/dist/print-pfsync.c:1.3
--- src/external/bsd/tcpdump/dist/print-pfsync.c:1.2	Wed Nov 19 22:05:03 2014
+++ src/external/bsd/tcpdump/dist/print-pfsync.c	Sat Jan 23 14:08:02 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: print-pfsync.c,v 1.2 2014/11/20 03:05:03 christos Exp $	*/
+/*	$NetBSD: print-pfsync.c,v 1.3 2016/01/23 19:08:02 christos Exp $	*/
 /*	$OpenBSD: print-pfsync.c,v 1.30 2007/05/31 04:16:26 mcbride Exp $	*/
 
 /*
@@ -31,9 +31,9 @@
 #ifndef lint
 #if 0
 static const char rcsid[] =
-"@(#) $Header: /cvsroot/src/external/bsd/tcpdump/dist/print-pfsync.c,v 1.2 2014/11/20 03:05:03 christos Exp $";
+"@(#) $Header: /cvsroot/src/external/bsd/tcpdump/dist/print-pfsync.c,v 1.3 2016/01/23 19:08:02 christos Exp $";
 #else
-__RCSID("$NetBSD: print-pfsync.c,v 1.2 2014/11/20 03:05:03 christos Exp $");
+__RCSID("$NetBSD: print-pfsync.c,v 1.3 2016/01/23 19:08:02 christos Exp $");
 #endif
 #endif
 
@@ -49,7 +49,6 @@ __RCSID("$NetBSD: print-pfsync.c,v 1.2 2
 #include 
 #include 
 #include 
-#include 
 
 #ifdef __STDC__
 struct rtentry;



CVS commit: src/external/bsd/tcpdump/dist

2016-01-23 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Jan 23 19:08:02 UTC 2016

Modified Files:
src/external/bsd/tcpdump/dist: print-pfsync.c

Log Message:
don't include 


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/external/bsd/tcpdump/dist/print-pfsync.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/external/bsd/tcpdump/dist

2015-12-24 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Fri Dec 25 04:50:21 UTC 2015

Modified Files:
src/external/bsd/tcpdump/dist: parsenfsfh.c

Log Message:
We stuck the generation number eons ago before the inode, so we broke
inode printing in nfs file handles.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/external/bsd/tcpdump/dist/parsenfsfh.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/tcpdump/dist/parsenfsfh.c
diff -u src/external/bsd/tcpdump/dist/parsenfsfh.c:1.5 src/external/bsd/tcpdump/dist/parsenfsfh.c:1.6
--- src/external/bsd/tcpdump/dist/parsenfsfh.c:1.5	Wed Nov 19 22:05:03 2014
+++ src/external/bsd/tcpdump/dist/parsenfsfh.c	Thu Dec 24 23:50:21 2015
@@ -42,7 +42,7 @@
 
 #include 
 #ifndef lint
-__RCSID("$NetBSD: parsenfsfh.c,v 1.5 2014/11/20 03:05:03 christos Exp $");
+__RCSID("$NetBSD: parsenfsfh.c,v 1.6 2015/12/25 04:50:21 christos Exp $");
 #endif
 
 #define NETDISSECT_REWORKED
@@ -81,6 +81,7 @@ __RCSID("$NetBSD: parsenfsfh.c,v 1.5 201
 #define	FHT_AIX32	10
 #define	FHT_HPUX9	11
 #define	FHT_BSD44	12
+#define	FHT_NETBSD	13
 
 #ifdef	ultrix
 /* Nasty hack to keep the Ultrix C compiler from emitting bogus warnings */
@@ -145,10 +146,12 @@ Parse_fh(register const unsigned char *f
 #if	defined(__osf__)
 	fhtype = FHT_DECOSF;
 #endif
-#if	defined(__NetBSD__) || defined(__FreeBSD__) || defined(__DragonFly__) \
- || defined(__OpenBSD__)
+#if	defined(__FreeBSD__) || defined(__DragonFly__) || defined(__OpenBSD__)
 	fhtype = FHT_BSD44;
 #endif
+#if	defined(__NetBSD__)
+	fhtype = FHT_NETBSD;
+#endif
 	}
 	/*
 	 * This is basically a big decision tree
@@ -200,7 +203,12 @@ Parse_fh(register const unsigned char *f
 		 * might be HP-UX (depends on their values for minor devs)
 		 */
 		if ((fhp[6] == 0) && (fhp[7] == 0)) {
-		fhtype = FHT_BSD44;
+		/* for ffs sizeof(ufid) == 16 bytes */
+		if ((fhp[8] == 0x10 && fhp[9] == 0x0) ||
+			(fhp[9] == 0x0 && fhp[9] == 0x10))
+			fhtype = FHT_NETBSD;
+		else
+			fhtype = FHT_BSD44;
 		}
 		/*XXX we probably only need to test of these two bytes */
 		else if ((fhp[21] == 0) && (fhp[23] == 0)) {
@@ -269,11 +277,19 @@ Parse_fh(register const unsigned char *f
 	break;
 
 	case FHT_BSD44:
+	case FHT_NETBSD:
 	fsidp->Fsid_dev.Minor = fhp[0];
 	fsidp->Fsid_dev.Major = fhp[1];
 	fsidp->fsid_code = 0;
 
-	*inop = make_uint32(fhp[15], fhp[14], fhp[13], fhp[12]);
+	/*
+	 * NetBSD puts the generation number before the inode; inode
+	 * is 64 bits, but only 32 are typically used; XXX endian issues?
+	 */
+	if (fhtype == FHT_NETBSD)
+		*inop = make_uint32(fhp[19], fhp[18], fhp[17], fhp[16]);
+	else
+		*inop = make_uint32(fhp[15], fhp[14], fhp[13], fhp[12]);
 
 	if (osnamep)
 		*osnamep = "BSD 4.4";



CVS commit: src/external/bsd/tcpdump/dist

2015-12-24 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Fri Dec 25 04:50:21 UTC 2015

Modified Files:
src/external/bsd/tcpdump/dist: parsenfsfh.c

Log Message:
We stuck the generation number eons ago before the inode, so we broke
inode printing in nfs file handles.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/external/bsd/tcpdump/dist/parsenfsfh.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/external/bsd/tcpdump/dist

2015-09-17 Thread NONAKA Kimihiro
Module Name:src
Committed By:   nonaka
Date:   Thu Sep 17 14:03:10 UTC 2015

Modified Files:
src/external/bsd/tcpdump/dist: tcpdump.c

Log Message:
PR/50248: re-apply src/external/bsd/tcpdump/dist/tcpdump.c rev.1.8.

> When running as root and wanting to write a file and not having CAPNG, don't
> drop privs, because we cannot open the file if we drop privs.


To generate a diff of this commit:
cvs rdiff -u -r1.11 -r1.12 src/external/bsd/tcpdump/dist/tcpdump.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/external/bsd/tcpdump/dist

2015-09-17 Thread NONAKA Kimihiro
Module Name:src
Committed By:   nonaka
Date:   Thu Sep 17 14:03:10 UTC 2015

Modified Files:
src/external/bsd/tcpdump/dist: tcpdump.c

Log Message:
PR/50248: re-apply src/external/bsd/tcpdump/dist/tcpdump.c rev.1.8.

> When running as root and wanting to write a file and not having CAPNG, don't
> drop privs, because we cannot open the file if we drop privs.


To generate a diff of this commit:
cvs rdiff -u -r1.11 -r1.12 src/external/bsd/tcpdump/dist/tcpdump.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/tcpdump/dist/tcpdump.c
diff -u src/external/bsd/tcpdump/dist/tcpdump.c:1.11 src/external/bsd/tcpdump/dist/tcpdump.c:1.12
--- src/external/bsd/tcpdump/dist/tcpdump.c:1.11	Tue Mar 31 21:59:35 2015
+++ src/external/bsd/tcpdump/dist/tcpdump.c	Thu Sep 17 14:03:10 2015
@@ -30,7 +30,7 @@
 static const char copyright[] _U_ =
 "@(#) Copyright (c) 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 2000\n\
 The Regents of the University of California.  All rights reserved.\n";
-__RCSID("$NetBSD: tcpdump.c,v 1.11 2015/03/31 21:59:35 christos Exp $");
+__RCSID("$NetBSD: tcpdump.c,v 1.12 2015/09/17 14:03:10 nonaka Exp $");
 #endif
 
 /*
@@ -1856,8 +1856,12 @@ main(int argc, char **argv)
 		}
 		capng_apply(CAPNG_SELECT_BOTH);
 #endif /* HAVE_LIBCAP_NG */
-		if (username || chroot_dir)
+		if (username || chroot_dir) {
+#ifndef HAVE_LIBCAP_NG
+			if (!WFileName)
+#endif
 			droproot(username, chroot_dir);
+		}
 	}
 #endif /* WIN32 */
 



CVS commit: src/external/bsd/tcpdump/dist

2015-04-04 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Apr  4 18:53:51 UTC 2015

Modified Files:
src/external/bsd/tcpdump/dist: print-rpki-rtr.c

Log Message:
Apply commit fb6e5377f392555b8c725f66b8b701f0061a3695:
-Fix/add ND_TCHECK2 tests,
-Fix a buffer overflow,
-Remove a debug printf


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.4 -r1.2 src/external/bsd/tcpdump/dist/print-rpki-rtr.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/external/bsd/tcpdump/dist

2015-04-04 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Apr  4 18:53:51 UTC 2015

Modified Files:
src/external/bsd/tcpdump/dist: print-rpki-rtr.c

Log Message:
Apply commit fb6e5377f392555b8c725f66b8b701f0061a3695:
-Fix/add ND_TCHECK2 tests,
-Fix a buffer overflow,
-Remove a debug printf


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.4 -r1.2 src/external/bsd/tcpdump/dist/print-rpki-rtr.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/tcpdump/dist/print-rpki-rtr.c
diff -u src/external/bsd/tcpdump/dist/print-rpki-rtr.c:1.1.1.4 src/external/bsd/tcpdump/dist/print-rpki-rtr.c:1.2
--- src/external/bsd/tcpdump/dist/print-rpki-rtr.c:1.1.1.4	Tue Mar 31 17:45:48 2015
+++ src/external/bsd/tcpdump/dist/print-rpki-rtr.c	Sat Apr  4 14:53:51 2015
@@ -178,7 +178,7 @@ rpki_rtr_pdu_print (netdissect_options *
 pdu_header = (rpki_rtr_pdu *)tptr;
 pdu_type = pdu_header-pdu_type;
 pdu_len = EXTRACT_32BITS(pdu_header-length);
-ND_TCHECK2(tptr, pdu_len);
+ND_TCHECK2(*tptr, pdu_len);
 hexdump = FALSE;
 
 ND_PRINT((ndo, %sRPKI-RTRv%u, %s PDU (%u), length: %u,
@@ -255,6 +255,7 @@ rpki_rtr_pdu_print (netdissect_options *
 
 	pdu = (rpki_rtr_pdu_error_report *)tptr;
 	encapsulated_pdu_length = EXTRACT_32BITS(pdu-encapsulated_pdu_length);
+	ND_TCHECK2(*tptr, encapsulated_pdu_length);
 	tlen = pdu_len;
 
 	error_code = EXTRACT_16BITS(pdu-pdu_header.u.error_code);
@@ -287,10 +288,10 @@ rpki_rtr_pdu_print (netdissect_options *
 		tptr += 4;
 		tlen -= 4;
 	}
-printf(text_length: %u tlen %u\n, text_length, tlen);
+	ND_TCHECK2(*tptr, text_length);
 	if (text_length  (text_length = tlen )) {
 		memcpy(buf, tptr, min(sizeof(buf)-1, text_length));
-		buf[text_length] = '\0';
+		buf[min(sizeof(buf) - 1, text_length)] = '\0';
 		ND_PRINT((ndo, %sError text: %s, indent_string(indent+2), buf));
 	}
 	}
@@ -337,13 +338,13 @@ rpki_rtr_print(netdissect_options *ndo, 
 	pdu_header = (rpki_rtr_pdu *)tptr;
 pdu_type = pdu_header-pdu_type;
 pdu_len = EXTRACT_32BITS(pdu_header-length);
+	ND_TCHECK2(*tptr, pdu_len);
 
 /* infinite loop check */
 if (!pdu_type || !pdu_len) {
 break;
 }
 
-ND_TCHECK2(*tptr, pdu_len);
 if (tlen  pdu_len) {
 goto trunc;
 }



CVS commit: src/external/bsd/tcpdump

2015-03-31 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Tue Mar 31 21:59:35 UTC 2015

Modified Files:
src/external/bsd/tcpdump/bin: Makefile
src/external/bsd/tcpdump/dist: addrtoname.c configure configure.in
extract.h interface.h ip.h machdep.c netdissect.h oui.c
print-ahcp.c print-aodv.c print-arcnet.c print-arp.c print-ascii.c
print-atm.c print-bgp.c print-bootp.c print-cdp.c print-cfm.c
print-chdlc.c print-cnfp.c print-dccp.c print-decnet.c
print-eigrp.c print-enc.c print-ether.c print-forces.c print-fr.c
print-gre.c print-icmp.c print-icmp6.c print-ip.c print-ip6.c
print-isoclns.c print-juniper.c print-ldp.c print-llc.c
print-lldp.c print-lmp.c print-lspping.c print-lwapp.c
print-mobility.c print-mpcp.c print-mpls.c print-null.c
print-ospf.c print-pflog.c print-pim.c print-ppp.c print-radius.c
print-rsvp.c print-sflow.c print-sip.c print-sl.c print-sll.c
print-slow.c print-smb.c print-tcp.c print-telnet.c print-udp.c
print-wb.c tcp.h tcpdump.1.in tcpdump.c udp.h util.c
src/external/bsd/tcpdump/include: config.h
Removed Files:
src/external/bsd/tcpdump/dist: bootp.h

Log Message:
merge conflicts


To generate a diff of this commit:
cvs rdiff -u -r1.12 -r1.13 src/external/bsd/tcpdump/bin/Makefile
cvs rdiff -u -r1.6 -r1.7 src/external/bsd/tcpdump/dist/addrtoname.c \
src/external/bsd/tcpdump/dist/print-lmp.c \
src/external/bsd/tcpdump/dist/print-pim.c \
src/external/bsd/tcpdump/dist/print-rsvp.c
cvs rdiff -u -r1.1.1.3 -r0 src/external/bsd/tcpdump/dist/bootp.h
cvs rdiff -u -r1.5 -r1.6 src/external/bsd/tcpdump/dist/configure \
src/external/bsd/tcpdump/dist/configure.in \
src/external/bsd/tcpdump/dist/extract.h \
src/external/bsd/tcpdump/dist/interface.h \
src/external/bsd/tcpdump/dist/machdep.c \
src/external/bsd/tcpdump/dist/print-arcnet.c \
src/external/bsd/tcpdump/dist/print-arp.c \
src/external/bsd/tcpdump/dist/print-atm.c \
src/external/bsd/tcpdump/dist/print-bgp.c \
src/external/bsd/tcpdump/dist/print-bootp.c \
src/external/bsd/tcpdump/dist/print-cdp.c \
src/external/bsd/tcpdump/dist/print-cfm.c \
src/external/bsd/tcpdump/dist/print-chdlc.c \
src/external/bsd/tcpdump/dist/print-decnet.c \
src/external/bsd/tcpdump/dist/print-eigrp.c \
src/external/bsd/tcpdump/dist/print-ether.c \
src/external/bsd/tcpdump/dist/print-fr.c \
src/external/bsd/tcpdump/dist/print-gre.c \
src/external/bsd/tcpdump/dist/print-icmp.c \
src/external/bsd/tcpdump/dist/print-isoclns.c \
src/external/bsd/tcpdump/dist/print-juniper.c \
src/external/bsd/tcpdump/dist/print-ldp.c \
src/external/bsd/tcpdump/dist/print-llc.c \
src/external/bsd/tcpdump/dist/print-lldp.c \
src/external/bsd/tcpdump/dist/print-lspping.c \
src/external/bsd/tcpdump/dist/print-ospf.c \
src/external/bsd/tcpdump/dist/print-pflog.c \
src/external/bsd/tcpdump/dist/print-ppp.c \
src/external/bsd/tcpdump/dist/print-radius.c \
src/external/bsd/tcpdump/dist/print-sflow.c \
src/external/bsd/tcpdump/dist/print-sll.c \
src/external/bsd/tcpdump/dist/print-slow.c \
src/external/bsd/tcpdump/dist/print-tcp.c \
src/external/bsd/tcpdump/dist/print-udp.c \
src/external/bsd/tcpdump/dist/tcp.h src/external/bsd/tcpdump/dist/udp.h
cvs rdiff -u -r1.4 -r1.5 src/external/bsd/tcpdump/dist/ip.h \
src/external/bsd/tcpdump/dist/oui.c \
src/external/bsd/tcpdump/dist/print-aodv.c \
src/external/bsd/tcpdump/dist/print-ascii.c \
src/external/bsd/tcpdump/dist/print-cnfp.c \
src/external/bsd/tcpdump/dist/print-dccp.c \
src/external/bsd/tcpdump/dist/print-enc.c \
src/external/bsd/tcpdump/dist/print-ip6.c \
src/external/bsd/tcpdump/dist/print-lwapp.c \
src/external/bsd/tcpdump/dist/print-mobility.c \
src/external/bsd/tcpdump/dist/print-mpcp.c \
src/external/bsd/tcpdump/dist/print-mpls.c \
src/external/bsd/tcpdump/dist/print-null.c \
src/external/bsd/tcpdump/dist/print-sip.c \
src/external/bsd/tcpdump/dist/print-sl.c \
src/external/bsd/tcpdump/dist/print-smb.c \
src/external/bsd/tcpdump/dist/print-telnet.c \
src/external/bsd/tcpdump/dist/print-wb.c \
src/external/bsd/tcpdump/dist/util.c
cvs rdiff -u -r1.2 -r1.3 src/external/bsd/tcpdump/dist/netdissect.h \
src/external/bsd/tcpdump/dist/print-ahcp.c
cvs rdiff -u -r1.3 -r1.4 src/external/bsd/tcpdump/dist/print-forces.c
cvs rdiff -u -r1.7 -r1.8 src/external/bsd/tcpdump/dist/print-icmp6.c \
src/external/bsd/tcpdump/dist/print-ip.c
cvs rdiff -u -r1.9 -r1.10 src/external/bsd/tcpdump/dist/tcpdump.1.in
cvs rdiff -u -r1.10 -r1.11 src/external/bsd/tcpdump/dist/tcpdump.c
cvs rdiff -u -r1.6 -r1.7 src/external/bsd/tcpdump/include/config.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/external/bsd/tcpdump/dist

2014-11-21 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Fri Nov 21 13:31:19 UTC 2014

Modified Files:
src/external/bsd/tcpdump/dist: tcpdump.c

Log Message:
kill the dropped privs info message


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/external/bsd/tcpdump/dist/tcpdump.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/tcpdump/dist/tcpdump.c
diff -u src/external/bsd/tcpdump/dist/tcpdump.c:1.9 src/external/bsd/tcpdump/dist/tcpdump.c:1.10
--- src/external/bsd/tcpdump/dist/tcpdump.c:1.9	Wed Nov 19 22:05:03 2014
+++ src/external/bsd/tcpdump/dist/tcpdump.c	Fri Nov 21 08:31:19 2014
@@ -30,7 +30,7 @@
 static const char copyright[] _U_ =
 @(#) Copyright (c) 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 2000\n\
 The Regents of the University of California.  All rights reserved.\n;
-__RCSID($NetBSD: tcpdump.c,v 1.9 2014/11/20 03:05:03 christos Exp $);
+__RCSID($NetBSD: tcpdump.c,v 1.10 2014/11/21 13:31:19 christos Exp $);
 #endif
 
 /*
@@ -742,7 +742,7 @@ droproot(const char *username, const cha
 			fprintf(stderr, error : ret %d\n, ret);
 		}
 		else {
-			printf(dropped privs to %s\n, username);
+//			printf(dropped privs to %s\n, username);
 		}
 		/* We don't need CAP_SETUID and CAP_SETGID */
 		capng_update(CAPNG_DROP, CAPNG_EFFECTIVE, CAP_SETUID);
@@ -762,7 +762,7 @@ droproot(const char *username, const cha
 			exit(1);
 		}
 		else {
-			printf(dropped privs to %s\n, username);
+//			printf(dropped privs to %s\n, username);
 		}
 #endif /* HAVE_CAP_NG_H */
 	}



CVS commit: src/external/bsd/tcpdump/dist

2014-11-21 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Fri Nov 21 13:31:19 UTC 2014

Modified Files:
src/external/bsd/tcpdump/dist: tcpdump.c

Log Message:
kill the dropped privs info message


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/external/bsd/tcpdump/dist/tcpdump.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/external/bsd/tcpdump

2014-11-19 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Thu Nov 20 03:05:04 UTC 2014

Modified Files:
src/external/bsd/tcpdump/bin: Makefile
src/external/bsd/tcpdump/dist: addrtoname.c af.c ah.h bpf_dump.c
checksum.c configure configure.in cpack.c cpack.h ether.h extract.h
gmpls.c gmt2local.c interface.h ip.h ip6.h ipproto.c ipproto.h
l2vpn.c machdep.c nameser.h netdissect.h nfs.h nlpid.c oui.c
parsenfsfh.c pcap_dump_ftell.c print-802_11.c print-ah.c
print-ahcp.c print-aodv.c print-aoe.c print-ap1394.c print-arcnet.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-dhcp6.c print-domain.c print-dvmrp.c
print-eap.c print-egp.c print-eigrp.c print-enc.c print-esp.c
print-ether.c print-fddi.c print-forces.c print-fr.c print-frag6.c
print-gre.c print-hsrp.c print-icmp.c print-icmp6.c print-igmp.c
print-igrp.c print-ip.c print-ip6.c print-ip6opts.c print-ipcomp.c
print-ipfc.c print-ipx.c print-isakmp.c print-isoclns.c
print-juniper.c print-krb.c print-l2tp.c print-lane.c print-ldp.c
print-llc.c print-lldp.c print-lmp.c print-loopback.c
print-lspping.c print-lwapp.c print-lwres.c print-m3ua.c
print-mobile.c print-mobility.c print-mpcp.c print-mpls.c
print-msdp.c print-nfs.c print-ntp.c print-null.c print-ospf.c
print-ospf6.c print-pflog.c print-pfsync.c print-pgm.c print-pim.c
print-pktap.c print-ppp.c print-pppoe.c print-pptp.c print-radius.c
print-raw.c print-rip.c print-ripng.c print-rrcp.c print-rsvp.c
print-rt6.c print-rx.c print-sctp.c print-sflow.c print-sip.c
print-sl.c print-sll.c print-slow.c print-smb.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-udp.c print-vjc.c print-vqp.c
print-vrrp.c print-wb.c print-zephyr.c setsignal.c signature.c
smbutil.c strcasecmp.c tcp.h tcpdump.1.in tcpdump.c udp.h util.c
vfprintf.c
src/external/bsd/tcpdump/include: config.h
Removed Files:
src/external/bsd/tcpdump/dist: aodv.h arcnet.h bgp.h dccp.h decnet.h
decode_prefix.h enc.h esp.h fddi.h icmp6.h ieee802_11.h
ieee802_11_radio.h igrp.h ipfc.h ipnet.h ipsec_doi.h ipx.h isakmp.h
l2tp.h lane.h mptcp.h netbios.h nflog.h ntp.h oakley.h ospf6.h
pmap_prot.h ppi.h print-netbios.c route6d.h rx.h sctpConstants.h
sctpHeader.h slip.h sll.h telnet.h tftp.h timed.h token.h
src/external/bsd/tcpdump/dist/missing: sockstorage.h
src/external/bsd/tcpdump/dist/tests: dio.out dio.pcap
src/external/bsd/tcpdump/dist/win32/Include: bittypes.h errno.h
getopt.h
src/external/bsd/tcpdump/dist/win32/Src: getopt.c

Log Message:
merge conflicts


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 src/external/bsd/tcpdump/bin/Makefile
cvs rdiff -u -r1.5 -r1.6 src/external/bsd/tcpdump/dist/addrtoname.c \
src/external/bsd/tcpdump/dist/print-esp.c \
src/external/bsd/tcpdump/dist/print-lmp.c \
src/external/bsd/tcpdump/dist/print-pgm.c \
src/external/bsd/tcpdump/dist/print-pim.c \
src/external/bsd/tcpdump/dist/print-rsvp.c \
src/external/bsd/tcpdump/dist/print-sctp.c
cvs rdiff -u -r1.3 -r1.4 src/external/bsd/tcpdump/dist/af.c \
src/external/bsd/tcpdump/dist/bpf_dump.c \
src/external/bsd/tcpdump/dist/ether.h \
src/external/bsd/tcpdump/dist/gmpls.c \
src/external/bsd/tcpdump/dist/gmt2local.c \
src/external/bsd/tcpdump/dist/ip.h src/external/bsd/tcpdump/dist/ip6.h \
src/external/bsd/tcpdump/dist/ipproto.c \
src/external/bsd/tcpdump/dist/ipproto.h \
src/external/bsd/tcpdump/dist/l2vpn.c \
src/external/bsd/tcpdump/dist/nameser.h \
src/external/bsd/tcpdump/dist/nfs.h src/external/bsd/tcpdump/dist/oui.c \
src/external/bsd/tcpdump/dist/pcap_dump_ftell.c \
src/external/bsd/tcpdump/dist/print-ah.c \
src/external/bsd/tcpdump/dist/print-aodv.c \
src/external/bsd/tcpdump/dist/print-ap1394.c \
src/external/bsd/tcpdump/dist/print-ascii.c \
src/external/bsd/tcpdump/dist/print-beep.c \
src/external/bsd/tcpdump/dist/print-bfd.c \
src/external/bsd/tcpdump/dist/print-bt.c \
src/external/bsd/tcpdump/dist/print-cip.c \
src/external/bsd/tcpdump/dist/print-cnfp.c \
src/external/bsd/tcpdump/dist/print-dccp.c \
src/external/bsd/tcpdump/dist/print-dvmrp.c \
src/external/bsd/tcpdump/dist/print-eap.c \
src/external/bsd/tcpdump/dist/print-egp.c \
src/external/bsd/tcpdump/dist/print-enc.c 

CVS commit: src/external/bsd/tcpdump/dist

2014-11-19 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Thu Nov 20 04:51:18 UTC 2014

Modified Files:
src/external/bsd/tcpdump/dist: tcpdump-stdinc.h

Log Message:
l in ntohl is not long!


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.4 -r1.2 src/external/bsd/tcpdump/dist/tcpdump-stdinc.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/tcpdump/dist/tcpdump-stdinc.h
diff -u src/external/bsd/tcpdump/dist/tcpdump-stdinc.h:1.1.1.4 src/external/bsd/tcpdump/dist/tcpdump-stdinc.h:1.2
--- src/external/bsd/tcpdump/dist/tcpdump-stdinc.h:1.1.1.4	Wed Nov 19 20:30:53 2014
+++ src/external/bsd/tcpdump/dist/tcpdump-stdinc.h	Wed Nov 19 23:51:18 2014
@@ -259,7 +259,7 @@ typedef char* caddr_t;
   #undef htonl
   #undef htons
 
-  static __inline__ unsigned long __ntohl (unsigned long x);
+  static __inline__ unsigned int __ntohl (unsigned int x);
   static __inline__ unsigned short __ntohs (unsigned short x);
 
   #define ntohl(x)  __ntohl(x)
@@ -267,7 +267,7 @@ typedef char* caddr_t;
   #define htonl(x)  __ntohl(x)
   #define htons(x)  __ntohs(x)
 
-  static __inline__ unsigned long __ntohl (unsigned long x)
+  static __inline__ unsigned int __ntohl (unsigned int x)
   {
 __asm__ (xchgb %b0, %h0\n\t   /* swap lower bytes  */
  rorl  $16, %0\n\t/* swap words*/



CVS commit: src/external/bsd/tcpdump

2014-11-19 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Thu Nov 20 03:05:04 UTC 2014

Modified Files:
src/external/bsd/tcpdump/bin: Makefile
src/external/bsd/tcpdump/dist: addrtoname.c af.c ah.h bpf_dump.c
checksum.c configure configure.in cpack.c cpack.h ether.h extract.h
gmpls.c gmt2local.c interface.h ip.h ip6.h ipproto.c ipproto.h
l2vpn.c machdep.c nameser.h netdissect.h nfs.h nlpid.c oui.c
parsenfsfh.c pcap_dump_ftell.c print-802_11.c print-ah.c
print-ahcp.c print-aodv.c print-aoe.c print-ap1394.c print-arcnet.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-dhcp6.c print-domain.c print-dvmrp.c
print-eap.c print-egp.c print-eigrp.c print-enc.c print-esp.c
print-ether.c print-fddi.c print-forces.c print-fr.c print-frag6.c
print-gre.c print-hsrp.c print-icmp.c print-icmp6.c print-igmp.c
print-igrp.c print-ip.c print-ip6.c print-ip6opts.c print-ipcomp.c
print-ipfc.c print-ipx.c print-isakmp.c print-isoclns.c
print-juniper.c print-krb.c print-l2tp.c print-lane.c print-ldp.c
print-llc.c print-lldp.c print-lmp.c print-loopback.c
print-lspping.c print-lwapp.c print-lwres.c print-m3ua.c
print-mobile.c print-mobility.c print-mpcp.c print-mpls.c
print-msdp.c print-nfs.c print-ntp.c print-null.c print-ospf.c
print-ospf6.c print-pflog.c print-pfsync.c print-pgm.c print-pim.c
print-pktap.c print-ppp.c print-pppoe.c print-pptp.c print-radius.c
print-raw.c print-rip.c print-ripng.c print-rrcp.c print-rsvp.c
print-rt6.c print-rx.c print-sctp.c print-sflow.c print-sip.c
print-sl.c print-sll.c print-slow.c print-smb.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-udp.c print-vjc.c print-vqp.c
print-vrrp.c print-wb.c print-zephyr.c setsignal.c signature.c
smbutil.c strcasecmp.c tcp.h tcpdump.1.in tcpdump.c udp.h util.c
vfprintf.c
src/external/bsd/tcpdump/include: config.h
Removed Files:
src/external/bsd/tcpdump/dist: aodv.h arcnet.h bgp.h dccp.h decnet.h
decode_prefix.h enc.h esp.h fddi.h icmp6.h ieee802_11.h
ieee802_11_radio.h igrp.h ipfc.h ipnet.h ipsec_doi.h ipx.h isakmp.h
l2tp.h lane.h mptcp.h netbios.h nflog.h ntp.h oakley.h ospf6.h
pmap_prot.h ppi.h print-netbios.c route6d.h rx.h sctpConstants.h
sctpHeader.h slip.h sll.h telnet.h tftp.h timed.h token.h
src/external/bsd/tcpdump/dist/missing: sockstorage.h
src/external/bsd/tcpdump/dist/tests: dio.out dio.pcap
src/external/bsd/tcpdump/dist/win32/Include: bittypes.h errno.h
getopt.h
src/external/bsd/tcpdump/dist/win32/Src: getopt.c

Log Message:
merge conflicts


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 src/external/bsd/tcpdump/bin/Makefile
cvs rdiff -u -r1.5 -r1.6 src/external/bsd/tcpdump/dist/addrtoname.c \
src/external/bsd/tcpdump/dist/print-esp.c \
src/external/bsd/tcpdump/dist/print-lmp.c \
src/external/bsd/tcpdump/dist/print-pgm.c \
src/external/bsd/tcpdump/dist/print-pim.c \
src/external/bsd/tcpdump/dist/print-rsvp.c \
src/external/bsd/tcpdump/dist/print-sctp.c
cvs rdiff -u -r1.3 -r1.4 src/external/bsd/tcpdump/dist/af.c \
src/external/bsd/tcpdump/dist/bpf_dump.c \
src/external/bsd/tcpdump/dist/ether.h \
src/external/bsd/tcpdump/dist/gmpls.c \
src/external/bsd/tcpdump/dist/gmt2local.c \
src/external/bsd/tcpdump/dist/ip.h src/external/bsd/tcpdump/dist/ip6.h \
src/external/bsd/tcpdump/dist/ipproto.c \
src/external/bsd/tcpdump/dist/ipproto.h \
src/external/bsd/tcpdump/dist/l2vpn.c \
src/external/bsd/tcpdump/dist/nameser.h \
src/external/bsd/tcpdump/dist/nfs.h src/external/bsd/tcpdump/dist/oui.c \
src/external/bsd/tcpdump/dist/pcap_dump_ftell.c \
src/external/bsd/tcpdump/dist/print-ah.c \
src/external/bsd/tcpdump/dist/print-aodv.c \
src/external/bsd/tcpdump/dist/print-ap1394.c \
src/external/bsd/tcpdump/dist/print-ascii.c \
src/external/bsd/tcpdump/dist/print-beep.c \
src/external/bsd/tcpdump/dist/print-bfd.c \
src/external/bsd/tcpdump/dist/print-bt.c \
src/external/bsd/tcpdump/dist/print-cip.c \
src/external/bsd/tcpdump/dist/print-cnfp.c \
src/external/bsd/tcpdump/dist/print-dccp.c \
src/external/bsd/tcpdump/dist/print-dvmrp.c \
src/external/bsd/tcpdump/dist/print-eap.c \
src/external/bsd/tcpdump/dist/print-egp.c \
src/external/bsd/tcpdump/dist/print-enc.c 

CVS commit: src/external/bsd/tcpdump/dist

2014-11-19 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Thu Nov 20 04:51:18 UTC 2014

Modified Files:
src/external/bsd/tcpdump/dist: tcpdump-stdinc.h

Log Message:
l in ntohl is not long!


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.4 -r1.2 src/external/bsd/tcpdump/dist/tcpdump-stdinc.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/external/bsd/tcpdump/dist

2014-08-13 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Wed Aug 13 13:53:14 UTC 2014

Modified Files:
src/external/bsd/tcpdump/dist: tcpdump.1.in

Log Message:
Add missing TP so that -a is not hidden in the -A description.
From Anon Ymous.


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/external/bsd/tcpdump/dist/tcpdump.1.in

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/tcpdump/dist/tcpdump.1.in
diff -u src/external/bsd/tcpdump/dist/tcpdump.1.in:1.7 src/external/bsd/tcpdump/dist/tcpdump.1.in:1.8
--- src/external/bsd/tcpdump/dist/tcpdump.1.in:1.7	Tue Dec 31 17:33:31 2013
+++ src/external/bsd/tcpdump/dist/tcpdump.1.in	Wed Aug 13 13:53:14 2014
@@ -207,6 +207,7 @@ special privileges.
 .B \-A
 Print each packet (minus its link level header) in ASCII.  Handy for
 capturing web pages.
+.TP
 .B \-a
 Attempt to convert network and broadcast addresses to names.
 .TP



CVS commit: src/external/bsd/tcpdump/dist

2014-08-13 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Wed Aug 13 13:53:14 UTC 2014

Modified Files:
src/external/bsd/tcpdump/dist: tcpdump.1.in

Log Message:
Add missing TP so that -a is not hidden in the -A description.
From Anon Ymous.


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/external/bsd/tcpdump/dist/tcpdump.1.in

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/external/bsd/tcpdump/dist

2014-05-13 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Tue May 13 20:29:59 UTC 2014

Modified Files:
src/external/bsd/tcpdump/dist: tcpdump.c

Log Message:
When running as root and wanting to write a file and not having CAPNG, don't
drop privs, because we cannot open the file if we drop privs.


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/external/bsd/tcpdump/dist/tcpdump.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/tcpdump/dist/tcpdump.c
diff -u src/external/bsd/tcpdump/dist/tcpdump.c:1.7 src/external/bsd/tcpdump/dist/tcpdump.c:1.8
--- src/external/bsd/tcpdump/dist/tcpdump.c:1.7	Tue Dec 31 12:33:31 2013
+++ src/external/bsd/tcpdump/dist/tcpdump.c	Tue May 13 16:29:59 2014
@@ -34,7 +34,7 @@ The Regents of the University of Califor
 static const char rcsid[] _U_ =
 @(#) Header: /tcpdump/master/tcpdump/tcpdump.c,v 1.283 2008-09-25 21:45:50 guy Exp  (LBL);
 #else
-__RCSID($NetBSD: tcpdump.c,v 1.7 2013/12/31 17:33:31 christos Exp $);
+__RCSID($NetBSD: tcpdump.c,v 1.8 2014/05/13 20:29:59 christos Exp $);
 #endif
 #endif
 
@@ -1482,8 +1482,12 @@ main(int argc, char **argv)
 #endif /* HAVE_CAP_NG_H */
 
 	if (getuid() == 0 || geteuid() == 0) {
-		if (username || chroot_dir)
+		if (username || chroot_dir) {
+#ifndef HAVE_CAP_NG_H
+			if (!WFileName)
+#endif
 			droproot(username, chroot_dir);
+		}
 
 	}
 #endif /* WIN32 */



CVS commit: src/external/bsd/tcpdump/dist

2014-05-13 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Tue May 13 20:29:59 UTC 2014

Modified Files:
src/external/bsd/tcpdump/dist: tcpdump.c

Log Message:
When running as root and wanting to write a file and not having CAPNG, don't
drop privs, because we cannot open the file if we drop privs.


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/external/bsd/tcpdump/dist/tcpdump.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/external/bsd/tcpdump

2013-12-31 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Tue Dec 31 17:33:11 UTC 2013

Modified Files:
src/external/bsd/tcpdump/bin: Makefile
src/external/bsd/tcpdump/include: config.h

Log Message:
update for 4.5.1


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/external/bsd/tcpdump/bin/Makefile
cvs rdiff -u -r1.4 -r1.5 src/external/bsd/tcpdump/include/config.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/tcpdump/bin/Makefile
diff -u src/external/bsd/tcpdump/bin/Makefile:1.9 src/external/bsd/tcpdump/bin/Makefile:1.10
--- src/external/bsd/tcpdump/bin/Makefile:1.9	Sat Sep 21 18:28:12 2013
+++ src/external/bsd/tcpdump/bin/Makefile	Tue Dec 31 12:33:11 2013
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.9 2013/09/21 22:28:12 joerg Exp $	
+#	$NetBSD: Makefile,v 1.10 2013/12/31 17:33:11 christos Exp $	
 
 WARNS?=	1	# XXX: need to cleanup later
 
@@ -39,6 +39,7 @@ print-bfd.c \
 print-bgp.c \
 print-bootp.c \
 print-bt.c \
+print-calm-fast.c \
 print-carp.c \
 print-cdp.c \
 print-cfm.c \
@@ -60,6 +61,7 @@ print-fddi.c \
 print-forces.c \
 print-fr.c \
 print-frag6.c \
+print-geonet.c \
 print-gre.c \
 print-hsrp.c \
 print-icmp.c \
@@ -87,12 +89,18 @@ print-mobile.c \
 print-mobility.c \
 print-mpcp.c \
 print-mpls.c \
+print-mptcp.c \
 print-msdp.c \
+print-msnlb.c \
+print-nflog.c \
 print-nfs.c \
 print-ntp.c \
 print-null.c \
 print-olsr.c \
+print-openflow.c \
+print-openflow-1.0.c \
 print-ospf.c \
+print-otv.c \
 print-pflog.c \
 print-pfsync.c \
 print-pgm.c \
@@ -135,8 +143,10 @@ print-vjc.c \
 print-vqp.c \
 print-vrrp.c \
 print-vtp.c \
+print-vxlan.c \
 print-wb.c \
-print-zephyr.c 
+print-zephyr.c \
+print-zeromq.c
 
 version.c: VERSION
 	${_MKTARGET_CREATE}

Index: src/external/bsd/tcpdump/include/config.h
diff -u src/external/bsd/tcpdump/include/config.h:1.4 src/external/bsd/tcpdump/include/config.h:1.5
--- src/external/bsd/tcpdump/include/config.h:1.4	Sat Apr  6 15:33:11 2013
+++ src/external/bsd/tcpdump/include/config.h	Tue Dec 31 12:33:11 2013
@@ -1,80 +1,9 @@
 /* config.h.  Generated from config.h.in by configure.  */
 /* config.h.in.  Generated from configure.in by autoheader.  */
-/* generated automatically means DO NOT MAKE CHANGES TO config.h.in --
- * make them to acconfig.h and rerun autoheader */
 
-/* Define if you enable IPv6 support */
-#define INET6 1
-
-/* Define if you enable support for the libsmi. */
-/* #undef LIBSMI */
-
-/* define if you have the addrinfo function. */
+/* define if you have the addrinfo function */
 #define HAVE_ADDRINFO 1
 
-/* define if you need to include missing/addrinfoh.h. */
-/* #undef NEED_ADDRINFO_H */
-
-/* define ifyou have the h_errno variable. */
-#define HAVE_H_ERRNO 1
-
-/* define if you have struct sockaddr_storage */
-#define HAVE_SOCKADDR_STORAGE 1
-
-/* define if you have both getipnodebyname() and getipnodebyaddr() */
-/* #undef USE_GETIPNODEBY */
-
-/* define if you have ether_ntohost() and it works */
-#define USE_ETHER_NTOHOST 1
-
-/* define if libpcap has pcap_version */
-/* #undef HAVE_PCAP_VERSION */
-
-/* define if libpcap has pcap_debug */
-#define HAVE_PCAP_DEBUG 1
-
-/* define if libpcap has yydebug */
-/* #undef HAVE_YYDEBUG */
-
-/* define if libpcap has pcap_list_datalinks() */
-#define HAVE_PCAP_LIST_DATALINKS 1
-
-/* define if libpcap has pcap_set_datalink() */
-#define HAVE_PCAP_SET_DATALINK 1
-
-/* define if libpcap has pcap_datalink_name_to_val() */
-#define HAVE_PCAP_DATALINK_NAME_TO_VAL 1
-
-/* define if libpcap has pcap_datalink_val_to_description() */
-#define HAVE_PCAP_DATALINK_VAL_TO_DESCRIPTION 1
-
-/* define if libpcap has pcap_dump_ftell() */
-#define HAVE_PCAP_DUMP_FTELL 1
-
-/* define if you have getrpcbynumber() */
-#define HAVE_GETRPCBYNUMBER 1
-
-/* Workaround for missing 64-bit formats */
-/* #undef PRId64 */
-/* #undef PRIo64 */
-/* #undef PRIx64 */
-/* #undef PRIu64 */
-
-/* Whether or not to include the possibly-buggy SMB printer */
-#define TCPDUMP_DO_SMB 1
-
-/* Define if you have the dnet_htoa function.  */
-/* #undef HAVE_DNET_HTOA */
-
-/* Define if you have a dnet_htoa declaration in netdnet/dnetdb.h.  */
-/* #undef HAVE_NETDNET_DNETDB_H_DNET_HTOA */
-
-/* define if should drop privileges by default */
-/* #undef WITH_USER */
-
-/* define if should chroot when dropping privileges */
-/* #undef WITH_CHROOT */
-
 /* Define to 1 if you have the `alarm' function. */
 #define HAVE_ALARM 1
 
@@ -85,6 +14,9 @@
don't. */
 #define HAVE_DECL_ETHER_NTOHOST 1
 
+/* define if you have the dnet_htoa function */
+/* #undef HAVE_DNET_HTOA */
+
 /* Define to 1 if you have the `ether_ntohost' function. */
 #define HAVE_ETHER_NTOHOST 1
 
@@ -97,6 +29,12 @@
 /* Define to 1 if you have the `getnameinfo' function. */
 #define HAVE_GETNAMEINFO 1
 
+/* define if you have getrpcbynumber() */
+#define HAVE_GETRPCBYNUMBER 1
+
+/* define if you have the h_errno variable */
+#define 

CVS commit: src/external/bsd/tcpdump

2013-12-31 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Tue Dec 31 17:33:11 UTC 2013

Modified Files:
src/external/bsd/tcpdump/bin: Makefile
src/external/bsd/tcpdump/include: config.h

Log Message:
update for 4.5.1


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/external/bsd/tcpdump/bin/Makefile
cvs rdiff -u -r1.4 -r1.5 src/external/bsd/tcpdump/include/config.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/external/bsd/tcpdump/dist

2013-12-31 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Tue Dec 31 17:33:31 UTC 2013

Modified Files:
src/external/bsd/tcpdump/dist: addrtoname.c checksum.c configure
configure.in cpack.c cpack.h extract.h icmp6.h ieee802_11_radio.h
interface.h machdep.c nlpid.c parsenfsfh.c print-802_11.c
print-arcnet.c print-arp.c print-atalk.c print-atm.c print-bgp.c
print-bootp.c print-cdp.c print-cfm.c print-chdlc.c print-decnet.c
print-dhcp6.c print-domain.c print-esp.c print-ether.c
print-forces.c print-fr.c print-gre.c print-hsrp.c print-icmp.c
print-icmp6.c print-igmp.c print-igrp.c print-ip.c print-isakmp.c
print-isoclns.c print-juniper.c print-krb.c print-l2tp.c
print-llc.c print-lldp.c print-lmp.c print-lwres.c print-nfs.c
print-ntp.c print-ospf.c print-ospf6.c print-pflog.c print-pgm.c
print-pim.c print-ppp.c print-pppoe.c print-radius.c print-rip.c
print-rsvp.c print-rx.c print-sctp.c print-sflow.c print-sll.c
print-stp.c print-sunrpc.c print-syslog.c print-tcp.c print-tftp.c
print-udp.c print-zephyr.c setsignal.c signature.c tcp.h
tcpdump.1.in tcpdump.c udp.h
Removed Files:
src/external/bsd/tcpdump/dist: README acconfig.h forces.h
src/external/bsd/tcpdump/dist/tests: empty.uu lmp.new lmp.sh
print-flags.sh

Log Message:
resolve conflicts.


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.2 -r0 src/external/bsd/tcpdump/dist/README \
src/external/bsd/tcpdump/dist/acconfig.h \
src/external/bsd/tcpdump/dist/forces.h
cvs rdiff -u -r1.4 -r1.5 src/external/bsd/tcpdump/dist/addrtoname.c \
src/external/bsd/tcpdump/dist/print-esp.c \
src/external/bsd/tcpdump/dist/print-lmp.c \
src/external/bsd/tcpdump/dist/print-pgm.c \
src/external/bsd/tcpdump/dist/print-pim.c \
src/external/bsd/tcpdump/dist/print-rsvp.c \
src/external/bsd/tcpdump/dist/print-sctp.c
cvs rdiff -u -r1.3 -r1.4 src/external/bsd/tcpdump/dist/checksum.c \
src/external/bsd/tcpdump/dist/configure \
src/external/bsd/tcpdump/dist/configure.in \
src/external/bsd/tcpdump/dist/cpack.c \
src/external/bsd/tcpdump/dist/cpack.h \
src/external/bsd/tcpdump/dist/extract.h \
src/external/bsd/tcpdump/dist/icmp6.h \
src/external/bsd/tcpdump/dist/ieee802_11_radio.h \
src/external/bsd/tcpdump/dist/interface.h \
src/external/bsd/tcpdump/dist/machdep.c \
src/external/bsd/tcpdump/dist/nlpid.c \
src/external/bsd/tcpdump/dist/parsenfsfh.c \
src/external/bsd/tcpdump/dist/print-802_11.c \
src/external/bsd/tcpdump/dist/print-arcnet.c \
src/external/bsd/tcpdump/dist/print-arp.c \
src/external/bsd/tcpdump/dist/print-atalk.c \
src/external/bsd/tcpdump/dist/print-atm.c \
src/external/bsd/tcpdump/dist/print-bgp.c \
src/external/bsd/tcpdump/dist/print-bootp.c \
src/external/bsd/tcpdump/dist/print-cdp.c \
src/external/bsd/tcpdump/dist/print-cfm.c \
src/external/bsd/tcpdump/dist/print-chdlc.c \
src/external/bsd/tcpdump/dist/print-decnet.c \
src/external/bsd/tcpdump/dist/print-dhcp6.c \
src/external/bsd/tcpdump/dist/print-domain.c \
src/external/bsd/tcpdump/dist/print-ether.c \
src/external/bsd/tcpdump/dist/print-fr.c \
src/external/bsd/tcpdump/dist/print-gre.c \
src/external/bsd/tcpdump/dist/print-hsrp.c \
src/external/bsd/tcpdump/dist/print-icmp.c \
src/external/bsd/tcpdump/dist/print-igmp.c \
src/external/bsd/tcpdump/dist/print-igrp.c \
src/external/bsd/tcpdump/dist/print-isoclns.c \
src/external/bsd/tcpdump/dist/print-juniper.c \
src/external/bsd/tcpdump/dist/print-krb.c \
src/external/bsd/tcpdump/dist/print-l2tp.c \
src/external/bsd/tcpdump/dist/print-llc.c \
src/external/bsd/tcpdump/dist/print-lldp.c \
src/external/bsd/tcpdump/dist/print-lwres.c \
src/external/bsd/tcpdump/dist/print-nfs.c \
src/external/bsd/tcpdump/dist/print-ntp.c \
src/external/bsd/tcpdump/dist/print-ospf.c \
src/external/bsd/tcpdump/dist/print-ospf6.c \
src/external/bsd/tcpdump/dist/print-pflog.c \
src/external/bsd/tcpdump/dist/print-ppp.c \
src/external/bsd/tcpdump/dist/print-pppoe.c \
src/external/bsd/tcpdump/dist/print-radius.c \
src/external/bsd/tcpdump/dist/print-rip.c \
src/external/bsd/tcpdump/dist/print-rx.c \
src/external/bsd/tcpdump/dist/print-sflow.c \
src/external/bsd/tcpdump/dist/print-sll.c \
src/external/bsd/tcpdump/dist/print-stp.c \
src/external/bsd/tcpdump/dist/print-sunrpc.c \
src/external/bsd/tcpdump/dist/print-syslog.c \
src/external/bsd/tcpdump/dist/print-tcp.c \
src/external/bsd/tcpdump/dist/print-tftp.c \
src/external/bsd/tcpdump/dist/print-udp.c \
src/external/bsd/tcpdump/dist/print-zephyr.c \
src/external/bsd/tcpdump/dist/setsignal.c \
src/external/bsd/tcpdump/dist/signature.c \

CVS commit: src/external/bsd/tcpdump/dist

2013-10-19 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Oct 20 02:58:24 UTC 2013

Modified Files:
src/external/bsd/tcpdump/dist: addrtoname.c

Log Message:
fix type punned issue


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/external/bsd/tcpdump/dist/addrtoname.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/tcpdump/dist/addrtoname.c
diff -u src/external/bsd/tcpdump/dist/addrtoname.c:1.3 src/external/bsd/tcpdump/dist/addrtoname.c:1.4
--- src/external/bsd/tcpdump/dist/addrtoname.c:1.3	Sat Apr  6 15:33:07 2013
+++ src/external/bsd/tcpdump/dist/addrtoname.c	Sat Oct 19 22:58:24 2013
@@ -27,7 +27,7 @@
 static const char rcsid[] _U_ =
 @(#) Header: /tcpdump/master/tcpdump/addrtoname.c,v 1.119 2007-08-08 14:06:34 hannes Exp  (LBL);
 #endif
-__RCSID($NetBSD: addrtoname.c,v 1.3 2013/04/06 19:33:07 christos Exp $);
+__RCSID($NetBSD: addrtoname.c,v 1.4 2013/10/20 02:58:24 christos Exp $);
 #endif
 
 #ifdef HAVE_CONFIG_H
@@ -281,9 +281,11 @@ getname6(const u_char *ap)
 	static struct h6namemem *p;		/* static for longjmp() */
 	register const char *cp;
 	char ntop_buf[INET6_ADDRSTRLEN];
+	uint16_t h;
 
 	memcpy(addr, ap, sizeof(addr));
-	p = h6nametable[*(u_int16_t *)addr.s6_addr[14]  (HASHNAMESIZE-1)];
+	memcpy(h, addr.s6_addr[14], sizeof(h));
+	p = h6nametable[h  (HASHNAMESIZE-1)];
 	for (; p-nxt; p = p-nxt) {
 		if (memcmp(p-addr, addr, sizeof(addr)) == 0)
 			return (p-name);



CVS commit: src/external/bsd/tcpdump/dist

2013-10-19 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Oct 20 02:58:34 UTC 2013

Modified Files:
src/external/bsd/tcpdump/dist: print-esp.c print-icmp6.c print-isakmp.c
print-pgm.c print-pim.c print-sctp.c

Log Message:
remove unused variables


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/external/bsd/tcpdump/dist/print-esp.c \
src/external/bsd/tcpdump/dist/print-pgm.c \
src/external/bsd/tcpdump/dist/print-pim.c \
src/external/bsd/tcpdump/dist/print-sctp.c
cvs rdiff -u -r1.4 -r1.5 src/external/bsd/tcpdump/dist/print-icmp6.c \
src/external/bsd/tcpdump/dist/print-isakmp.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/tcpdump/dist/print-esp.c
diff -u src/external/bsd/tcpdump/dist/print-esp.c:1.3 src/external/bsd/tcpdump/dist/print-esp.c:1.4
--- src/external/bsd/tcpdump/dist/print-esp.c:1.3	Sat Apr  6 15:33:08 2013
+++ src/external/bsd/tcpdump/dist/print-esp.c	Sat Oct 19 22:58:34 2013
@@ -27,7 +27,7 @@
 static const char rcsid[] _U_ =
 @(#) Header: /tcpdump/master/tcpdump/print-esp.c,v 1.58 2007-12-07 00:03:07 mcr Exp  (LBL);
 #else
-__RCSID($NetBSD: print-esp.c,v 1.3 2013/04/06 19:33:08 christos Exp $);
+__RCSID($NetBSD: print-esp.c,v 1.4 2013/10/20 02:58:34 christos Exp $);
 #endif
 #endif
 
@@ -221,7 +221,6 @@ static int
 espprint_decode_encalgo(netdissect_options *ndo,
 			char *decode, struct sa_list *sa)
 {
-	int len;
 	size_t i;
 	const EVP_CIPHER *evp;
 	int authlen = 0;
@@ -234,7 +233,6 @@ espprint_decode_encalgo(netdissect_optio
 	}
 	*colon = '\0';
 	
-	len = colon - decode;
 	if (strlen(decode)  strlen(-hmac96) 
 	!strcmp(decode + strlen(decode) - strlen(-hmac96),
 		-hmac96)) {
@@ -540,7 +538,6 @@ esp_print(netdissect_options *ndo,
 #ifdef HAVE_LIBCRYPTO
 	struct ip *ip;
 	struct sa_list *sa = NULL;
-	int espsecret_keylen;
 #ifdef INET6
 	struct ip6_hdr *ip6 = NULL;
 #endif
@@ -551,7 +548,6 @@ esp_print(netdissect_options *ndo,
 	u_char *ivoff;
 	u_char *p;
 	EVP_CIPHER_CTX ctx;
-	int blocksz;
 #endif
 
 	esp = (struct newesp *)bp;
@@ -655,7 +651,6 @@ esp_print(netdissect_options *ndo,
 	ivoff = (u_char *)(esp + 1) + 0;
 	ivlen = sa-ivlen;
 	secret = sa-secret;
-	espsecret_keylen = sa-secretlen;
 	ep = ep - sa-authlen;
 
 	if (sa-evp) {
@@ -663,7 +658,7 @@ esp_print(netdissect_options *ndo,
 		if (EVP_CipherInit(ctx, sa-evp, secret, NULL, 0)  0)
 			(*ndo-ndo_warning)(ndo, espkey init failed);
 
-		blocksz = EVP_CIPHER_CTX_block_size(ctx);
+		(void)EVP_CIPHER_CTX_block_size(ctx);
 
 		p = ivoff;
 		EVP_CipherInit(ctx, NULL, NULL, p, 0);
Index: src/external/bsd/tcpdump/dist/print-pgm.c
diff -u src/external/bsd/tcpdump/dist/print-pgm.c:1.3 src/external/bsd/tcpdump/dist/print-pgm.c:1.4
--- src/external/bsd/tcpdump/dist/print-pgm.c:1.3	Sat Apr  6 15:33:08 2013
+++ src/external/bsd/tcpdump/dist/print-pgm.c	Sat Oct 19 22:58:34 2013
@@ -19,7 +19,7 @@
 static const char rcsid[] _U_ =
 @(#) Header: /tcpdump/master/tcpdump/print-pgm.c,v 1.5 2005-06-07 22:05:58 guy Exp ;
 #else
-__RCSID($NetBSD: print-pgm.c,v 1.3 2013/04/06 19:33:08 christos Exp $);
+__RCSID($NetBSD: print-pgm.c,v 1.4 2013/10/20 02:58:34 christos Exp $);
 #endif
 #endif
 
@@ -176,7 +176,7 @@ pgm_print(register const u_char *bp, reg
 #else
 	char nla_buf[INET_ADDRSTRLEN];
 #endif
-	u_int8_t opt_type, opt_len, flags1, flags2;
+	u_int8_t opt_type, opt_len;
 	u_int32_t seq, opts_len, len, offset;
 
 	pgm = (struct pgm_header *)bp;
@@ -550,8 +550,7 @@ pgm_print(register const u_char *bp, reg
 			(void)printf([Bad OPT_FRAGMENT option, length %u != 16], opt_len);
 			return;
 		}
-		flags1 = *bp++;
-		flags2 = *bp++;
+		bp += 2;	/* skip flags */
 		seq = EXTRACT_32BITS(bp);
 		bp += sizeof(u_int32_t);
 		offset = EXTRACT_32BITS(bp);
@@ -563,8 +562,7 @@ pgm_print(register const u_char *bp, reg
 		break;
 
 		case PGM_OPT_NAK_LIST:
-		flags1 = *bp++;
-		flags2 = *bp++;
+		bp += 2;	/* skip flags */
 		opt_len -= sizeof(u_int32_t);	/* option header */
 		(void)printf( NAK LIST);
 		while (opt_len) {
@@ -585,8 +583,7 @@ pgm_print(register const u_char *bp, reg
 			(void)printf([Bad OPT_JOIN option, length %u != 8], opt_len);
 			return;
 		}
-		flags1 = *bp++;
-		flags2 = *bp++;
+		bp += 2;	/* skip flags */
 		seq = EXTRACT_32BITS(bp);
 		bp += sizeof(u_int32_t);
 		(void)printf( JOIN %u, seq);
@@ -598,8 +595,7 @@ pgm_print(register const u_char *bp, reg
 			(void)printf([Bad OPT_NAK_BO_IVL option, length %u != 12], opt_len);
 			return;
 		}
-		flags1 = *bp++;
-		flags2 = *bp++;
+		bp += 2;	/* skip flags */
 		offset = EXTRACT_32BITS(bp);
 		bp += sizeof(u_int32_t);
 		seq = EXTRACT_32BITS(bp);
@@ -613,8 +609,7 @@ pgm_print(register const u_char *bp, reg
 			(void)printf([Bad OPT_NAK_BO_RNG option, length %u != 12], opt_len);
 			return;
 		}
-		

CVS commit: src/external/bsd/tcpdump/dist

2013-10-19 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Oct 20 02:58:24 UTC 2013

Modified Files:
src/external/bsd/tcpdump/dist: addrtoname.c

Log Message:
fix type punned issue


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/external/bsd/tcpdump/dist/addrtoname.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/external/bsd/tcpdump/dist

2013-10-19 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Oct 20 02:58:34 UTC 2013

Modified Files:
src/external/bsd/tcpdump/dist: print-esp.c print-icmp6.c print-isakmp.c
print-pgm.c print-pim.c print-sctp.c

Log Message:
remove unused variables


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/external/bsd/tcpdump/dist/print-esp.c \
src/external/bsd/tcpdump/dist/print-pgm.c \
src/external/bsd/tcpdump/dist/print-pim.c \
src/external/bsd/tcpdump/dist/print-sctp.c
cvs rdiff -u -r1.4 -r1.5 src/external/bsd/tcpdump/dist/print-icmp6.c \
src/external/bsd/tcpdump/dist/print-isakmp.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/external/bsd/tcpdump/dist

2013-04-12 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Fri Apr 12 23:51:51 UTC 2013

Modified Files:
src/external/bsd/tcpdump/dist: print-ip.c tcpdump.c

Log Message:
move droproot after we have dealt with input and output files.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/external/bsd/tcpdump/dist/print-ip.c
cvs rdiff -u -r1.5 -r1.6 src/external/bsd/tcpdump/dist/tcpdump.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/tcpdump/dist/print-ip.c
diff -u src/external/bsd/tcpdump/dist/print-ip.c:1.3 src/external/bsd/tcpdump/dist/print-ip.c:1.4
--- src/external/bsd/tcpdump/dist/print-ip.c:1.3	Sat Apr  6 15:33:08 2013
+++ src/external/bsd/tcpdump/dist/print-ip.c	Fri Apr 12 19:51:50 2013
@@ -25,7 +25,7 @@
 static const char rcsid[] _U_ =
 @(#) Header: /tcpdump/master/tcpdump/print-ip.c,v 1.159 2007-09-14 01:29:28 guy Exp  (LBL);
 #else
-__RCSID($NetBSD: print-ip.c,v 1.3 2013/04/06 19:33:08 christos Exp $);
+__RCSID($NetBSD: print-ip.c,v 1.4 2013/04/12 23:51:50 christos Exp $);
 #endif
 #endif
 
@@ -491,6 +491,7 @@ again:
 		break;
 
 	default:
+		fprintf(stderr, : %d %d\n, ndo-ndo_nflag, ipds-nh);
 		if (ndo-ndo_nflag==0  (proto = getprotobynumber(ipds-nh)) != NULL)
 			ND_PRINT((ndo,  %s, proto-p_name));
 		else

Index: src/external/bsd/tcpdump/dist/tcpdump.c
diff -u src/external/bsd/tcpdump/dist/tcpdump.c:1.5 src/external/bsd/tcpdump/dist/tcpdump.c:1.6
--- src/external/bsd/tcpdump/dist/tcpdump.c:1.5	Sun Apr  7 15:17:11 2013
+++ src/external/bsd/tcpdump/dist/tcpdump.c	Fri Apr 12 19:51:50 2013
@@ -34,7 +34,7 @@ The Regents of the University of Califor
 static const char rcsid[] _U_ =
 @(#) Header: /tcpdump/master/tcpdump/tcpdump.c,v 1.283 2008-09-25 21:45:50 guy Exp  (LBL);
 #else
-__RCSID($NetBSD: tcpdump.c,v 1.5 2013/04/07 19:17:11 christos Exp $);
+__RCSID($NetBSD: tcpdump.c,v 1.6 2013/04/12 23:51:50 christos Exp $);
 #endif
 #endif
 
@@ -1295,29 +1295,6 @@ main(int argc, char **argv)
 		(void)setsignal(SIGHUP, oldhandler);
 #endif /* WIN32 */
 
-#ifndef WIN32
-	/*
-	 * If a user name was specified with -Z, attempt to switch to
-	 * that user's UID.  This would probably be used with sudo,
-	 * to allow tcpdump to be run in a special restricted
-	 * account (if you just want to allow users to open capture
-	 * devices, and can't just give users that permission,
-	 * you'd make tcpdump set-UID or set-GID).
-	 *
-	 * Tcpdump doesn't necessarily write only to one savefile;
-	 * the general only way to allow a -Z instance to write to
-	 * savefiles as the user under whose UID it's run, rather
-	 * than as the user specified with -Z, would thus be to switch
-	 * to the original user ID before opening a capture file and
-	 * then switch back to the -Z user ID after opening the savefile.
-	 * Switching to the -Z user ID only after opening the first
-	 * savefile doesn't handle the general case.
-	 */
-	if (getuid() == 0 || geteuid() == 0) {
-		if (username || chroot_dir)
-			droproot(username, chroot_dir);
-	}
-#endif /* WIN32 */
 
 	if (pcap_setfilter(pd, fcode)  0)
 		error(%s, pcap_geterr(pd));
@@ -1421,6 +1398,28 @@ main(int argc, char **argv)
 		}
 		(void)fflush(stderr);
 	}
+
+	/*
+	 * If a user name was specified with -Z, attempt to switch to
+	 * that user's UID.  This would probably be used with sudo,
+	 * to allow tcpdump to be run in a special restricted
+	 * account (if you just want to allow users to open capture
+	 * devices, and can't just give users that permission,
+	 * you'd make tcpdump set-UID or set-GID).
+	 *
+	 * Tcpdump doesn't necessarily write only to one savefile;
+	 * the general only way to allow a -Z instance to write to
+	 * savefiles as the user under whose UID it's run, rather
+	 * than as the user specified with -Z, would thus be to switch
+	 * to the original user ID before opening a capture file and
+	 * then switch back to the -Z user ID after opening the savefile.
+	 * Switching to the -Z user ID only after opening the first
+	 * savefile doesn't handle the general case.
+	 */
+	if (getuid() == 0 || geteuid() == 0) {
+		if (username || chroot_dir)
+			droproot(username, chroot_dir);
+	}
 #endif /* WIN32 */
 	status = pcap_loop(pd, cnt, callback, pcap_userdata);
 	if (WFileName == NULL) {



CVS commit: src/external/bsd/tcpdump/dist

2013-04-12 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Apr 13 02:08:59 UTC 2013

Modified Files:
src/external/bsd/tcpdump/dist: print-ip.c

Log Message:
remove debugging accidentally committed.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/external/bsd/tcpdump/dist/print-ip.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/tcpdump/dist/print-ip.c
diff -u src/external/bsd/tcpdump/dist/print-ip.c:1.4 src/external/bsd/tcpdump/dist/print-ip.c:1.5
--- src/external/bsd/tcpdump/dist/print-ip.c:1.4	Fri Apr 12 19:51:50 2013
+++ src/external/bsd/tcpdump/dist/print-ip.c	Fri Apr 12 22:08:59 2013
@@ -25,7 +25,7 @@
 static const char rcsid[] _U_ =
 @(#) Header: /tcpdump/master/tcpdump/print-ip.c,v 1.159 2007-09-14 01:29:28 guy Exp  (LBL);
 #else
-__RCSID($NetBSD: print-ip.c,v 1.4 2013/04/12 23:51:50 christos Exp $);
+__RCSID($NetBSD: print-ip.c,v 1.5 2013/04/13 02:08:59 christos Exp $);
 #endif
 #endif
 
@@ -491,7 +491,6 @@ again:
 		break;
 
 	default:
-		fprintf(stderr, : %d %d\n, ndo-ndo_nflag, ipds-nh);
 		if (ndo-ndo_nflag==0  (proto = getprotobynumber(ipds-nh)) != NULL)
 			ND_PRINT((ndo,  %s, proto-p_name));
 		else



CVS commit: src/external/bsd/tcpdump/dist

2013-04-12 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Fri Apr 12 23:51:51 UTC 2013

Modified Files:
src/external/bsd/tcpdump/dist: print-ip.c tcpdump.c

Log Message:
move droproot after we have dealt with input and output files.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/external/bsd/tcpdump/dist/print-ip.c
cvs rdiff -u -r1.5 -r1.6 src/external/bsd/tcpdump/dist/tcpdump.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/external/bsd/tcpdump/dist

2013-04-12 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Apr 13 02:08:59 UTC 2013

Modified Files:
src/external/bsd/tcpdump/dist: print-ip.c

Log Message:
remove debugging accidentally committed.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/external/bsd/tcpdump/dist/print-ip.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/external/bsd/tcpdump/dist

2013-04-07 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Apr  7 19:17:11 UTC 2013

Modified Files:
src/external/bsd/tcpdump/dist: tcpdump.c

Log Message:
- the initgroups function needs to be able to do name to gid translations,
  so do it before the chroot, otherwise we lose /etc/nsswitch.conf and
  /etc/group
- run res_init() so that we prime and initialize the resolver before the
  chroot, since our chroot lacks /etc/{{nsswitch,resolve}.conf,hosts}
  this is not portable behavior, but it is a lot better than populating
  the chroot with crap.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/external/bsd/tcpdump/dist/tcpdump.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/tcpdump/dist/tcpdump.c
diff -u src/external/bsd/tcpdump/dist/tcpdump.c:1.4 src/external/bsd/tcpdump/dist/tcpdump.c:1.5
--- src/external/bsd/tcpdump/dist/tcpdump.c:1.4	Sat Apr  6 15:33:09 2013
+++ src/external/bsd/tcpdump/dist/tcpdump.c	Sun Apr  7 15:17:11 2013
@@ -34,7 +34,7 @@ The Regents of the University of Califor
 static const char rcsid[] _U_ =
 @(#) Header: /tcpdump/master/tcpdump/tcpdump.c,v 1.283 2008-09-25 21:45:50 guy Exp  (LBL);
 #else
-__RCSID($NetBSD: tcpdump.c,v 1.4 2013/04/06 19:33:09 christos Exp $);
+__RCSID($NetBSD: tcpdump.c,v 1.5 2013/04/07 19:17:11 christos Exp $);
 #endif
 #endif
 
@@ -71,6 +71,7 @@ extern int SIZE_BUF;
 #include stdlib.h
 #include string.h
 #include limits.h
+#include resolv.h
 #ifndef WIN32
 #include sys/wait.h
 #include sys/resource.h
@@ -533,17 +534,25 @@ droproot(const char *username, const cha
 	
 	pw = getpwnam(username);
 	if (pw) {
+		if (initgroups(pw-pw_name, pw-pw_gid) != 0) {
+			fprintf(stderr, tcpdump: Couldn't initgroups to 
+			'%.32s' gid=%lu: %s\n, pw-pw_name,
+			(unsigned long)pw-pw_gid,
+			pcap_strerror(errno));
+			exit(1);
+		}
 		if (chroot_dir) {
 			setprotoent(1);
+			res_init();
 			if (chroot(chroot_dir) != 0 || chdir (/) != 0) {
 fprintf(stderr, tcpdump: Couldn't chroot/chdir to '%.64s': %s\n,
 chroot_dir, pcap_strerror(errno));
 exit(1);
 			}
 		}
-		if (initgroups(pw-pw_name, pw-pw_gid) != 0 ||
-		setgid(pw-pw_gid) != 0 || setuid(pw-pw_uid) != 0) {
-			fprintf(stderr, tcpdump: Couldn't change to '%.32s' uid=%lu gid=%lu: %s\n,
+		if (setgid(pw-pw_gid) != 0 || setuid(pw-pw_uid) != 0) {
+			fprintf(stderr, tcpdump: Couldn't change to 
+			'%.32s' uid=%lu gid=%lu: %s\n,
 			username, 
 			(unsigned long)pw-pw_uid,
 			(unsigned long)pw-pw_gid,



CVS commit: src/external/bsd/tcpdump/dist

2013-04-07 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Apr  7 19:17:11 UTC 2013

Modified Files:
src/external/bsd/tcpdump/dist: tcpdump.c

Log Message:
- the initgroups function needs to be able to do name to gid translations,
  so do it before the chroot, otherwise we lose /etc/nsswitch.conf and
  /etc/group
- run res_init() so that we prime and initialize the resolver before the
  chroot, since our chroot lacks /etc/{{nsswitch,resolve}.conf,hosts}
  this is not portable behavior, but it is a lot better than populating
  the chroot with crap.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/external/bsd/tcpdump/dist/tcpdump.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/external/bsd/tcpdump/dist

2012-01-16 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Mon Jan 16 17:34:19 UTC 2012

Modified Files:
src/external/bsd/tcpdump/dist: print-eigrp.c print-ldp.c print-lmp.c
print-lspping.c print-rsvp.c print-slow.c

Log Message:
PR/45841: Henning Petersen: One sizeof is enough.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/external/bsd/tcpdump/dist/print-eigrp.c \
src/external/bsd/tcpdump/dist/print-ldp.c \
src/external/bsd/tcpdump/dist/print-lmp.c \
src/external/bsd/tcpdump/dist/print-lspping.c \
src/external/bsd/tcpdump/dist/print-rsvp.c \
src/external/bsd/tcpdump/dist/print-slow.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/external/bsd/tcpdump/dist

2011-12-27 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Tue Dec 27 15:12:45 UTC 2011

Modified Files:
src/external/bsd/tcpdump/dist: print-icmp6.c

Log Message:
PR/45747: Henning Petersen: Fix icmp6 verbose printing.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/external/bsd/tcpdump/dist/print-icmp6.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/tcpdump/dist/print-icmp6.c
diff -u src/external/bsd/tcpdump/dist/print-icmp6.c:1.2 src/external/bsd/tcpdump/dist/print-icmp6.c:1.3
--- src/external/bsd/tcpdump/dist/print-icmp6.c:1.2	Sun Dec  5 00:11:30 2010
+++ src/external/bsd/tcpdump/dist/print-icmp6.c	Tue Dec 27 10:12:45 2011
@@ -25,7 +25,7 @@
 static const char rcsid[] _U_ =
 @(#) Header: /tcpdump/master/tcpdump/print-icmp6.c,v 1.86 2008-02-05 19:36:13 guy Exp;
 #else
-__RCSID($NetBSD: print-icmp6.c,v 1.2 2010/12/05 05:11:30 christos Exp $);
+__RCSID($NetBSD: print-icmp6.c,v 1.3 2011/12/27 15:12:45 christos Exp $);
 #endif
 #endif
 
@@ -355,15 +355,20 @@ icmp6_print(netdissect_options *ndo,
 printf(ICMP6, %s, tok2str(icmp6_type_values,unknown icmp6 type (%u),dp-icmp6_type));
 
 /* display cosmetics: print the packet length for printer that use the vflag now */
-if (vflag  (dp-icmp6_type ==
-  ND_ROUTER_SOLICIT ||
-  ND_ROUTER_ADVERT ||
-  ND_NEIGHBOR_ADVERT ||
-  ND_NEIGHBOR_SOLICIT ||
-  ND_REDIRECT ||
-  ICMP6_HADISCOV_REPLY ||
-  ICMP6_MOBILEPREFIX_ADVERT ))
-printf(, length %u, length);
+if (vflag)
+		switch (dp-icmp6_type) {
+		case ND_ROUTER_SOLICIT:
+		case ND_ROUTER_ADVERT:
+		case ND_NEIGHBOR_ADVERT:
+		case ND_NEIGHBOR_SOLICIT:
+		case ND_REDIRECT:
+		case ICMP6_HADISCOV_REPLY:
+		case ICMP6_MOBILEPREFIX_ADVERT:
+			printf(, length %u, length);
+			break;
+		default:
+			break;
+		}
   
 	switch (dp-icmp6_type) {
 	case ICMP6_DST_UNREACH:



CVS commit: src/external/bsd/tcpdump/dist

2011-12-27 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Tue Dec 27 15:12:45 UTC 2011

Modified Files:
src/external/bsd/tcpdump/dist: print-icmp6.c

Log Message:
PR/45747: Henning Petersen: Fix icmp6 verbose printing.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/external/bsd/tcpdump/dist/print-icmp6.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/external/bsd/tcpdump/dist

2011-11-16 Thread enami tsugutomo
Module Name:src
Committed By:   enami
Date:   Thu Nov 17 02:41:55 UTC 2011

Modified Files:
src/external/bsd/tcpdump/dist: tcpdump.1.in

Log Message:
Replace section number with actual one as we did in see also list.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/external/bsd/tcpdump/dist/tcpdump.1.in

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/tcpdump/dist/tcpdump.1.in
diff -u src/external/bsd/tcpdump/dist/tcpdump.1.in:1.4 src/external/bsd/tcpdump/dist/tcpdump.1.in:1.5
--- src/external/bsd/tcpdump/dist/tcpdump.1.in:1.4	Fri Dec 17 10:35:10 2010
+++ src/external/bsd/tcpdump/dist/tcpdump.1.in	Thu Nov 17 02:41:55 2011
@@ -1,6 +1,6 @@
 .\ @(#) Header: /tcpdump/master/tcpdump/tcpdump.1.in,v 1.2 2008-11-09 23:35:03 mcr Exp (LBL)
 .\
-.\	$NetBSD: tcpdump.1.in,v 1.4 2010/12/17 10:35:10 wiz Exp $
+.\	$NetBSD: tcpdump.1.in,v 1.5 2011/11/17 02:41:55 enami Exp $
 .\
 .\ Copyright (c) 1987, 1988, 1989, 1990, 1991, 1992, 1994, 1995, 1996, 1997
 .\	The Regents of the University of California.  All rights reserved.
@@ -184,7 +184,7 @@ and will continue capturing packets.
 .LP
 Reading packets from a network interface may require that you have
 special privileges; see the
-.B pcap (3PCAP)
+.B pcap (3)
 man page for details.  Reading a saved packet file doesn't require
 special privileges.
 .SH OPTIONS
@@ -539,7 +539,7 @@ them out.
 They can later be printed with the \-r option.
 Standard output is used if \fIfile\fR is ``-''.
 See
-.BR pcap-savefile (@MAN_FILE_FORMATS@)
+.BR pcap-savefile (5)
 for a description of the file format.
 .TP
 .B \-W
@@ -638,7 +638,7 @@ Otherwise,
 only packets for which \fIexpression\fP is `true' will be dumped.
 .LP
 For the \fIexpression\fP syntax, see
-.BR pcap-filter (@MAN_MISC_INFO@).
+.BR pcap-filter (7).
 .LP
 Expression arguments can be passed to \fItcpdump\fP as either a single
 argument or as multiple arguments, whichever is more convenient.



CVS commit: src/external/bsd/tcpdump/dist

2011-11-16 Thread enami tsugutomo
Module Name:src
Committed By:   enami
Date:   Thu Nov 17 02:41:55 UTC 2011

Modified Files:
src/external/bsd/tcpdump/dist: tcpdump.1.in

Log Message:
Replace section number with actual one as we did in see also list.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/external/bsd/tcpdump/dist/tcpdump.1.in

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/external/bsd/tcpdump

2011-08-17 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Aug 17 10:48:02 UTC 2011

Modified Files:
src/external/bsd/tcpdump/bin: Makefile
src/external/bsd/tcpdump/dist: extract.h print-isakmp.c

Log Message:
fix strict aliasing issues.


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/external/bsd/tcpdump/bin/Makefile
cvs rdiff -u -r1.1.1.1 -r1.2 src/external/bsd/tcpdump/dist/extract.h
cvs rdiff -u -r1.2 -r1.3 src/external/bsd/tcpdump/dist/print-isakmp.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/tcpdump/bin/Makefile
diff -u src/external/bsd/tcpdump/bin/Makefile:1.6 src/external/bsd/tcpdump/bin/Makefile:1.7
--- src/external/bsd/tcpdump/bin/Makefile:1.6	Tue Jun 21 22:49:43 2011
+++ src/external/bsd/tcpdump/bin/Makefile	Wed Aug 17 06:48:02 2011
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.6 2011/06/22 02:49:43 mrg Exp $	
+#	$NetBSD: Makefile,v 1.7 2011/08/17 10:48:02 christos Exp $	
 
 WARNS?=	1	# XXX: need to cleanup later
 
@@ -89,8 +89,3 @@
 	cp ${.ALLSRC} ${.TARGET}
 
 .include bsd.prog.mk
-
-# XXX
-.if ${HAVE_GCC} == 45
-COPTS+=	-fno-strict-aliasing
-.endif

Index: src/external/bsd/tcpdump/dist/extract.h
diff -u src/external/bsd/tcpdump/dist/extract.h:1.1.1.1 src/external/bsd/tcpdump/dist/extract.h:1.2
--- src/external/bsd/tcpdump/dist/extract.h:1.1.1.1	Sat Dec  4 22:15:01 2010
+++ src/external/bsd/tcpdump/dist/extract.h	Wed Aug 17 06:48:02 2011
@@ -21,6 +21,97 @@
  * @(#) Header: /tcpdump/master/tcpdump/extract.h,v 1.25 2006-01-30 16:20:07 hannes Exp (LBL)
  */
 
+#ifdef __NetBSD__
+#include string.h
+
+/*
+ * Do it the portable way and let the compiler optimize the code
+ */
+static inline uint16_t EXTRACT_16BITS(const void *p)
+{
+	uint16_t t;
+	memcpy(t, p, sizeof(t));
+	return ntohs(t);
+}
+
+static inline uint32_t EXTRACT_24BITS(const void *p)
+{
+	uint8_t t[3];
+	memcpy(t, p, sizeof(t));
+	return
+	((uint32_t)t[0]  16) |
+	((uint32_t)t[1]  8) |
+	t[2];
+}
+
+static inline uint32_t EXTRACT_32BITS(const void *p)
+{
+	uint32_t t;
+	memcpy(t, p, sizeof(t));
+	return ntohl(t);
+}
+
+static inline uint64_t EXTRACT_64BITS(const void *p)
+{
+	uint32_t t[2];
+	memcpy(t[0], p, sizeof(t[0]));
+	memcpy(t[1], (const uint8_t *)p + sizeof(t[0]), sizeof(t[1]));
+	return ((uint64_t)ntohl(t[0])  32) | ntohl(t[1]);
+}
+
+static inline uint8_t EXTRACT_LE_8BITS(const void *p)
+{
+	uint8_t t[1];
+	memcpy(t, p, sizeof(t));
+	return t[0];
+}
+
+static inline uint16_t EXTRACT_LE_16BITS(const void *p)
+{
+	uint8_t t[2];
+	memcpy(t, p, sizeof(t));
+	return
+	((uint16_t)t[1]  8) |
+	t[0];
+}
+
+static inline uint32_t EXTRACT_LE_24BITS(const void *p)
+{
+	uint8_t t[3];
+	memcpy(t, p, sizeof(t));
+	return
+	((uint32_t)t[2]  16) |
+	((uint32_t)t[1]  8) |
+	t[0];
+}
+
+static inline uint32_t EXTRACT_LE_32BITS(const void *p)
+{
+	uint8_t t[4];
+	memcpy(t, p, sizeof(t));
+	return
+	((uint32_t)t[3]  24) |
+	((uint32_t)t[2]  16) |
+	((uint32_t)t[1]  8) |
+	t[0];
+}
+
+static inline uint64_t EXTRACT_LE_64BITS(const void *p)
+{
+	uint8_t t[8];
+	memcpy(t, p, sizeof(t));
+	return
+	((uint64_t)t[7]  56) |
+	((uint64_t)t[6]  48) |
+	((uint64_t)t[5]  40) |
+	((uint64_t)t[4]  32) |
+	((uint64_t)t[3]  24) |
+	((uint64_t)t[2]  16) |
+	((uint64_t)t[1]  8) |
+	t[0];
+}
+
+#else /* Fast  Loose */
 /*
  * Macros to extract possibly-unaligned big-endian integral values.
  */
@@ -128,3 +219,4 @@
 		 (u_int64_t)*((const u_int8_t *)(p) + 2)  16 | \
 		 (u_int64_t)*((const u_int8_t *)(p) + 1)  8 | \
 		 (u_int64_t)*((const u_int8_t *)(p) + 0)))
+#endif /* __NetBSD__ */

Index: src/external/bsd/tcpdump/dist/print-isakmp.c
diff -u src/external/bsd/tcpdump/dist/print-isakmp.c:1.2 src/external/bsd/tcpdump/dist/print-isakmp.c:1.3
--- src/external/bsd/tcpdump/dist/print-isakmp.c:1.2	Sun Dec  5 00:11:30 2010
+++ src/external/bsd/tcpdump/dist/print-isakmp.c	Wed Aug 17 06:48:02 2011
@@ -34,7 +34,7 @@
 static const char rcsid[] _U_ =
 @(#) Header: /tcpdump/master/tcpdump/print-isakmp.c,v 1.61 2008-02-05 19:34:25 guy Exp (LBL);
 #else
-__RCSID($NetBSD: print-isakmp.c,v 1.2 2010/12/05 05:11:30 christos Exp $);
+__RCSID($NetBSD: print-isakmp.c,v 1.3 2011/08/17 10:48:02 christos Exp $);
 #endif
 #endif
 
@@ -2229,11 +2229,13 @@
 	u_char np;
 	int i;
 	int phase;
+	uint32_t msgid;
 	
 	p = (const struct isakmp *)bp;
 	ep = ndo-ndo_snapend;
 	
-	phase = (*(u_int32_t *)base-msgid == 0) ? 1 : 2;
+	memcpy(msgid, base-msgid, sizeof(msgid));
+	phase = (msgid == 0) ? 1 : 2;
 	if (phase == 1)
 		ND_PRINT((ndo, phase %d, phase));
 	else
@@ -2400,11 +2402,13 @@
 	const u_char *ep;
 	u_char np;
 	int phase;
+	uint32_t msgid;
 
 	p = (const struct isakmp *)bp;
 	ep = ndo-ndo_snapend;
 
-	phase = (*(u_int32_t *)base-msgid == 0) ? 1 : 2;
+	memcpy(msgid, base-msgid, sizeof(msgid));
+	phase = (msgid == 0) ? 1 : 2;
 	if (phase == 1)
 		

CVS commit: src/external/bsd/tcpdump

2011-08-17 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Aug 17 10:48:02 UTC 2011

Modified Files:
src/external/bsd/tcpdump/bin: Makefile
src/external/bsd/tcpdump/dist: extract.h print-isakmp.c

Log Message:
fix strict aliasing issues.


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/external/bsd/tcpdump/bin/Makefile
cvs rdiff -u -r1.1.1.1 -r1.2 src/external/bsd/tcpdump/dist/extract.h
cvs rdiff -u -r1.2 -r1.3 src/external/bsd/tcpdump/dist/print-isakmp.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/external/bsd/tcpdump/dist

2011-04-17 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sun Apr 17 11:45:40 UTC 2011

Modified Files:
src/external/bsd/tcpdump/dist: tcpdump.c

Log Message:
Hint from dsl: make sure to have the /etc/protocols file already open
before doing a chroot() if run as root. Easily done by a setprotoent(1)
call. This is a better (less intrusive) fix for PR bin/44721.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/external/bsd/tcpdump/dist/tcpdump.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/tcpdump/dist/tcpdump.c
diff -u src/external/bsd/tcpdump/dist/tcpdump.c:1.2 src/external/bsd/tcpdump/dist/tcpdump.c:1.3
--- src/external/bsd/tcpdump/dist/tcpdump.c:1.2	Sun Dec  5 05:11:31 2010
+++ src/external/bsd/tcpdump/dist/tcpdump.c	Sun Apr 17 11:45:40 2011
@@ -34,7 +34,7 @@
 static const char rcsid[] _U_ =
 @(#) Header: /tcpdump/master/tcpdump/tcpdump.c,v 1.283 2008-09-25 21:45:50 guy Exp (LBL);
 #else
-__RCSID($NetBSD: tcpdump.c,v 1.2 2010/12/05 05:11:31 christos Exp $);
+__RCSID($NetBSD: tcpdump.c,v 1.3 2011/04/17 11:45:40 martin Exp $);
 #endif
 #endif
 
@@ -469,6 +469,7 @@
 	pw = getpwnam(username);
 	if (pw) {
 		if (chroot_dir) {
+			setprotoent(1);
 			if (chroot(chroot_dir) != 0 || chdir (/) != 0) {
 fprintf(stderr, tcpdump: Couldn't chroot/chdir to '%.64s': %s\n,
 chroot_dir, pcap_strerror(errno));



CVS commit: src/external/bsd/tcpdump/dist

2011-04-17 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sun Apr 17 11:45:40 UTC 2011

Modified Files:
src/external/bsd/tcpdump/dist: tcpdump.c

Log Message:
Hint from dsl: make sure to have the /etc/protocols file already open
before doing a chroot() if run as root. Easily done by a setprotoent(1)
call. This is a better (less intrusive) fix for PR bin/44721.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/external/bsd/tcpdump/dist/tcpdump.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/external/bsd/tcpdump/include

2011-01-29 Thread Jonathan A. Kollasch
Module Name:src
Committed By:   jakllsch
Date:   Sat Jan 29 23:19:54 UTC 2011

Modified Files:
src/external/bsd/tcpdump/include: config.h

Log Message:
Re-add LBL_ALIGN define we used to have pre-src/external.
Fixes a tcpdump SIGBUS on ARM.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/external/bsd/tcpdump/include/config.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/tcpdump/include/config.h
diff -u src/external/bsd/tcpdump/include/config.h:1.2 src/external/bsd/tcpdump/include/config.h:1.3
--- src/external/bsd/tcpdump/include/config.h:1.2	Sun Dec  5 05:13:45 2010
+++ src/external/bsd/tcpdump/include/config.h	Sat Jan 29 23:19:54 2011
@@ -257,7 +257,7 @@
 #define HAVE___ATTRIBUTE__ 1
 
 /* if unaligned access fails */
-/* #undef LBL_ALIGN */
+#define LBL_ALIGN 1
 
 /* Define to 1 if netinet/ether.h declares `ether_ntohost' */
 /* #undef NETINET_ETHER_H_DECLARES_ETHER_NTOHOST */



CVS commit: src/external/bsd/tcpdump/include

2011-01-29 Thread Jonathan A. Kollasch
Module Name:src
Committed By:   jakllsch
Date:   Sat Jan 29 23:19:54 UTC 2011

Modified Files:
src/external/bsd/tcpdump/include: config.h

Log Message:
Re-add LBL_ALIGN define we used to have pre-src/external.
Fixes a tcpdump SIGBUS on ARM.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/external/bsd/tcpdump/include/config.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/external/bsd/tcpdump/dist

2010-12-17 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Fri Dec 17 10:35:10 UTC 2010

Modified Files:
src/external/bsd/tcpdump/dist: tcpdump.1.in

Log Message:
Bump date for chroot default.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/external/bsd/tcpdump/dist/tcpdump.1.in

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/tcpdump/dist/tcpdump.1.in
diff -u src/external/bsd/tcpdump/dist/tcpdump.1.in:1.3 src/external/bsd/tcpdump/dist/tcpdump.1.in:1.4
--- src/external/bsd/tcpdump/dist/tcpdump.1.in:1.3	Fri Dec 17 09:54:28 2010
+++ src/external/bsd/tcpdump/dist/tcpdump.1.in	Fri Dec 17 10:35:10 2010
@@ -1,6 +1,6 @@
 .\ @(#) Header: /tcpdump/master/tcpdump/tcpdump.1.in,v 1.2 2008-11-09 23:35:03 mcr Exp (LBL)
 .\
-.\	$NetBSD: tcpdump.1.in,v 1.3 2010/12/17 09:54:28 jruoho Exp $
+.\	$NetBSD: tcpdump.1.in,v 1.4 2010/12/17 10:35:10 wiz Exp $
 .\
 .\ Copyright (c) 1987, 1988, 1989, 1990, 1991, 1992, 1994, 1995, 1996, 1997
 .\	The Regents of the University of California.  All rights reserved.
@@ -22,7 +22,7 @@
 .\ WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
 .\ MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
 .\
-.TH TCPDUMP 8  5 December 2010
+.TH TCPDUMP 8  17 December 2010
 .SH NAME
 tcpdump \- dump traffic on a network
 .SH SYNOPSIS



CVS commit: src/external/bsd/tcpdump/include

2010-12-04 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Dec  5 03:06:08 UTC 2010

Added Files:
src/external/bsd/tcpdump/include: config.h

Log Message:
add configure file.


To generate a diff of this commit:
cvs rdiff -u -r0 -r1.1 src/external/bsd/tcpdump/include/config.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Added files:

Index: src/external/bsd/tcpdump/include/config.h
diff -u /dev/null src/external/bsd/tcpdump/include/config.h:1.1
--- /dev/null	Sat Dec  4 22:06:08 2010
+++ src/external/bsd/tcpdump/include/config.h	Sat Dec  4 22:06:08 2010
@@ -0,0 +1,342 @@
+/* config.h.  Generated from config.h.in by configure.  */
+/* config.h.in.  Generated from configure.in by autoheader.  */
+/* generated automatically means DO NOT MAKE CHANGES TO config.h.in --
+ * make them to acconfig.h and rerun autoheader */
+
+#ifdef notdef
+/* From the Makefile */
+/* Define if you enable IPv6 support */
+#define INET6 1
+#endif
+
+/* Define if you enable support for the libsmi. */
+/* #undef LIBSMI */
+
+/* define if you have struct __res_state_ext */
+/* #undef HAVE_RES_STATE_EXT */
+
+/* define if your struct __res_state has the nsort member */
+#define HAVE_NEW_RES_STATE 1
+
+/* define if you have the addrinfo function. */
+#define HAVE_ADDRINFO 1
+
+/* define if you need to include missing/addrinfoh.h. */
+/* #undef NEED_ADDRINFO_H */
+
+/* define ifyou have the h_errno variable. */
+#define HAVE_H_ERRNO 1
+
+/* define if IN6ADDRSZ is defined (XXX not used!) */
+#define HAVE_IN6ADDRSZ 1
+
+/* define if INADDRSZ is defined (XXX not used!) */
+#define HAVE_INADDRSZ 1
+
+/* define if RES_USE_INET6 is defined */
+#define HAVE_RES_USE_INET6 1
+
+/* define if you have struct sockaddr_storage */
+#define HAVE_SOCKADDR_STORAGE 1
+
+/* define if you have both getipnodebyname() and getipnodebyaddr() */
+/* #undef USE_GETIPNODEBY */
+
+/* define if you have ether_ntohost() and it works */
+#define USE_ETHER_NTOHOST 1
+
+/* define if libpcap has pcap_version */
+/* #undef HAVE_PCAP_VERSION */
+
+/* define if libpcap has pcap_debug */
+#define HAVE_PCAP_DEBUG 1
+
+/* define if libpcap has yydebug */
+/* #undef HAVE_YYDEBUG */
+
+/* define if libpcap has pcap_list_datalinks() */
+#define HAVE_PCAP_LIST_DATALINKS 1
+
+/* define if libpcap has pcap_set_datalink() */
+#define HAVE_PCAP_SET_DATALINK 1
+
+/* define if libpcap has pcap_datalink_name_to_val() */
+#define HAVE_PCAP_DATALINK_NAME_TO_VAL 1
+
+/* define if libpcap has pcap_datalink_val_to_description() */
+#define HAVE_PCAP_DATALINK_VAL_TO_DESCRIPTION 1
+
+/* define if libpcap has pcap_dump_ftell() */
+#define HAVE_PCAP_DUMP_FTELL 1
+
+/* define if you have getrpcbynumber() */
+#define HAVE_GETRPCBYNUMBER 1
+
+/* AIX hack. */
+/* #undef _SUN */
+
+/* Workaround for missing 64-bit formats */
+/* #undef PRId64 */
+/* #undef PRIo64 */
+/* #undef PRIx64 */
+/* #undef PRIu64 */
+
+/* Whether or not to include the possibly-buggy SMB printer */
+#define TCPDUMP_DO_SMB 1
+
+/* Define if you have the dnet_htoa function.  */
+/* #undef HAVE_DNET_HTOA */
+
+/* Define if you have a dnet_htoa declaration in netdnet/dnetdb.h.  */
+/* #undef HAVE_NETDNET_DNETDB_H_DNET_HTOA */
+
+/* define if should drop privileges by default */
+/* #undef WITH_USER */
+
+/* define if should chroot when dropping privileges */
+/* #undef WITH_CHROOT */
+
+/* Define to 1 if you have the `alarm' function. */
+#define HAVE_ALARM 1
+
+/* Define to 1 if you have the `bpf_dump' function. */
+#define HAVE_BPF_DUMP 1
+
+/* Define to 1 if you have the declaration of `ether_ntohost', and to 0 if you
+   don't. */
+#define HAVE_DECL_ETHER_NTOHOST 1
+
+/* Define to 1 if you have the `ether_ntohost' function. */
+#define HAVE_ETHER_NTOHOST 1
+
+/* Define to 1 if you have the fcntl.h header file. */
+#define HAVE_FCNTL_H 1
+
+/* Define to 1 if you have the `getnameinfo' function. */
+#define HAVE_GETNAMEINFO 1
+
+/* Define to 1 if you have the inttypes.h header file. */
+#define HAVE_INTTYPES_H 1
+
+/* Define to 1 if you have the `crypto' library (-lcrypto). */
+#define HAVE_LIBCRYPTO 1
+
+/* Define to 1 if you have the `rpc' library (-lrpc). */
+/* #undef HAVE_LIBRPC */
+
+/* Define to 1 if you have the `smi' library (-lsmi). */
+/* #undef HAVE_LIBSMI */
+
+/* Define to 1 if you have the memory.h header file. */
+#define HAVE_MEMORY_H 1
+
+/* Define to 1 if you have the netdnet/dnetdb.h header file. */
+/* #undef HAVE_NETDNET_DNETDB_H */
+
+/* Define to 1 if you have the netinet/ether.h header file. */
+/* #undef HAVE_NETINET_ETHER_H */
+
+/* Define to 1 if you have the netinet/if_ether.h header file. */
+#define HAVE_NETINET_IF_ETHER_H 1
+
+/* Define to 1 if you have the net/pfvar.h header file. */
+#define HAVE_NET_PFVAR_H 1
+
+/* Define to 1 if you have the openssl/evp.h header file. */
+#define HAVE_OPENSSL_EVP_H 1
+
+/* if there's an os_proto.h for this platform, to use additional prototypes */
+/* #undef HAVE_OS_PROTO_H */
+

CVS commit: src/external/bsd/tcpdump/dist

2010-12-04 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Dec  5 03:16:16 UTC 2010

Update of /cvsroot/src/external/bsd/tcpdump/dist
In directory ivanova.netbsd.org:/tmp/cvs-serv7190

Log Message:
Import tcpdump-4.1.1

Status:

Vendor Tag: TCPDUMP
Release Tags:   tcpdump-4_1_1

N src/external/bsd/tcpdump/dist/INSTALL.txt
N src/external/bsd/tcpdump/dist/CHANGES
N src/external/bsd/tcpdump/dist/CREDITS
N src/external/bsd/tcpdump/dist/Makefile.in
N src/external/bsd/tcpdump/dist/LICENSE
N src/external/bsd/tcpdump/dist/aodv.h
N src/external/bsd/tcpdump/dist/af.c
N src/external/bsd/tcpdump/dist/Makefile-devel-adds
N src/external/bsd/tcpdump/dist/README
N src/external/bsd/tcpdump/dist/Readme.Win32
N src/external/bsd/tcpdump/dist/VERSION
N src/external/bsd/tcpdump/dist/acconfig.h
N src/external/bsd/tcpdump/dist/aclocal.m4
N src/external/bsd/tcpdump/dist/addrtoname.c
N src/external/bsd/tcpdump/dist/addrtoname.h
N src/external/bsd/tcpdump/dist/af.h
N src/external/bsd/tcpdump/dist/ah.h
N src/external/bsd/tcpdump/dist/bootp.h
N src/external/bsd/tcpdump/dist/appletalk.h
N src/external/bsd/tcpdump/dist/arcnet.h
N src/external/bsd/tcpdump/dist/atime.awk
N src/external/bsd/tcpdump/dist/atm.h
N src/external/bsd/tcpdump/dist/atmuni31.h
N src/external/bsd/tcpdump/dist/bgp.h
N src/external/bsd/tcpdump/dist/ip6.h
N src/external/bsd/tcpdump/dist/ip.h
N src/external/bsd/tcpdump/dist/bpf_dump.c
N src/external/bsd/tcpdump/dist/chdlc.h
N src/external/bsd/tcpdump/dist/checksum.c
N src/external/bsd/tcpdump/dist/config.guess
N src/external/bsd/tcpdump/dist/config.h.in
N src/external/bsd/tcpdump/dist/config.sub
N src/external/bsd/tcpdump/dist/configure
N src/external/bsd/tcpdump/dist/configure.in
N src/external/bsd/tcpdump/dist/cpack.c
N src/external/bsd/tcpdump/dist/cpack.h
N src/external/bsd/tcpdump/dist/dccp.h
N src/external/bsd/tcpdump/dist/decnet.h
N src/external/bsd/tcpdump/dist/decode_prefix.h
N src/external/bsd/tcpdump/dist/enc.h
N src/external/bsd/tcpdump/dist/esp.h
N src/external/bsd/tcpdump/dist/ether.h
N src/external/bsd/tcpdump/dist/ethertype.h
N src/external/bsd/tcpdump/dist/extract.h
N src/external/bsd/tcpdump/dist/fddi.h
N src/external/bsd/tcpdump/dist/forces.h
N src/external/bsd/tcpdump/dist/gmpls.c
N src/external/bsd/tcpdump/dist/gmpls.h
N src/external/bsd/tcpdump/dist/gmt2local.c
N src/external/bsd/tcpdump/dist/gmt2local.h
N src/external/bsd/tcpdump/dist/icmp6.h
N src/external/bsd/tcpdump/dist/ieee802_11.h
N src/external/bsd/tcpdump/dist/igrp.h
N src/external/bsd/tcpdump/dist/ieee802_11_radio.h
N src/external/bsd/tcpdump/dist/install-sh
N src/external/bsd/tcpdump/dist/interface.h
N src/external/bsd/tcpdump/dist/ipproto.c
N src/external/bsd/tcpdump/dist/ipfc.h
N src/external/bsd/tcpdump/dist/ipnet.h
N src/external/bsd/tcpdump/dist/llc.h
N src/external/bsd/tcpdump/dist/ipproto.h
N src/external/bsd/tcpdump/dist/ipsec_doi.h
N src/external/bsd/tcpdump/dist/ipx.h
N src/external/bsd/tcpdump/dist/isakmp.h
N src/external/bsd/tcpdump/dist/l2tp.h
N src/external/bsd/tcpdump/dist/l2vpn.c
N src/external/bsd/tcpdump/dist/l2vpn.h
N src/external/bsd/tcpdump/dist/lane.h
N src/external/bsd/tcpdump/dist/machdep.c
N src/external/bsd/tcpdump/dist/machdep.h
N src/external/bsd/tcpdump/dist/makemib
N src/external/bsd/tcpdump/dist/mib.h
N src/external/bsd/tcpdump/dist/nameser.h
N src/external/bsd/tcpdump/dist/mkdep
N src/external/bsd/tcpdump/dist/mpls.h
N src/external/bsd/tcpdump/dist/packetdat.awk
N src/external/bsd/tcpdump/dist/netbios.h
N src/external/bsd/tcpdump/dist/netdissect.h
N src/external/bsd/tcpdump/dist/nfs.h
N src/external/bsd/tcpdump/dist/nfsfh.h
N src/external/bsd/tcpdump/dist/nlpid.c
N src/external/bsd/tcpdump/dist/nlpid.h
N src/external/bsd/tcpdump/dist/ntp.h
N src/external/bsd/tcpdump/dist/oakley.h
N src/external/bsd/tcpdump/dist/ospf.h
N src/external/bsd/tcpdump/dist/ospf6.h
N src/external/bsd/tcpdump/dist/oui.c
N src/external/bsd/tcpdump/dist/oui.h
N src/external/bsd/tcpdump/dist/pcap-missing.h
N src/external/bsd/tcpdump/dist/parsenfsfh.c
N src/external/bsd/tcpdump/dist/print-lspping.c
N src/external/bsd/tcpdump/dist/pcap_dump_ftell.c
N src/external/bsd/tcpdump/dist/pmap_prot.h
N src/external/bsd/tcpdump/dist/ppp.h
N src/external/bsd/tcpdump/dist/print-802_11.c
N src/external/bsd/tcpdump/dist/print-ah.c
N src/external/bsd/tcpdump/dist/print-aodv.c
N src/external/bsd/tcpdump/dist/print-ap1394.c
N src/external/bsd/tcpdump/dist/print-arcnet.c
N src/external/bsd/tcpdump/dist/print-arp.c
N src/external/bsd/tcpdump/dist/print-ascii.c
N src/external/bsd/tcpdump/dist/print-atalk.c
N src/external/bsd/tcpdump/dist/print-atm.c
N src/external/bsd/tcpdump/dist/print-ldp.c
N src/external/bsd/tcpdump/dist/print-beep.c
N src/external/bsd/tcpdump/dist/print-bfd.c
N src/external/bsd/tcpdump/dist/print-bgp.c
N src/external/bsd/tcpdump/dist/print-bootp.c
N src/external/bsd/tcpdump/dist/print-bt.c
N src/external/bsd/tcpdump/dist/print-cdp.c
N src/external/bsd/tcpdump/dist/print-cfm.c
N 

CVS commit: src/external/bsd/tcpdump/include

2010-12-04 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Dec  5 05:13:46 UTC 2010

Modified Files:
src/external/bsd/tcpdump/include: config.h

Log Message:
Makefile overrides


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/external/bsd/tcpdump/include/config.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/tcpdump/include/config.h
diff -u src/external/bsd/tcpdump/include/config.h:1.1 src/external/bsd/tcpdump/include/config.h:1.2
--- src/external/bsd/tcpdump/include/config.h:1.1	Sat Dec  4 22:06:08 2010
+++ src/external/bsd/tcpdump/include/config.h	Sun Dec  5 00:13:45 2010
@@ -33,8 +33,11 @@
 /* define if INADDRSZ is defined (XXX not used!) */
 #define HAVE_INADDRSZ 1
 
+#ifdef notdef
+/* From the Makefile */
 /* define if RES_USE_INET6 is defined */
 #define HAVE_RES_USE_INET6 1
+#endif
 
 /* define if you have struct sockaddr_storage */
 #define HAVE_SOCKADDR_STORAGE 1
@@ -118,8 +121,11 @@
 /* Define to 1 if you have the inttypes.h header file. */
 #define HAVE_INTTYPES_H 1
 
+#ifdef notdef
+/* From the Makefile */
 /* Define to 1 if you have the `crypto' library (-lcrypto). */
 #define HAVE_LIBCRYPTO 1
+#endif
 
 /* Define to 1 if you have the `rpc' library (-lrpc). */
 /* #undef HAVE_LIBRPC */



CVS commit: src/external/bsd/tcpdump

2010-12-04 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Dec  5 05:14:01 UTC 2010

Added Files:
src/external/bsd/tcpdump: Makefile
src/external/bsd/tcpdump/bin: Makefile
src/external/bsd/tcpdump/dist: tcpdump2netbsd

Log Message:
build and import glue.


To generate a diff of this commit:
cvs rdiff -u -r0 -r1.1 src/external/bsd/tcpdump/Makefile
cvs rdiff -u -r0 -r1.1 src/external/bsd/tcpdump/bin/Makefile
cvs rdiff -u -r0 -r1.1 src/external/bsd/tcpdump/dist/tcpdump2netbsd

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Added files:

Index: src/external/bsd/tcpdump/Makefile
diff -u /dev/null src/external/bsd/tcpdump/Makefile:1.1
--- /dev/null	Sun Dec  5 00:14:01 2010
+++ src/external/bsd/tcpdump/Makefile	Sun Dec  5 00:14:00 2010
@@ -0,0 +1,5 @@
+#	$NetBSD: Makefile,v 1.1 2010/12/05 05:14:00 christos Exp $
+
+SUBDIR=	bin lib
+
+.include bsd.subdir.mk

Index: src/external/bsd/tcpdump/bin/Makefile
diff -u /dev/null src/external/bsd/tcpdump/bin/Makefile:1.1
--- /dev/null	Sun Dec  5 00:14:01 2010
+++ src/external/bsd/tcpdump/bin/Makefile	Sun Dec  5 00:14:00 2010
@@ -0,0 +1,92 @@
+#	$NetBSD: Makefile,v 1.1 2010/12/05 05:14:00 christos Exp $	
+
+WARNS?=	1	# XXX: need to cleanup later
+
+.include bsd.own.mk
+
+USE_FORT?= yes	# network client
+
+SRCDIR=	${.CURDIR}/../dist
+.PATH:	${SRCDIR}
+
+PROG=	tcpdump
+MAN=	tcpdump.8 
+
+SRCS=	addrtoname.c cpack.c gmpls.c gmt2local.c machdep.c oui.c parsenfsfh.c \
+		pf_print_state.c \
+	print-802_11.c print-ah.c print-aodv.c print-ap1394.c print-arcnet.c \
+	print-arp.c \
+	print-ascii.c print-atalk.c print-atm.c print-bfd.c print-bgp.c \
+	print-bootp.c print-beep.c print-cdp.c print-chdlc.c \
+	print-cip.c print-cnfp.c print-decnet.c print-domain.c \
+	print-dvmrp.c print-egp.c print-enc.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-ipx.c print-isakmp.c print-isoclns.c print-krb.c \
+	print-l2tp.c print-lane.c print-ldp.c print-llc.c print-lwres.c \
+	print-msdp.c print-mobile.c print-mobility.c print-mpls.c print-nfs.c \
+	print-ntp.c print-null.c print-ospf.c print-pflog.c print-pfsync.c \
+	print-pim.c print-ppp.c print-pppoe.c print-pptp.c \
+	print-radius.c print-raw.c print-rip.c print-rsvp.c print-rx.c \
+	print-sctp.c print-sl.c print-sll.c print-smb.c print-snmp.c \
+	print-stp.c print-sunatm.c print-sunrpc.c print-tcp.c \
+	print-telnet.c print-tftp.c print-timed.c print-token.c \
+	print-udp.c print-vjc.c print-vrrp.c print-wb.c print-zephyr.c \
+	setsignal.c smbutil.c tcpdump.c util.c checksum.c signature.c
+SRCS+=	print-eigrp.c l2vpn.c print-slow.c print-eap.c nlpid.c print-dccp.c \
+	print-pgm.c ipproto.c print-syslog.c print-sip.c print-lmp.c \
+	print-lspping.c print-symantec.c print-juniper.c af.c print-olsr.c \
+	print-sflow.c print-vqp.c print-lwapp.c print-ipnet.c print-forces.c \
+	print-vtp.c print-udld.c print-dtp.c print-rrcp.c print-mpcp.c \
+	print-lldp.c print-cfm.c
+
+
+SRCS+=	bpf_dump.c
+
+SRCS+=	version.c
+
+# disabled for now
+#SRCS+=	print-smb.c smbutil.c
+
+version.c: VERSION
+	${_MKTARGET_CREATE}
+	${TOOL_SED} -e 's/.*/char version[] = ;/' ${.ALLSRC}  ${.TARGET}
+
+LDADD+=	-lpcap -ll
+DPADD+=	${LIBPCAP} ${LIBL}
+
+CPPFLAGS+=	-I${.CURDIR}/../include -I${.CURDIR} -I${SRCDIR}
+CPPFLAGS+=  -I${NETBSDSRCDIR}/dist/pf/sbin/pfctl \
+	-I${NETBSDSRCDIR}/sys/dist/pf
+
+AWKS= atime.awk packetdat.awk stime.awk send-ack.awk   
+
+CPPFLAGS+=-DHAVE_CONFIG_H -D_U_=__attribute__((__unused__))
+
+.if (${USE_INET6} != no)
+SRCS+=	print-ip6.c print-ip6opts.c print-ripng.c print-icmp6.c print-frag6.c \
+	print-rt6.c print-ospf6.c print-dhcp6.c
+
+CPPFLAGS+=-DINET6=1 -DHAVE_RES_USE_INET6=1 
+.endif
+
+.if (${MKCRYPTO} != no)
+CPPFLAGS+=-DHAVE_LIBCRYPTO=1 
+LDADD+=	-lcrypto -lcrypt
+DPADD+=	${LIBCRYPTO} ${LIBCRYPT}
+.endif
+
+#.if (defined(HAVE_GCC)  ${HAVE_GCC} == 4) || defined(HAVE_PCC)
+#COPTS+=	-fno-strict-aliasing
+#.for f in print-802_11 print-esp print-fr print-radius print-telnet tcpdump util
+#COPTS.${f}.c+=  -Wno-pointer-sign
+#.endfor
+#.endif
+
+CLEANFILES+=	version.c tcpdump.8
+
+tcpdump.8: tcpdump.1.in
+	@rm -f ${.TARGET}
+	cp ${.ALLSRC} ${.TARGET}
+
+.include bsd.prog.mk

Index: src/external/bsd/tcpdump/dist/tcpdump2netbsd
diff -u /dev/null src/external/bsd/tcpdump/dist/tcpdump2netbsd:1.1
--- /dev/null	Sun Dec  5 00:14:01 2010
+++ src/external/bsd/tcpdump/dist/tcpdump2netbsd	Sun Dec  5 00:14:00 2010
@@ -0,0 +1,102 @@
+#! /bin/sh
+#
+#	$NetBSD: tcpdump2netbsd,v 1.1 2010/12/05 05:14:00 christos Exp $
+#
+# Copyright (c) 2000 The NetBSD Foundation, Inc.
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+# 1. Redistributions of source code must retain the above copyright
+#notice, this list of conditions 

CVS commit: src/external/bsd/tcpdump/bin

2010-12-04 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Dec  5 05:24:04 UTC 2010

Modified Files:
src/external/bsd/tcpdump/bin: Makefile

Log Message:
cleanup old stuff and install in the right place


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/external/bsd/tcpdump/bin/Makefile

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/tcpdump/bin/Makefile
diff -u src/external/bsd/tcpdump/bin/Makefile:1.1 src/external/bsd/tcpdump/bin/Makefile:1.2
--- src/external/bsd/tcpdump/bin/Makefile:1.1	Sun Dec  5 00:14:00 2010
+++ src/external/bsd/tcpdump/bin/Makefile	Sun Dec  5 00:24:03 2010
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.1 2010/12/05 05:14:00 christos Exp $	
+#	$NetBSD: Makefile,v 1.2 2010/12/05 05:24:03 christos Exp $	
 
 WARNS?=	1	# XXX: need to cleanup later
 
@@ -6,6 +6,7 @@
 
 USE_FORT?= yes	# network client
 
+BINDIR=/usr/bin
 SRCDIR=	${.CURDIR}/../dist
 .PATH:	${SRCDIR}
 
@@ -76,13 +77,6 @@
 DPADD+=	${LIBCRYPTO} ${LIBCRYPT}
 .endif
 
-#.if (defined(HAVE_GCC)  ${HAVE_GCC} == 4) || defined(HAVE_PCC)
-#COPTS+=	-fno-strict-aliasing
-#.for f in print-802_11 print-esp print-fr print-radius print-telnet tcpdump util
-#COPTS.${f}.c+=  -Wno-pointer-sign
-#.endfor
-#.endif
-
 CLEANFILES+=	version.c tcpdump.8
 
 tcpdump.8: tcpdump.1.in



CVS commit: src/external/bsd/tcpdump

2010-12-04 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Dec  5 05:24:22 UTC 2010

Modified Files:
src/external/bsd/tcpdump: Makefile

Log Message:
we only have bin


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/external/bsd/tcpdump/Makefile

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/tcpdump/Makefile
diff -u src/external/bsd/tcpdump/Makefile:1.1 src/external/bsd/tcpdump/Makefile:1.2
--- src/external/bsd/tcpdump/Makefile:1.1	Sun Dec  5 00:14:00 2010
+++ src/external/bsd/tcpdump/Makefile	Sun Dec  5 00:24:21 2010
@@ -1,5 +1,5 @@
-#	$NetBSD: Makefile,v 1.1 2010/12/05 05:14:00 christos Exp $
+#	$NetBSD: Makefile,v 1.2 2010/12/05 05:24:21 christos Exp $
 
-SUBDIR=	bin lib
+SUBDIR=	bin
 
 .include bsd.subdir.mk



CVS commit: src/external/bsd/tcpdump/bin

2010-12-04 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Dec  5 05:52:46 UTC 2010

Modified Files:
src/external/bsd/tcpdump/bin: Makefile

Log Message:
tcpdump goes to /usr/sbin


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/external/bsd/tcpdump/bin/Makefile

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/tcpdump/bin/Makefile
diff -u src/external/bsd/tcpdump/bin/Makefile:1.2 src/external/bsd/tcpdump/bin/Makefile:1.3
--- src/external/bsd/tcpdump/bin/Makefile:1.2	Sun Dec  5 00:24:03 2010
+++ src/external/bsd/tcpdump/bin/Makefile	Sun Dec  5 00:52:46 2010
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.2 2010/12/05 05:24:03 christos Exp $	
+#	$NetBSD: Makefile,v 1.3 2010/12/05 05:52:46 christos Exp $	
 
 WARNS?=	1	# XXX: need to cleanup later
 
@@ -6,7 +6,7 @@
 
 USE_FORT?= yes	# network client
 
-BINDIR=/usr/bin
+BINDIR=/usr/sbin
 SRCDIR=	${.CURDIR}/../dist
 .PATH:	${SRCDIR}
 



CVS commit: src/external/bsd/tcpdump/include

2010-12-04 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Dec  5 03:06:08 UTC 2010

Added Files:
src/external/bsd/tcpdump/include: config.h

Log Message:
add configure file.


To generate a diff of this commit:
cvs rdiff -u -r0 -r1.1 src/external/bsd/tcpdump/include/config.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/external/bsd/tcpdump/dist

2010-12-04 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Dec  5 05:11:31 UTC 2010

Modified Files:
src/external/bsd/tcpdump/dist: addrtoname.c af.c ah.h atime.awk
bpf_dump.c checksum.c configure configure.in cpack.c cpack.h esp.h
ether.h gmpls.c gmt2local.c icmp6.h ieee802_11_radio.h interface.h
ip.h ip6.h ipproto.c ipproto.h l2vpn.c machdep.c nameser.h nfs.h
nlpid.c oui.c parsenfsfh.c pcap_dump_ftell.c print-802_11.c
print-ah.c print-aodv.c print-ap1394.c print-arcnet.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-dhcp6.c print-domain.c print-dvmrp.c print-eap.c print-egp.c
print-eigrp.c print-enc.c print-esp.c print-ether.c print-fddi.c
print-fr.c print-frag6.c print-gre.c print-hsrp.c print-icmp.c
print-icmp6.c print-igmp.c print-igrp.c print-ip.c print-ip6.c
print-ip6opts.c print-ipcomp.c print-ipfc.c print-ipx.c
print-isakmp.c print-isoclns.c print-juniper.c print-krb.c
print-l2tp.c print-lane.c print-ldp.c print-llc.c print-lldp.c
print-lmp.c print-lspping.c print-lwapp.c print-lwres.c
print-mobile.c print-mobility.c print-mpcp.c print-mpls.c
print-msdp.c print-netbios.c print-nfs.c print-ntp.c print-null.c
print-ospf.c print-ospf6.c print-pflog.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-ripng.c print-rrcp.c print-rsvp.c print-rt6.c
print-rx.c print-sctp.c print-sflow.c print-sip.c print-sl.c
print-sll.c print-slow.c print-smb.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-udp.c print-vjc.c print-vqp.c print-vrrp.c print-wb.c
print-zephyr.c setsignal.c signature.c sll.h smbutil.c strcasecmp.c
tcp.h tcpdump.1.in tcpdump.c telnet.h timed.h udp.h util.c
vfprintf.c
Added Files:
src/external/bsd/tcpdump/dist: pf.h pf_print_state.c print-pfsync.c

Log Message:
apply our changes and add the pfsync stuff.


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.1 -r1.2 src/external/bsd/tcpdump/dist/addrtoname.c \
src/external/bsd/tcpdump/dist/af.c src/external/bsd/tcpdump/dist/ah.h \
src/external/bsd/tcpdump/dist/atime.awk \
src/external/bsd/tcpdump/dist/bpf_dump.c \
src/external/bsd/tcpdump/dist/checksum.c \
src/external/bsd/tcpdump/dist/configure \
src/external/bsd/tcpdump/dist/configure.in \
src/external/bsd/tcpdump/dist/cpack.c \
src/external/bsd/tcpdump/dist/cpack.h src/external/bsd/tcpdump/dist/esp.h \
src/external/bsd/tcpdump/dist/ether.h \
src/external/bsd/tcpdump/dist/gmpls.c \
src/external/bsd/tcpdump/dist/gmt2local.c \
src/external/bsd/tcpdump/dist/icmp6.h \
src/external/bsd/tcpdump/dist/ieee802_11_radio.h \
src/external/bsd/tcpdump/dist/interface.h \
src/external/bsd/tcpdump/dist/ip.h src/external/bsd/tcpdump/dist/ip6.h \
src/external/bsd/tcpdump/dist/ipproto.c \
src/external/bsd/tcpdump/dist/ipproto.h \
src/external/bsd/tcpdump/dist/l2vpn.c \
src/external/bsd/tcpdump/dist/machdep.c \
src/external/bsd/tcpdump/dist/nameser.h \
src/external/bsd/tcpdump/dist/nfs.h src/external/bsd/tcpdump/dist/nlpid.c \
src/external/bsd/tcpdump/dist/oui.c \
src/external/bsd/tcpdump/dist/parsenfsfh.c \
src/external/bsd/tcpdump/dist/pcap_dump_ftell.c \
src/external/bsd/tcpdump/dist/print-802_11.c \
src/external/bsd/tcpdump/dist/print-ah.c \
src/external/bsd/tcpdump/dist/print-aodv.c \
src/external/bsd/tcpdump/dist/print-ap1394.c \
src/external/bsd/tcpdump/dist/print-arcnet.c \
src/external/bsd/tcpdump/dist/print-arp.c \
src/external/bsd/tcpdump/dist/print-ascii.c \
src/external/bsd/tcpdump/dist/print-atalk.c \
src/external/bsd/tcpdump/dist/print-atm.c \
src/external/bsd/tcpdump/dist/print-beep.c \
src/external/bsd/tcpdump/dist/print-bfd.c \
src/external/bsd/tcpdump/dist/print-bgp.c \
src/external/bsd/tcpdump/dist/print-bootp.c \
src/external/bsd/tcpdump/dist/print-bt.c \
src/external/bsd/tcpdump/dist/print-cdp.c \
src/external/bsd/tcpdump/dist/print-cfm.c \
src/external/bsd/tcpdump/dist/print-chdlc.c \
src/external/bsd/tcpdump/dist/print-cip.c \
src/external/bsd/tcpdump/dist/print-cnfp.c \
src/external/bsd/tcpdump/dist/print-dccp.c \
src/external/bsd/tcpdump/dist/print-decnet.c \
src/external/bsd/tcpdump/dist/print-dhcp6.c \
src/external/bsd/tcpdump/dist/print-domain.c \
src/external/bsd/tcpdump/dist/print-dvmrp.c \

  1   2   >