diff options
-rw-r--r-- | usr.sbin/tcpdump/addrtoname.c | 4 | ||||
-rw-r--r-- | usr.sbin/tcpdump/machdep.c | 6 | ||||
-rw-r--r-- | usr.sbin/tcpdump/ospf.h | 1 | ||||
-rw-r--r-- | usr.sbin/tcpdump/print-arp.c | 4 | ||||
-rw-r--r-- | usr.sbin/tcpdump/print-atalk.c | 4 | ||||
-rw-r--r-- | usr.sbin/tcpdump/print-atm.c | 6 | ||||
-rw-r--r-- | usr.sbin/tcpdump/print-bootp.c | 4 | ||||
-rw-r--r-- | usr.sbin/tcpdump/print-decnet.c | 4 | ||||
-rw-r--r-- | usr.sbin/tcpdump/print-domain.c | 27 | ||||
-rw-r--r-- | usr.sbin/tcpdump/print-fddi.c | 4 | ||||
-rw-r--r-- | usr.sbin/tcpdump/print-igrp.c | 7 | ||||
-rw-r--r-- | usr.sbin/tcpdump/print-ip.c | 4 | ||||
-rw-r--r-- | usr.sbin/tcpdump/print-llc.c | 4 | ||||
-rw-r--r-- | usr.sbin/tcpdump/print-ntp.c | 4 | ||||
-rw-r--r-- | usr.sbin/tcpdump/print-null.c | 12 | ||||
-rw-r--r-- | usr.sbin/tcpdump/print-sl.c | 54 | ||||
-rw-r--r-- | usr.sbin/tcpdump/print-snmp.c | 8 | ||||
-rw-r--r-- | usr.sbin/tcpdump/print-tftp.c | 7 | ||||
-rw-r--r-- | usr.sbin/tcpdump/print-udp.c | 9 | ||||
-rw-r--r-- | usr.sbin/tcpdump/tcpdump.c | 9 | ||||
-rw-r--r-- | usr.sbin/tcpdump/util.c | 4 |
21 files changed, 122 insertions, 64 deletions
diff --git a/usr.sbin/tcpdump/addrtoname.c b/usr.sbin/tcpdump/addrtoname.c index 360eab320fa..01b995ef252 100644 --- a/usr.sbin/tcpdump/addrtoname.c +++ b/usr.sbin/tcpdump/addrtoname.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 1990, 1991, 1992, 1993, 1994, 1995, 1996 + * 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 @@ -23,7 +23,7 @@ */ #ifndef lint static const char rcsid[] = - "@(#) $Header: /cvs/OpenBSD/src/usr.sbin/tcpdump/addrtoname.c,v 1.7 1999/07/28 20:41:35 jakob Exp $ (LBL)"; + "@(#) $Header: /cvs/OpenBSD/src/usr.sbin/tcpdump/addrtoname.c,v 1.8 1999/09/16 20:58:44 brad Exp $ (LBL)"; #endif #include <sys/types.h> diff --git a/usr.sbin/tcpdump/machdep.c b/usr.sbin/tcpdump/machdep.c index 59e6dd44e56..3e63de74500 100644 --- a/usr.sbin/tcpdump/machdep.c +++ b/usr.sbin/tcpdump/machdep.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 1996 + * Copyright (c) 1996, 1997 * The Regents of the University of California. All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -21,7 +21,7 @@ #ifndef lint static const char rcsid[] = - "@(#) $Header: /cvs/OpenBSD/src/usr.sbin/tcpdump/machdep.c,v 1.2 1999/07/28 20:41:35 jakob Exp $ (LBL)"; + "@(#) $Header: /cvs/OpenBSD/src/usr.sbin/tcpdump/machdep.c,v 1.3 1999/09/16 20:58:45 brad Exp $ (LBL)"; #endif #include <sys/types.h> @@ -30,8 +30,6 @@ static const char rcsid[] = #include <sys/proc.h> #endif -#include <pcap.h> - #include "machdep.h" int diff --git a/usr.sbin/tcpdump/ospf.h b/usr.sbin/tcpdump/ospf.h index b6d0ed944b2..eee79441fb3 100644 --- a/usr.sbin/tcpdump/ospf.h +++ b/usr.sbin/tcpdump/ospf.h @@ -39,6 +39,7 @@ #define OSPF_AUTH_MD5 2 /* MD5 authentication */ #define OSPF_AUTH_MD5_LEN 16 /* length of MD5 authentication */ + /* db_flags */ #define OSPF_DB_INIT 0x04 /* */ #define OSPF_DB_MORE 0x02 diff --git a/usr.sbin/tcpdump/print-arp.c b/usr.sbin/tcpdump/print-arp.c index 64dfb5c45a8..b40b563ffac 100644 --- a/usr.sbin/tcpdump/print-arp.c +++ b/usr.sbin/tcpdump/print-arp.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996 + * Copyright (c) 1988, 1989, 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 @@ -21,7 +21,7 @@ #ifndef lint static const char rcsid[] = - "@(#) $Header: /cvs/OpenBSD/src/usr.sbin/tcpdump/print-arp.c,v 1.7 1999/07/28 20:41:36 jakob Exp $ (LBL)"; + "@(#) $Header: /cvs/OpenBSD/src/usr.sbin/tcpdump/print-arp.c,v 1.8 1999/09/16 20:58:45 brad Exp $ (LBL)"; #endif #include <sys/param.h> diff --git a/usr.sbin/tcpdump/print-atalk.c b/usr.sbin/tcpdump/print-atalk.c index 654eb7b66b0..9c208e992a5 100644 --- a/usr.sbin/tcpdump/print-atalk.c +++ b/usr.sbin/tcpdump/print-atalk.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996 + * Copyright (c) 1988, 1989, 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 @@ -23,7 +23,7 @@ #ifndef lint static const char rcsid[] = - "@(#) $Header: /cvs/OpenBSD/src/usr.sbin/tcpdump/print-atalk.c,v 1.10 1999/07/28 20:41:36 jakob Exp $ (LBL)"; + "@(#) $Header: /cvs/OpenBSD/src/usr.sbin/tcpdump/print-atalk.c,v 1.11 1999/09/16 20:58:45 brad Exp $ (LBL)"; #endif #include <sys/param.h> diff --git a/usr.sbin/tcpdump/print-atm.c b/usr.sbin/tcpdump/print-atm.c index d6b119d942e..93541c8c63c 100644 --- a/usr.sbin/tcpdump/print-atm.c +++ b/usr.sbin/tcpdump/print-atm.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 1994, 1995, 1996 + * Copyright (c) 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 @@ -20,7 +20,7 @@ */ #ifndef lint static const char rcsid[] = - "@(#) $Header: /cvs/OpenBSD/src/usr.sbin/tcpdump/print-atm.c,v 1.3 1997/07/25 20:12:28 mickey Exp $ (LBL)"; + "@(#) $Header: /cvs/OpenBSD/src/usr.sbin/tcpdump/print-atm.c,v 1.4 1999/09/16 20:58:45 brad Exp $ (LBL)"; #endif #include <sys/param.h> @@ -46,9 +46,9 @@ struct rtentry; #include <stdio.h> #include <pcap.h> +#include "interface.h" #include "addrtoname.h" #include "ethertype.h" -#include "interface.h" /* * This is the top level routine of the printer. 'p' is the points diff --git a/usr.sbin/tcpdump/print-bootp.c b/usr.sbin/tcpdump/print-bootp.c index 111eb13f36d..2312eba66b0 100644 --- a/usr.sbin/tcpdump/print-bootp.c +++ b/usr.sbin/tcpdump/print-bootp.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 1990, 1991, 1993, 1994, 1995, 1996 + * Copyright (c) 1990, 1991, 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 @@ -22,7 +22,7 @@ */ #ifndef lint static const char rcsid[] = - "@(#) $Header: /cvs/OpenBSD/src/usr.sbin/tcpdump/print-bootp.c,v 1.8 1999/07/28 20:41:36 jakob Exp $ (LBL)"; + "@(#) $Header: /cvs/OpenBSD/src/usr.sbin/tcpdump/print-bootp.c,v 1.9 1999/09/16 20:58:46 brad Exp $ (LBL)"; #endif #include <sys/param.h> diff --git a/usr.sbin/tcpdump/print-decnet.c b/usr.sbin/tcpdump/print-decnet.c index 5793b0441af..322640af2c8 100644 --- a/usr.sbin/tcpdump/print-decnet.c +++ b/usr.sbin/tcpdump/print-decnet.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 1992, 1993, 1994, 1995, 1996 + * Copyright (c) 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 @@ -21,7 +21,7 @@ #ifndef lint static const char rcsid[] = - "@(#) $Header: /cvs/OpenBSD/src/usr.sbin/tcpdump/print-decnet.c,v 1.6 1997/07/25 20:12:23 mickey Exp $ (LBL)"; + "@(#) $Header: /cvs/OpenBSD/src/usr.sbin/tcpdump/print-decnet.c,v 1.7 1999/09/16 20:58:46 brad Exp $ (LBL)"; #endif #include <sys/param.h> diff --git a/usr.sbin/tcpdump/print-domain.c b/usr.sbin/tcpdump/print-domain.c index c9505f26142..78441780a5e 100644 --- a/usr.sbin/tcpdump/print-domain.c +++ b/usr.sbin/tcpdump/print-domain.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996 + * Copyright (c) 1988, 1989, 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 @@ -21,7 +21,7 @@ #ifndef lint static const char rcsid[] = - "@(#) $Header: /cvs/OpenBSD/src/usr.sbin/tcpdump/print-domain.c,v 1.7 1999/07/28 20:41:36 jakob Exp $ (LBL)"; + "@(#) $Header: /cvs/OpenBSD/src/usr.sbin/tcpdump/print-domain.c,v 1.8 1999/09/16 20:58:46 brad Exp $ (LBL)"; #endif #include <sys/param.h> @@ -50,7 +50,6 @@ struct rtentry; #ifdef NOERROR #undef T_UNSPEC /* SINIX does too */ #endif - #include <arpa/nameser.h> #include <stdio.h> @@ -103,22 +102,9 @@ struct rtentry; #define T_LOC 29 /* Location Information */ #endif -#ifndef T_UINFO -#define T_UINFO 100 -#endif - -#ifndef T_UID -#define T_UID 101 -#endif - -#ifndef T_GID -#define T_GID 102 -#endif - #ifndef T_UNSPEC #define T_UNSPEC 103 /* Unspecified format (binary data) */ #endif - #ifndef T_UNSPECA #define T_UNSPECA 104 /* "unspecified ascii". Ugly MIT hack */ #endif @@ -234,8 +220,17 @@ static struct tok type2str[] = { { T_GPOS, "GPOS" }, { T_AAAA, "AAAA" }, { T_LOC , "LOC " }, +#ifndef T_UINFO +#define T_UINFO 100 +#endif { T_UINFO, "UINFO" }, +#ifndef T_UID +#define T_UID 101 +#endif { T_UID, "UID" }, +#ifndef T_GID +#define T_GID 102 +#endif { T_GID, "GID" }, { T_UNSPEC, "UNSPEC" }, { T_UNSPECA, "UNSPECA" }, diff --git a/usr.sbin/tcpdump/print-fddi.c b/usr.sbin/tcpdump/print-fddi.c index b6095d7085d..afc1ee63721 100644 --- a/usr.sbin/tcpdump/print-fddi.c +++ b/usr.sbin/tcpdump/print-fddi.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 1991, 1992, 1993, 1994, 1995, 1996 + * Copyright (c) 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 @@ -21,7 +21,7 @@ #ifndef lint static const char rcsid[] = - "@(#) $Header: /cvs/OpenBSD/src/usr.sbin/tcpdump/print-fddi.c,v 1.7 1998/06/02 05:25:54 deraadt Exp $ (LBL)"; + "@(#) $Header: /cvs/OpenBSD/src/usr.sbin/tcpdump/print-fddi.c,v 1.8 1999/09/16 20:58:46 brad Exp $ (LBL)"; #endif #ifdef HAVE_FDDI diff --git a/usr.sbin/tcpdump/print-igrp.c b/usr.sbin/tcpdump/print-igrp.c index 6ef84e38f0e..ea053a9af78 100644 --- a/usr.sbin/tcpdump/print-igrp.c +++ b/usr.sbin/tcpdump/print-igrp.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 1996 + * Copyright (c) 1996, 1997 * The Regents of the University of California. All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -23,10 +23,11 @@ #ifndef lint static const char rcsid[] = - "@(#) $Header: /cvs/OpenBSD/src/usr.sbin/tcpdump/print-igrp.c,v 1.1 1996/12/12 16:22:36 bitblt Exp $ (LBL)"; + "@(#) $Header: /cvs/OpenBSD/src/usr.sbin/tcpdump/print-igrp.c,v 1.2 1999/09/16 20:58:47 brad Exp $ (LBL)"; #endif #include <sys/param.h> +#include <sys/types.h> /* concession to AIX */ #include <sys/socket.h> #include <netinet/in.h> @@ -39,8 +40,8 @@ static const char rcsid[] = #include <errno.h> #include <stdio.h> -#include "addrtoname.h" #include "interface.h" +#include "addrtoname.h" #include "igrp.h" #include "extract.h" /* must come after interface.h */ diff --git a/usr.sbin/tcpdump/print-ip.c b/usr.sbin/tcpdump/print-ip.c index 55cca732941..7539bb5020a 100644 --- a/usr.sbin/tcpdump/print-ip.c +++ b/usr.sbin/tcpdump/print-ip.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996 + * Copyright (c) 1988, 1989, 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 @@ -21,7 +21,7 @@ #ifndef lint static const char rcsid[] = - "@(#) $Header: /cvs/OpenBSD/src/usr.sbin/tcpdump/print-ip.c,v 1.6 1999/07/28 20:41:36 jakob Exp $ (LBL)"; + "@(#) $Header: /cvs/OpenBSD/src/usr.sbin/tcpdump/print-ip.c,v 1.7 1999/09/16 20:58:47 brad Exp $ (LBL)"; #endif #include <sys/param.h> diff --git a/usr.sbin/tcpdump/print-llc.c b/usr.sbin/tcpdump/print-llc.c index b410c758557..0468e467c28 100644 --- a/usr.sbin/tcpdump/print-llc.c +++ b/usr.sbin/tcpdump/print-llc.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 1992, 1993, 1994, 1995, 1996 + * Copyright (c) 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 @@ -24,7 +24,7 @@ #ifndef lint static const char rcsid[] = - "@(#) $Header: /cvs/OpenBSD/src/usr.sbin/tcpdump/print-llc.c,v 1.7 1999/02/12 05:34:53 deraadt Exp $"; + "@(#) $Header: /cvs/OpenBSD/src/usr.sbin/tcpdump/print-llc.c,v 1.8 1999/09/16 20:58:47 brad Exp $"; #endif #include <sys/param.h> diff --git a/usr.sbin/tcpdump/print-ntp.c b/usr.sbin/tcpdump/print-ntp.c index d1ef45d0b8c..55afbbdc1fc 100644 --- a/usr.sbin/tcpdump/print-ntp.c +++ b/usr.sbin/tcpdump/print-ntp.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 1990, 1991, 1992, 1993, 1994, 1995, 1996 + * 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 @@ -25,7 +25,7 @@ #ifndef lint static const char rcsid[] = - "@(#) $Header: /cvs/OpenBSD/src/usr.sbin/tcpdump/print-ntp.c,v 1.7 1999/07/28 20:41:36 jakob Exp $ (LBL)"; + "@(#) $Header: /cvs/OpenBSD/src/usr.sbin/tcpdump/print-ntp.c,v 1.8 1999/09/16 20:58:47 brad Exp $ (LBL)"; #endif #include <sys/param.h> diff --git a/usr.sbin/tcpdump/print-null.c b/usr.sbin/tcpdump/print-null.c index b8d109c445e..6a6ca9cb4e9 100644 --- a/usr.sbin/tcpdump/print-null.c +++ b/usr.sbin/tcpdump/print-null.c @@ -21,7 +21,7 @@ #ifndef lint static const char rcsid[] = - "@(#) $Header: /cvs/OpenBSD/src/usr.sbin/tcpdump/print-null.c,v 1.9 1999/07/28 20:41:36 jakob Exp $ (LBL)"; + "@(#) $Header: /cvs/OpenBSD/src/usr.sbin/tcpdump/print-null.c,v 1.10 1999/09/16 20:58:47 brad Exp $ (LBL)"; #endif #include <sys/param.h> @@ -50,8 +50,12 @@ struct rtentry; #include <stdio.h> #include <string.h> -#include "addrtoname.h" #include "interface.h" +#include "addrtoname.h" + +#ifndef AF_NS +#define AF_NS 6 /* XEROX NS protocols */ +#endif /* * The DLT_NULL packet header is 4 bytes long. It contains a network @@ -59,10 +63,6 @@ struct rtentry; */ #define NULL_HDRLEN 4 -#ifndef AF_NS -#define AF_NS 6 /* XEROX NS protocols */ -#endif - static void null_print(const u_char *p, u_int length, u_int family) { diff --git a/usr.sbin/tcpdump/print-sl.c b/usr.sbin/tcpdump/print-sl.c index 0e23388aa70..536204120c6 100644 --- a/usr.sbin/tcpdump/print-sl.c +++ b/usr.sbin/tcpdump/print-sl.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 1989, 1990, 1991, 1993, 1994, 1995, 1996 + * Copyright (c) 1989, 1990, 1991, 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 @@ -21,7 +21,7 @@ #ifndef lint static const char rcsid[] = - "@(#) $Header: /cvs/OpenBSD/src/usr.sbin/tcpdump/print-sl.c,v 1.7 1997/07/25 20:12:27 mickey Exp $ (LBL)"; + "@(#) $Header: /cvs/OpenBSD/src/usr.sbin/tcpdump/print-sl.c,v 1.8 1999/09/16 20:58:47 brad Exp $ (LBL)"; #endif #ifdef HAVE_NET_SLIP_H @@ -75,6 +75,8 @@ static void compressed_sl_print(const u_char *, const struct ip *, u_int, int); #define CHDR_LEN (SLC_BPFHDR - SLC_BPFHDRLEN) #endif +/* XXX needs more hacking to work right */ + void sl_if_print(u_char *user, const struct pcap_pkthdr *h, const u_char *p) { @@ -111,6 +113,45 @@ sl_if_print(u_char *user, const struct pcap_pkthdr *h, const u_char *p) putchar('\n'); } + +void +sl_bsdos_if_print(u_char *user, const struct pcap_pkthdr *h, const u_char *p) +{ + register u_int caplen = h->caplen; + register u_int length = h->len; + register const struct ip *ip; + + ts_print(&h->ts); + + if (caplen < SLIP_HDRLEN) { + printf("[|slip]"); + goto out; + } + /* + * Some printers want to get back at the link level addresses, + * and/or check that they're not walking off the end of the packet. + * Rather than pass them all the way down, we set these globals. + */ + packetp = p; + snapend = p + caplen; + + length -= SLIP_HDRLEN; + + ip = (struct ip *)(p + SLIP_HDRLEN); + +#ifdef notdef + if (eflag) + sliplink_print(p, ip, length); +#endif + + ip_print((u_char *)ip, length); + + if (xflag) + default_print((u_char *)ip, caplen - SLIP_HDRLEN); + out: + putchar('\n'); +} + static void sliplink_print(register const u_char *p, register const struct ip *ip, register u_int length) @@ -247,6 +288,7 @@ compressed_sl_print(const u_char *chdr, const struct ip *ip, #include <stdio.h> #include "interface.h" + void sl_if_print(u_char *user, const struct pcap_pkthdr *h, const u_char *p) { @@ -254,4 +296,12 @@ sl_if_print(u_char *user, const struct pcap_pkthdr *h, const u_char *p) error("not configured for slip"); /* NOTREACHED */ } + +void +sl_bsdos_if_print(u_char *user, const struct pcap_pkthdr *h, const u_char *p) +{ + + error("not configured for slip"); + /* NOTREACHED */ +} #endif diff --git a/usr.sbin/tcpdump/print-snmp.c b/usr.sbin/tcpdump/print-snmp.c index 0a6f35f4cb6..ca011e863d4 100644 --- a/usr.sbin/tcpdump/print-snmp.c +++ b/usr.sbin/tcpdump/print-snmp.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 1990, 1991, 1993, 1994, 1995, 1996 + * Copyright (c) 1990, 1991, 1993, 1994, 1995, 1996, 1997 * The Regents of the University of California. All rights reserved. * * Redistribution and use in source and binary forms are permitted @@ -26,7 +26,7 @@ * # Los Alamos National Laboratory # - # Copyright, 1990. The Regents of the University of California. + # Copyright (c) 1990, 1991, 1993, 1994, 1995, 1996, 1997 # This software was produced under a U.S. Government contract # (W-7405-ENG-36) by Los Alamos National Laboratory, which is # operated by the University of California for the U.S. Department @@ -42,14 +42,14 @@ #ifndef lint static const char rcsid[] = - "@(#) $Header: /cvs/OpenBSD/src/usr.sbin/tcpdump/print-snmp.c,v 1.5 1996/12/12 16:22:27 bitblt Exp $ (LBL)"; + "@(#) $Header: /cvs/OpenBSD/src/usr.sbin/tcpdump/print-snmp.c,v 1.6 1999/09/16 20:58:47 brad Exp $ (LBL)"; #endif #include <sys/param.h> #include <sys/time.h> -#include <stdio.h> #include <ctype.h> +#include <stdio.h> #include <string.h> #include "interface.h" diff --git a/usr.sbin/tcpdump/print-tftp.c b/usr.sbin/tcpdump/print-tftp.c index 922e0c03f7c..72899e44907 100644 --- a/usr.sbin/tcpdump/print-tftp.c +++ b/usr.sbin/tcpdump/print-tftp.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 1990, 1991, 1993, 1994, 1995, 1996 + * Copyright (c) 1990, 1991, 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 @@ -23,7 +23,7 @@ #ifndef lint static const char rcsid[] = - "@(#) $Header: /cvs/OpenBSD/src/usr.sbin/tcpdump/print-tftp.c,v 1.5 1996/12/12 16:22:25 bitblt Exp $ (LBL)"; + "@(#) $Header: /cvs/OpenBSD/src/usr.sbin/tcpdump/print-tftp.c,v 1.6 1999/09/16 20:58:47 brad Exp $ (LBL)"; #endif #include <sys/param.h> @@ -31,6 +31,9 @@ static const char rcsid[] = #include <netinet/in.h> +#ifdef SEGSIZE +#undef SEGSIZE /* SINIX sucks */ +#endif #include <arpa/tftp.h> #include <ctype.h> diff --git a/usr.sbin/tcpdump/print-udp.c b/usr.sbin/tcpdump/print-udp.c index 3f67424227d..d791d0a6137 100644 --- a/usr.sbin/tcpdump/print-udp.c +++ b/usr.sbin/tcpdump/print-udp.c @@ -21,7 +21,7 @@ #ifndef lint static const char rcsid[] = - "@(#) $Header: /cvs/OpenBSD/src/usr.sbin/tcpdump/print-udp.c,v 1.9 1999/07/28 20:41:36 jakob Exp $ (LBL)"; + "@(#) $Header: /cvs/OpenBSD/src/usr.sbin/tcpdump/print-udp.c,v 1.10 1999/09/16 20:58:48 brad Exp $ (LBL)"; #endif #include <sys/param.h> @@ -35,9 +35,16 @@ static const char rcsid[] = #include <netinet/udp.h> #include <netinet/udp_var.h> +#ifdef NOERROR #undef NOERROR /* Solaris sucks */ +#endif +#ifdef T_UNSPEC #undef T_UNSPEC /* SINIX does too */ +#endif #include <arpa/nameser.h> +#ifdef SEGSIZE +#undef SEGSIZE +#endif #include <arpa/tftp.h> #include <rpc/rpc.h> diff --git a/usr.sbin/tcpdump/tcpdump.c b/usr.sbin/tcpdump/tcpdump.c index 88f177405c1..28d0c9eb24c 100644 --- a/usr.sbin/tcpdump/tcpdump.c +++ b/usr.sbin/tcpdump/tcpdump.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996 + * Copyright (c) 1988, 1989, 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 @@ -21,10 +21,10 @@ #ifndef lint static const char copyright[] = - "@(#) Copyright (c) 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996\n\ + "@(#) Copyright (c) 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997\n\ The Regents of the University of California. All rights reserved.\n"; static const char rcsid[] = - "@(#) $Header: /cvs/OpenBSD/src/usr.sbin/tcpdump/tcpdump.c,v 1.13 1999/07/28 20:41:37 jakob Exp $ (LBL)"; + "@(#) $Header: /cvs/OpenBSD/src/usr.sbin/tcpdump/tcpdump.c,v 1.14 1999/09/16 20:58:48 brad Exp $ (LBL)"; #endif /* @@ -70,6 +70,7 @@ int Xflag; /* print packet in emacs-hexl style */ int packettype; + char *program_name; int32_t thiszone; /* seconds offset from gmt to local time */ @@ -98,9 +99,11 @@ static struct printer printers[] = { { ether_if_print, DLT_EN10MB }, { ether_if_print, DLT_IEEE802 }, { sl_if_print, DLT_SLIP }, + { sl_bsdos_if_print, DLT_SLIP_BSDOS }, { ppp_if_print, DLT_PPP }, { fddi_if_print, DLT_FDDI }, { null_if_print, DLT_NULL }, + { raw_if_print, DLT_RAW }, { atm_if_print, DLT_ATM_RFC1483 }, { null_if_print, DLT_LOOP }, { enc_if_print, DLT_ENC }, diff --git a/usr.sbin/tcpdump/util.c b/usr.sbin/tcpdump/util.c index fff5634038a..6105108bff5 100644 --- a/usr.sbin/tcpdump/util.c +++ b/usr.sbin/tcpdump/util.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 1990, 1991, 1993, 1994, 1995, 1996 + * Copyright (c) 1990, 1991, 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 @@ -21,7 +21,7 @@ #ifndef lint static const char rcsid[] = - "@(#) $Header: /cvs/OpenBSD/src/usr.sbin/tcpdump/util.c,v 1.7 1999/07/28 20:41:37 jakob Exp $ (LBL)"; + "@(#) $Header: /cvs/OpenBSD/src/usr.sbin/tcpdump/util.c,v 1.8 1999/09/16 20:58:48 brad Exp $ (LBL)"; #endif #include <sys/types.h> |