apply our changes and add the pfsync stuff.

This commit is contained in:
christos 2010-12-05 05:11:30 +00:00
parent 6688046702
commit 11b3aaa125
152 changed files with 1351 additions and 149 deletions

View File

@ -21,9 +21,14 @@
* Internet, ethernet, port, and protocol string to address
* and address to string conversion routines
*/
#include <sys/cdefs.h>
#ifndef lint
#if 0
static const char rcsid[] _U_ =
"@(#) Header: /tcpdump/master/tcpdump/addrtoname.c,v 1.119 2007-08-08 14:06:34 hannes Exp (LBL)";
#else
__RCSID("$NetBSD: addrtoname.c,v 1.2 2010/12/05 05:11:30 christos Exp $");
#endif
#endif
#ifdef HAVE_CONFIG_H

View File

@ -15,9 +15,14 @@
* Original code by Hannes Gredler (hannes@juniper.net)
*/
#include <sys/cdefs.h>
#ifndef lint
#if 0
static const char rcsid[] _U_ =
"@(#) Header: /tcpdump/master/tcpdump/af.c,v 1.3 2006-03-23 14:58:44 hannes Exp (LBL)";
#else
__RCSID("$NetBSD: af.c,v 1.2 2010/12/05 05:11:30 christos Exp $");
#endif
#endif
#ifdef HAVE_CONFIG_H

View File

@ -1,4 +1,4 @@
/* $NetBSD: ah.h,v 1.1.1.1 2010/12/05 03:14:51 christos Exp $ */
/* NetBSD: ah.h,v 1.12 2000/07/23 05:23:04 itojun Exp */
/* $KAME: ah.h,v 1.12 2000/07/20 17:41:01 itojun Exp $ */
/*

View File

@ -1,4 +1,4 @@
$6 ~ /^ack/ && $5 !~ /[SFR]/ {
$6 ~ /^ack/ && $5 !~ /[SFR]/ {
# given a tcpdump ftp trace, output one line for each ack
# in the form
# <ack time> <seq no>

View File

@ -18,9 +18,14 @@
* WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
*/
#include <sys/cdefs.h>
#ifndef lint
#if 0
static const char rcsid[] _U_ =
"@(#) Header: /tcpdump/master/tcpdump/bpf_dump.c,v 1.17 2008-02-14 20:53:49 guy Exp (LBL)";
#else
__RCSID("$NetBSD: bpf_dump.c,v 1.2 2010/12/05 05:11:30 christos Exp $");
#endif
#endif
#ifdef HAVE_CONFIG_H

View File

@ -17,9 +17,14 @@
* Original code by Hannes Gredler (hannes@juniper.net)
*/
#include <sys/cdefs.h>
#ifndef lint
#if 0
static const char rcsid[] _U_ =
"@(#) Header: /tcpdump/master/tcpdump/checksum.c,v 1.4 2006-09-25 09:23:32 hannes Exp";
#else
__RCSID("$NetBSD: checksum.c,v 1.2 2010/12/05 05:11:30 christos Exp $");
#endif
#endif
#ifdef HAVE_CONFIG_H

View File

@ -11779,7 +11779,7 @@ solaris*)
;;
esac
if test -f /dev/bpf0 ; then
if test -f /dev/bpf0 -o -f /dev/bpf; then
V_GROUP=bpf
fi

View File

@ -15,7 +15,7 @@ dnl
# config.sub.
#
AC_REVISION($Revision: 1.1.1.1 $)
AC_REVISION($Revision: 1.2 $)
AC_PREREQ(2.50)
AC_INIT(tcpdump.c)
@ -845,7 +845,7 @@ solaris*)
;;
esac
if test -f /dev/bpf0 ; then
if test -f /dev/bpf -o -f /dev/bpf0; then
V_GROUP=bpf
fi

View File

@ -9,9 +9,6 @@
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. The name of David Young may not be used to endorse or promote
* products derived from this software without specific prior
* written permission.
*
* THIS SOFTWARE IS PROVIDED BY DAVID YOUNG ``AS IS'' AND ANY
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,

View File

@ -9,9 +9,6 @@
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. The name of David Young may not be used to endorse or promote
* products derived from this software without specific prior
* written permission.
*
* THIS SOFTWARE IS PROVIDED BY DAVID YOUNG ``AS IS'' AND ANY
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,

View File

@ -1,4 +1,4 @@
/* $NetBSD: esp.h,v 1.1.1.1 2010/12/05 03:15:01 christos Exp $ */
/* NetBSD: esp.h,v 1.13 2000/09/26 08:37:38 itojun Exp */
/* $KAME: esp.h,v 1.15 2000/09/20 18:15:22 itojun Exp $ */
/*

View File

@ -1,4 +1,3 @@
/* @(#) Header: /tcpdump/master/tcpdump/ether.h,v 1.8 2002-12-11 07:13:51 guy Exp (LBL) */
/*
* Copyright (c) 1982, 1986, 1993
* The Regents of the University of California. All rights reserved.
@ -11,11 +10,7 @@
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. All advertising materials mentioning features or use of this software
* must display the following acknowledgement:
* This product includes software developed by the University of
* California, Berkeley and its contributors.
* 4. Neither the name of the University nor the names of its contributors
* 3. 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.
*

View File

@ -13,9 +13,14 @@
* Original code by Hannes Gredler (hannes@juniper.net)
*/
#include <sys/cdefs.h>
#ifndef lint
#if 0
static const char rcsid[] _U_ =
"@(#) Header: /tcpdump/master/tcpdump/gmpls.c,v 1.7 2006-04-14 07:11:59 hannes Exp (LBL)";
#else
__RCSID("$NetBSD: gmpls.c,v 1.2 2010/12/05 05:11:30 christos Exp $");
#endif
#endif
#ifdef HAVE_CONFIG_H

View File

@ -19,9 +19,14 @@
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
*/
#include <sys/cdefs.h>
#ifndef lint
#if 0
static const char rcsid[] _U_ =
"@(#) Header: /tcpdump/master/tcpdump/gmt2local.c,v 1.9 2003-11-16 09:36:09 guy Exp (LBL)";
#else
__RCSID("$NetBSD: gmt2local.c,v 1.2 2010/12/05 05:11:30 christos Exp $");
#endif
#endif
#ifdef HAVE_CONFIG_H

View File

@ -43,11 +43,7 @@
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. All advertising materials mentioning features or use of this software
* must display the following acknowledgement:
* This product includes software developed by the University of
* California, Berkeley and its contributors.
* 4. Neither the name of the University nor the names of its contributors
* 3. 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.
*

View File

@ -13,9 +13,6 @@
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. The name of David Young may not be used to endorse or promote
* products derived from this software without specific prior
* written permission.
*
* THIS SOFTWARE IS PROVIDED BY DAVID YOUNG ``AS IS'' AND ANY
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,

View File

@ -187,6 +187,8 @@ extern void dvmrp_print(const u_char *, u_int);
extern void egp_print(const u_char *, u_int);
extern u_int enc_if_print(const struct pcap_pkthdr *, const u_char *);
extern u_int pflog_if_print(const struct pcap_pkthdr *, const u_char *);
extern u_int pfsync_if_print(const struct pcap_pkthdr *, const u_char *);
extern void pfsync_ip_print(const u_char*, u_int, const u_char *);
extern u_int arcnet_if_print(const struct pcap_pkthdr *, const u_char *);
extern u_int arcnet_linux_if_print(const struct pcap_pkthdr *, const u_char *);
extern void ether_print(const u_char *, u_int, u_int,

View File

@ -11,11 +11,7 @@
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. All advertising materials mentioning features or use of this software
* must display the following acknowledgement:
* This product includes software developed by the University of
* California, Berkeley and its contributors.
* 4. Neither the name of the University nor the names of its contributors
* 3. 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.
*

View File

@ -43,11 +43,7 @@
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. All advertising materials mentioning features or use of this software
* must display the following acknowledgement:
* This product includes software developed by the University of
* California, Berkeley and its contributors.
* 4. Neither the name of the University nor the names of its contributors
* 3. 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.
*

View File

@ -1,4 +1,4 @@
/*
/*
* 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
@ -13,9 +13,14 @@
* Original code by Hannes Gredler (hannes@juniper.net)
*/
#include <sys/cdefs.h>
#ifndef lint
#if 0
static const char rcsid[] _U_ =
"@(#) Header: /tcpdump/master/tcpdump/ipproto.c,v 1.6 2005-09-20 06:01:22 guy Exp (LBL)";
#else
__RCSID("$NetBSD: ipproto.c,v 1.2 2010/12/05 05:11:30 christos Exp $");
#endif
#endif
#ifdef HAVE_CONFIG_H
@ -55,6 +60,7 @@ const struct tok ipproto_values[] = {
{ IPPROTO_PGM, "PGM" },
{ IPPROTO_SCTP, "SCTP" },
{ IPPROTO_MOBILITY, "Mobility" },
{ IPPROTO_PFSYNC, "PFSYNC" },
{ 0, NULL }
};

View File

@ -10,11 +10,7 @@
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. All advertising materials mentioning features or use of this software
* must display the following acknowledgement:
* This product includes software developed by the University of
* California, Berkeley and its contributors.
* 4. Neither the name of the University nor the names of its contributors
* 3. 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.
*

View File

@ -1,4 +1,4 @@
/*
/*
* 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
@ -13,9 +13,14 @@
* Original code by Hannes Gredler (hannes@juniper.net)
*/
#include <sys/cdefs.h>
#ifndef lint
#if 0
static const char rcsid[] _U_ =
"@(#) Header: /tcpdump/master/tcpdump/l2vpn.c,v 1.1 2004-06-15 09:42:40 hannes Exp (LBL)";
#else
__RCSID("$NetBSD: l2vpn.c,v 1.2 2010/12/05 05:11:30 christos Exp $");
#endif
#endif
#ifdef HAVE_CONFIG_H

View File

@ -19,9 +19,14 @@
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
*/
#include <sys/cdefs.h>
#ifndef lint
#if 0
static const char rcsid[] _U_ =
"@(#) Header: /tcpdump/master/tcpdump/machdep.c,v 1.13 2003-12-15 03:53:21 guy Exp (LBL)";
#else
__RCSID("$NetBSD: machdep.c,v 1.2 2010/12/05 05:11:30 christos Exp $");
#endif
#endif
#ifdef HAVE_CONFIG_H

View File

@ -11,11 +11,7 @@
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. All advertising materials mentioning features or use of this software
* must display the following acknowledgement:
* This product includes software developed by the University of
* California, Berkeley and its contributors.
* 4. Neither the name of the University nor the names of its contributors
* 3. 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.
*

View File

@ -16,11 +16,7 @@
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. All advertising materials mentioning features or use of this software
* must display the following acknowledgement:
* This product includes software developed by the University of
* California, Berkeley and its contributors.
* 4. Neither the name of the University nor the names of its contributors
* 3. 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.
*

View File

@ -1,4 +1,4 @@
/*
/*
* 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
@ -13,9 +13,14 @@
* Original code by Hannes Gredler (hannes@juniper.net)
*/
#include <sys/cdefs.h>
#ifndef lint
#if 0
static const char rcsid[] _U_ =
"@(#) Header: /tcpdump/master/tcpdump/nlpid.c,v 1.4 2004-10-19 15:27:55 hannes Exp (LBL)";
#else
__RCSID("$NetBSD: nlpid.c,v 1.2 2010/12/05 05:11:30 christos Exp $");
#endif
#endif
#ifdef HAVE_CONFIG_H

View File

@ -1,4 +1,4 @@
/*
/*
* 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
@ -13,9 +13,14 @@
* Original code by Hannes Gredler (hannes@juniper.net)
*/
#include <sys/cdefs.h>
#ifndef lint
#if 0
static const char rcsid[] _U_ =
"@(#) Header: /tcpdump/master/tcpdump/oui.c,v 1.9 2008-01-09 09:40:47 hannes Exp (LBL)";
#else
__RCSID("$NetBSD: oui.c,v 1.2 2010/12/05 05:11:30 christos Exp $");
#endif
#endif
#ifdef HAVE_CONFIG_H

View File

@ -40,9 +40,14 @@
* Western Research Laboratory
*/
#include <sys/cdefs.h>
#ifndef lint
#if 0
static const char rcsid[] _U_ =
"@(#) Header: /tcpdump/master/tcpdump/parsenfsfh.c,v 1.29 2006-06-13 22:21:38 guy Exp (LBL)";
#else
__RCSID("$NetBSD: parsenfsfh.c,v 1.2 2010/12/05 05:11:30 christos Exp $");
#endif
#endif
#ifdef HAVE_CONFIG_H

View File

@ -19,9 +19,14 @@
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
*/
#include <sys/cdefs.h>
#ifndef lint
#if 0
static const char rcsid[] _U_ =
"@(#) Header: /tcpdump/master/tcpdump/pcap_dump_ftell.c,v 1.1 2005-06-03 22:08:52 guy Exp (LBL)";
#else
__RCSID("$NetBSD: pcap_dump_ftell.c,v 1.2 2010/12/05 05:11:30 christos Exp $");
#endif
#endif
#include <stdio.h>

78
external/bsd/tcpdump/dist/pf.h vendored Normal file
View File

@ -0,0 +1,78 @@
/*
* Copyright (c) 2001 Daniel Hartmeier
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* - Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* - Redistributions in binary form must reproduce the above
* copyright notice, this list of conditions and the following
* disclaimer in the documentation and/or other materials provided
* with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
* COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
* @(#) Header: /tcpdump/master/tcpdump/pf.h,v 1.2 2004/04/02 06:36:25 guy Exp (LBL)
*/
/* from $OpenBSD: pfvar.h,v 1.170 2003/08/22 21:50:34 david Exp $ */
enum { PF_INOUT=0, PF_IN=1, PF_OUT=2 };
enum { PF_PASS=0, PF_DROP=1, PF_SCRUB=2, PF_NAT=3, PF_NONAT=4,
PF_BINAT=5, PF_NOBINAT=6, PF_RDR=7, PF_NORDR=8, PF_SYNPROXY_DROP=9 };
/* Reasons code for passing/dropping a packet */
#define PFRES_MATCH 0 /* Explicit match of a rule */
#define PFRES_BADOFF 1 /* Bad offset for pull_hdr */
#define PFRES_FRAG 2 /* Dropping following fragment */
#define PFRES_SHORT 3 /* Dropping short packet */
#define PFRES_NORM 4 /* Dropping by normalizer */
#define PFRES_MEMORY 5 /* Dropped due to lacking mem */
#define PFRES_MAX 6 /* total+1 */
#define PFRES_NAMES { \
"match", \
"bad-offset", \
"fragment", \
"short", \
"normalize", \
"memory", \
NULL \
}
#define PF_RULESET_NAME_SIZE 16
/* from $OpenBSD: if_pflog.h,v 1.9 2003/07/15 20:27:27 dhartmei Exp $ */
#ifndef IFNAMSIZ
#define IFNAMSIZ 16
#endif
struct pfloghdr {
u_int8_t length;
u_int8_t af;
u_int8_t action;
u_int8_t reason;
char ifname[IFNAMSIZ];
char ruleset[PF_RULESET_NAME_SIZE];
u_int32_t rulenr;
u_int32_t subrulenr;
u_int8_t dir;
u_int8_t pad[3];
};
#define PFLOG_HDRLEN sizeof(struct pfloghdr)

View File

@ -0,0 +1,329 @@
/* $NetBSD: pf_print_state.c,v 1.1 2010/12/05 05:11:30 christos Exp $ */
/* $OpenBSD: pf_print_state.c,v 1.45 2007/05/31 04:13:37 mcbride Exp $ */
/*
* Copyright (c) 2001 Daniel Hartmeier
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* - Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* - Redistributions in binary form must reproduce the above
* copyright notice, this list of conditions and the following
* disclaimer in the documentation and/or other materials provided
* with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
* COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
*/
#include <sys/cdefs.h>
#ifndef lint
__RCSID("$NetBSD: pf_print_state.c,v 1.1 2010/12/05 05:11:30 christos Exp $");
#endif
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#include <sys/types.h>
#include <sys/socket.h>
#include <net/if.h>
#define TCPSTATES
#include <netinet/tcp_fsm.h>
#include <net/pfvar.h>
#include <arpa/inet.h>
#include <netdb.h>
#include <stdio.h>
#include <string.h>
#include "pfctl_parser.h"
#include "pfctl.h"
void print_name(struct pf_addr *, sa_family_t);
void
print_addr(struct pf_addr_wrap *addr, sa_family_t af, int verbose)
{
switch (addr->type) {
case PF_ADDR_DYNIFTL:
printf("(%s", addr->v.ifname);
if (addr->iflags & PFI_AFLAG_NETWORK)
printf(":network");
if (addr->iflags & PFI_AFLAG_BROADCAST)
printf(":broadcast");
if (addr->iflags & PFI_AFLAG_PEER)
printf(":peer");
if (addr->iflags & PFI_AFLAG_NOALIAS)
printf(":0");
if (verbose) {
if (addr->p.dyncnt <= 0)
printf(":*");
else
printf(":%d", addr->p.dyncnt);
}
printf(")");
break;
case PF_ADDR_TABLE:
if (verbose)
if (addr->p.tblcnt == -1)
printf("<%s:*>", addr->v.tblname);
else
printf("<%s:%d>", addr->v.tblname,
addr->p.tblcnt);
else
printf("<%s>", addr->v.tblname);
return;
case PF_ADDR_ADDRMASK:
if (PF_AZERO(&addr->v.a.addr, AF_INET6) &&
PF_AZERO(&addr->v.a.mask, AF_INET6))
printf("any");
else {
char buf[48];
if (inet_ntop(af, &addr->v.a.addr, buf,
sizeof(buf)) == NULL)
printf("?");
else
printf("%s", buf);
}
break;
case PF_ADDR_NOROUTE:
printf("no-route");
return;
case PF_ADDR_URPFFAILED:
printf("urpf-failed");
return;
case PF_ADDR_RTLABEL:
printf("route \"%s\"", addr->v.rtlabelname);
return;
default:
printf("?");
return;
}
/* mask if not _both_ address and mask are zero */
if (!(PF_AZERO(&addr->v.a.addr, AF_INET6) &&
PF_AZERO(&addr->v.a.mask, AF_INET6))) {
int bits = unmask(&addr->v.a.mask, af);
if (bits != (af == AF_INET ? 32 : 128))
printf("/%d", bits);
}
}
void
print_name(struct pf_addr *addr, sa_family_t af)
{
char host[NI_MAXHOST];
strlcpy(host, "?", sizeof(host));
switch (af) {
case AF_INET: {
struct sockaddr_in sin;
memset(&sin, 0, sizeof(sin));
sin.sin_len = sizeof(sin);
sin.sin_family = AF_INET;
sin.sin_addr = addr->v4;
getnameinfo((struct sockaddr *)&sin, sin.sin_len,
host, sizeof(host), NULL, 0, NI_NOFQDN);
break;
}
case AF_INET6: {
struct sockaddr_in6 sin6;
memset(&sin6, 0, sizeof(sin6));
sin6.sin6_len = sizeof(sin6);
sin6.sin6_family = AF_INET6;
sin6.sin6_addr = addr->v6;
getnameinfo((struct sockaddr *)&sin6, sin6.sin6_len,
host, sizeof(host), NULL, 0, NI_NOFQDN);
break;
}
}
printf("%s", host);
}
void
print_host(struct pfsync_state_host *h, sa_family_t af, int opts)
{
u_int16_t p = ntohs(h->port);
if (opts & PF_OPT_USEDNS)
print_name(&h->addr, af);
else {
struct pf_addr_wrap aw;
memset(&aw, 0, sizeof(aw));
aw.v.a.addr = h->addr;
if (af == AF_INET)
aw.v.a.mask.addr32[0] = 0xffffffff;
else {
memset(&aw.v.a.mask, 0xff, sizeof(aw.v.a.mask));
af = AF_INET6;
}
print_addr(&aw, af, opts & PF_OPT_VERBOSE2);
}
if (p) {
if (af == AF_INET)
printf(":%u", p);
else
printf("[%u]", p);
}
}
void
print_seq(struct pfsync_state_peer *p)
{
if (p->seqdiff)
printf("[%u + %u](+%u)", p->seqlo, p->seqhi - p->seqlo,
p->seqdiff);
else
printf("[%u + %u]", p->seqlo, p->seqhi - p->seqlo);
}
void
print_state(struct pfsync_state *s, int opts)
{
struct pfsync_state_peer *src, *dst;
struct protoent *p;
int min, sec;
if (s->direction == PF_OUT) {
src = &s->src;
dst = &s->dst;
} else {
src = &s->dst;
dst = &s->src;
}
printf("%s ", s->ifname);
if ((p = getprotobynumber(s->proto)) != NULL)
printf("%s ", p->p_name);
else
printf("%u ", s->proto);
if (PF_ANEQ(&s->lan.addr, &s->gwy.addr, s->af) ||
(s->lan.port != s->gwy.port)) {
print_host(&s->lan, s->af, opts);
if (s->direction == PF_OUT)
printf(" -> ");
else
printf(" <- ");
}
print_host(&s->gwy, s->af, opts);
if (s->direction == PF_OUT)
printf(" -> ");
else
printf(" <- ");
print_host(&s->ext, s->af, opts);
printf(" ");
if (s->proto == IPPROTO_TCP) {
if (src->state <= TCPS_TIME_WAIT &&
dst->state <= TCPS_TIME_WAIT)
printf(" %s:%s\n", tcpstates[src->state],
tcpstates[dst->state]);
else if (src->state == PF_TCPS_PROXY_SRC ||
dst->state == PF_TCPS_PROXY_SRC)
printf(" PROXY:SRC\n");
else if (src->state == PF_TCPS_PROXY_DST ||
dst->state == PF_TCPS_PROXY_DST)
printf(" PROXY:DST\n");
else
printf(" <BAD STATE LEVELS %u:%u>\n",
src->state, dst->state);
if (opts & PF_OPT_VERBOSE) {
printf(" ");
print_seq(src);
if (src->wscale && dst->wscale)
printf(" wscale %u",
src->wscale & PF_WSCALE_MASK);
printf(" ");
print_seq(dst);
if (src->wscale && dst->wscale)
printf(" wscale %u",
dst->wscale & PF_WSCALE_MASK);
printf("\n");
}
} else if (s->proto == IPPROTO_UDP && src->state < PFUDPS_NSTATES &&
dst->state < PFUDPS_NSTATES) {
const char *states[] = PFUDPS_NAMES;
printf(" %s:%s\n", states[src->state], states[dst->state]);
} else if (s->proto != IPPROTO_ICMP && src->state < PFOTHERS_NSTATES &&
dst->state < PFOTHERS_NSTATES) {
/* XXX ICMP doesn't really have state levels */
const char *states[] = PFOTHERS_NAMES;
printf(" %s:%s\n", states[src->state], states[dst->state]);
} else {
printf(" %u:%u\n", src->state, dst->state);
}
if (opts & PF_OPT_VERBOSE) {
sec = s->creation % 60;
s->creation /= 60;
min = s->creation % 60;
s->creation /= 60;
printf(" age %.2u:%.2u:%.2u", s->creation, min, sec);
sec = s->expire % 60;
s->expire /= 60;
min = s->expire % 60;
s->expire /= 60;
printf(", expires in %.2u:%.2u:%.2u", s->expire, min, sec);
printf(", %llu:%llu pkts, %llu:%llu bytes",
(unsigned long long)pf_state_counter_from_pfsync(s->packets[0]),
(unsigned long long)pf_state_counter_from_pfsync(s->packets[1]),
(unsigned long long)pf_state_counter_from_pfsync(s->bytes[0]),
(unsigned long long)pf_state_counter_from_pfsync(s->bytes[1]));
if (s->anchor != -1)
printf(", anchor %u", s->anchor);
if (s->rule != -1)
printf(", rule %u", s->rule);
if (s->sync_flags & PFSYNC_FLAG_SRCNODE)
printf(", source-track");
if (s->sync_flags & PFSYNC_FLAG_NATSRCNODE)
printf(", sticky-address");
printf("\n");
}
if (opts & PF_OPT_VERBOSE2) {
printf(" id: %016llx creatorid: %08x%s\n",
(unsigned long long int)pf_state_counter_from_pfsync(s->id),
ntohl(s->creatorid),
((s->sync_flags & PFSTATE_NOSYNC) ? " (no-sync)" : ""));
}
}
int
unmask(struct pf_addr *m, sa_family_t af)
{
int i = 31, j = 0, b = 0;
u_int32_t tmp;
while (j < 4 && m->addr32[j] == 0xffffffff) {
b += 32;
j++;
}
if (j < 4) {
tmp = ntohl(m->addr32[j]);
for (i = 31; tmp & (1 << i); --i)
b++;
}
return (b);
}

View File

@ -20,9 +20,14 @@
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
*/
#include <sys/cdefs.h>
#ifndef lint
#if 0
static const char rcsid[] _U_ =
"@(#) Header: /tcpdump/master/tcpdump/print-802_11.c,v 1.49 2007-12-29 23:25:02 guy Exp (LBL)";
#else
__RCSID("$NetBSD: print-802_11.c,v 1.2 2010/12/05 05:11:30 christos Exp $");
#endif
#endif
#ifdef HAVE_CONFIG_H

View File

@ -1,4 +1,4 @@
/* $NetBSD: print-ah.c,v 1.1.1.1 2010/12/05 03:15:08 christos Exp $ */
/* NetBSD: print-ah.c,v 1.4 1996/05/20 00:41:16 fvdl Exp */
/*
* Copyright (c) 1988, 1989, 1990, 1991, 1992, 1993, 1994
@ -21,9 +21,14 @@
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
*/
#include <sys/cdefs.h>
#ifndef lint
#if 0
static const char rcsid[] _U_ =
"@(#) Header: /tcpdump/master/tcpdump/print-ah.c,v 1.22 2003-11-19 00:36:06 guy Exp (LBL)";
#else
__RCSID("$NetBSD: print-ah.c,v 1.2 2010/12/05 05:11:30 christos Exp $");
#endif
#endif
#ifdef HAVE_CONFIG_H

View File

@ -30,9 +30,14 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
#include <sys/cdefs.h>
#ifndef lint
#if 0
static const char rcsid[] _U_ =
"@(#) Header: /tcpdump/master/tcpdump/print-aodv.c,v 1.11 2004-03-24 00:30:19 guy Exp (LBL)";
#else
__RCSID("$NetBSD: print-aodv.c,v 1.2 2010/12/05 05:11:30 christos Exp $");
#endif
#endif
#ifdef HAVE_CONFIG_H

View File

@ -18,9 +18,14 @@
* WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
*/
#include <sys/cdefs.h>
#ifndef lint
#if 0
static const char rcsid[] _U_ =
"@(#) Header: /tcpdump/master/tcpdump/print-ap1394.c,v 1.5 2006-02-11 22:12:06 hannes Exp (LBL)";
#else
__RCSID("$NetBSD: print-ap1394.c,v 1.2 2010/12/05 05:11:30 christos Exp $");
#endif
#endif
#ifdef HAVE_CONFIG_H

View File

@ -20,9 +20,14 @@
*
* From: NetBSD: print-arcnet.c,v 1.2 2000/04/24 13:02:28 itojun Exp
*/
#include <sys/cdefs.h>
#ifndef lint
#if 0
static const char rcsid[] _U_ =
"@(#) Header: /tcpdump/master/tcpdump/print-arcnet.c,v 1.20 2005-04-06 21:32:38 mcr Exp (LBL)";
#else
__RCSID("$NetBSD: print-arcnet.c,v 1.2 2010/12/05 05:11:30 christos Exp $");
#endif
#endif
#ifdef HAVE_CONFIG_H

View File

@ -19,9 +19,14 @@
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
*/
#include <sys/cdefs.h>
#ifndef lint
#if 0
static const char rcsid[] _U_ =
"@(#) Header: /tcpdump/master/tcpdump/print-arp.c,v 1.66 2006-03-03 22:53:21 hannes Exp (LBL)";
#else
__RCSID("$NetBSD: print-arp.c,v 1.2 2010/12/05 05:11:30 christos Exp $");
#endif
#endif
#ifdef HAVE_CONFIG_H

View File

@ -1,4 +1,4 @@
/* $NetBSD: print-ascii.c,v 1.1.1.1 2010/12/05 03:15:09 christos Exp $ */
/* NetBSD: print-ascii.c,v 1.1 1999/09/30 14:49:12 sjg Exp */
/*-
* Copyright (c) 1997, 1998 The NetBSD Foundation, Inc.
@ -15,13 +15,6 @@
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. All advertising materials mentioning features or use of this software
* must display the following acknowledgement:
* This product includes software developed by the NetBSD
* Foundation, Inc. and its contributors.
* 4. Neither the name of The NetBSD Foundation 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 BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
* ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
@ -40,9 +33,14 @@
#include "config.h"
#endif
#include <sys/cdefs.h>
#ifndef lint
#if 0
static const char rcsid[] _U_ =
"@(#) Header: /tcpdump/master/tcpdump/print-ascii.c,v 1.17 2005-07-06 20:53:32 guy Exp";
#else
__RCSID("$NetBSD: print-ascii.c,v 1.2 2010/12/05 05:11:30 christos Exp $");
#endif
#endif
#include <tcpdump-stdinc.h>
#include <stdio.h>

View File

@ -21,9 +21,14 @@
* Format and print AppleTalk packets.
*/
#include <sys/cdefs.h>
#ifndef lint
#if 0
static const char rcsid[] _U_ =
"@(#) Header: /tcpdump/master/tcpdump/print-atalk.c,v 1.81 2004-05-01 09:41:50 hannes Exp (LBL)";
#else
__RCSID("$NetBSD: print-atalk.c,v 1.2 2010/12/05 05:11:30 christos Exp $");
#endif
#endif
#ifdef HAVE_CONFIG_H

View File

@ -18,9 +18,14 @@
* WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
*/
#include <sys/cdefs.h>
#ifndef lint
#if 0
static const char rcsid[] _U_ =
"@(#) Header: /tcpdump/master/tcpdump/print-atm.c,v 1.49 2007-10-22 19:37:51 guy Exp (LBL)";
#else
__RCSID("$NetBSD: print-atm.c,v 1.2 2010/12/05 05:11:30 christos Exp $");
#endif
#endif
#ifdef HAVE_CONFIG_H

View File

@ -9,9 +9,14 @@
*
*/
#include <sys/cdefs.h>
#ifndef lint
#if 0
static const char rcsid[] _U_ =
"@(#) Header: /tcpdump/master/tcpdump/print-beep.c,v 1.6 2003-11-16 09:36:13 guy Exp";
#else
__RCSID("$NetBSD: print-beep.c,v 1.2 2010/12/05 05:11:30 christos Exp $");
#endif
#endif
#ifdef HAVE_CONFIG_H

View File

@ -13,9 +13,14 @@
* Original code by Hannes Gredler (hannes@juniper.net)
*/
#include <sys/cdefs.h>
#ifndef lint
#if 0
static const char rcsid[] _U_ =
"@(#) Header: /tcpdump/master/tcpdump/print-bfd.c,v 1.10 2006-02-02 06:35:52 hannes Exp";
#else
__RCSID("$NetBSD: print-bfd.c,v 1.2 2010/12/05 05:11:30 christos Exp $");
#endif
#endif
#ifdef HAVE_CONFIG_H

View File

@ -34,9 +34,14 @@
#include "config.h"
#endif
#include <sys/cdefs.h>
#ifndef lint
#if 0
static const char rcsid[] _U_ =
"@(#) Header: /tcpdump/master/tcpdump/print-bgp.c,v 1.118 2007-12-07 15:54:52 hannes Exp";
#else
__RCSID("$NetBSD: print-bgp.c,v 1.2 2010/12/05 05:11:30 christos Exp $");
#endif
#endif
#include <tcpdump-stdinc.h>

View File

@ -20,9 +20,14 @@
*
* Format and print bootp packets.
*/
#include <sys/cdefs.h>
#ifndef lint
#if 0
static const char rcsid[] _U_ =
"@(#) Header: /tcpdump/master/tcpdump/print-bootp.c,v 1.89 2008-04-22 09:45:08 hannes Exp (LBL)";
#else
__RCSID("$NetBSD: print-bootp.c,v 1.2 2010/12/05 05:11:30 christos Exp $");
#endif
#endif
#ifdef HAVE_CONFIG_H

View File

@ -17,9 +17,14 @@
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
*/
#include <sys/cdefs.h>
#ifndef lint
#if 0
static const char rcsid[] _U_ =
"@(#) Header: /tcpdump/master/tcpdump/print-bt.c,v 1.2 2008-09-25 21:45:50 guy Exp";
#else
__RCSID("$NetBSD: print-bt.c,v 1.2 2010/12/05 05:11:30 christos Exp $");
#endif
#endif
#ifdef HAVE_CONFIG_H

View File

@ -24,9 +24,14 @@
* http://www.cisco.com/univercd/cc/td/doc/product/lan/trsrb/frames.htm
*/
#include <sys/cdefs.h>
#ifndef lint
#if 0
static const char rcsid[] _U_ =
"@(#) Header: /tcpdump/master/tcpdump/print-cdp.c,v 1.25 2004-10-07 14:53:11 hannes Exp";
#else
__RCSID("$NetBSD: print-cdp.c,v 1.2 2010/12/05 05:11:30 christos Exp $");
#endif
#endif
#ifdef HAVE_CONFIG_H

View File

@ -17,9 +17,14 @@
* Original code by Hannes Gredler (hannes@juniper.net)
*/
#include <sys/cdefs.h>
#ifndef lint
#if 0
static const char rcsid[] _U_ =
"@(#) Header: /tcpdump/master/tcpdump/print-cfm.c,v 1.5 2007-07-24 16:01:42 hannes Exp";
#else
__RCSID("$NetBSD: print-cfm.c,v 1.2 2010/12/05 05:11:30 christos Exp $");
#endif
#endif
#ifdef HAVE_CONFIG_H

View File

@ -19,9 +19,14 @@
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
*/
#include <sys/cdefs.h>
#ifndef lint
#if 0
static const char rcsid[] _U_ =
"@(#) Header: /tcpdump/master/tcpdump/print-chdlc.c,v 1.43 2005-11-29 08:56:19 hannes Exp (LBL)";
#else
__RCSID("$NetBSD: print-chdlc.c,v 1.2 2010/12/05 05:11:30 christos Exp $");
#endif
#endif
#ifdef HAVE_CONFIG_H

View File

@ -20,9 +20,14 @@
*
*/
#include <sys/cdefs.h>
#ifndef lint
#if 0
static const char rcsid[] _U_ =
"@(#) Header: /tcpdump/master/tcpdump/print-cip.c,v 1.26 2005-07-07 01:22:17 guy Exp (LBL)";
#else
__RCSID("$NetBSD: print-cip.c,v 1.2 2010/12/05 05:11:30 christos Exp $");
#endif
#endif
#ifdef HAVE_CONFIG_H

View File

@ -12,11 +12,6 @@
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. All advertising materials mentioning features or use of this software
* must display the following acknowledgement:
* This product includes software developed by Michael Shalayeff.
* 4. The name of the author may not be used to endorse or promote products
* derived from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
@ -32,9 +27,14 @@
/* Cisco NetFlow protocol */
#include <sys/cdefs.h>
#ifndef lint
#if 0
static const char rcsid[] _U_ =
"@(#) Header: /tcpdump/master/tcpdump/print-cnfp.c,v 1.17 2005-04-20 20:53:18 guy Exp";
#else
__RCSID("$NetBSD: print-cnfp.c,v 1.2 2010/12/05 05:11:30 christos Exp $");
#endif
#endif
#ifdef HAVE_CONFIG_H

View File

@ -7,9 +7,14 @@
* BSD-style license that accompanies tcpdump or the GNU GPL version 2
*/
#include <sys/cdefs.h>
#ifndef lint
#if 0
static const char rcsid[] _U_ =
"@(#) Header: /tcpdump/master/tcpdump/print-dccp.c,v 1.8 2007-11-09 00:44:09 guy Exp (LBL)";
#else
__RCSID("$NetBSD: print-dccp.c,v 1.2 2010/12/05 05:11:30 christos Exp $");
#endif
#endif
#ifdef HAVE_CONFIG_H

View File

@ -19,9 +19,14 @@
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
*/
#include <sys/cdefs.h>
#ifndef lint
#if 0
static const char rcsid[] _U_ =
"@(#) Header: /tcpdump/master/tcpdump/print-decnet.c,v 1.39 2005-05-06 02:16:26 guy Exp (LBL)";
#else
__RCSID("$NetBSD: print-decnet.c,v 1.2 2010/12/05 05:11:30 christos Exp $");
#endif
#endif
#ifdef HAVE_CONFIG_H

View File

@ -38,9 +38,14 @@
* RFC4280,
*/
#include <sys/cdefs.h>
#ifndef lint
#if 0
static const char rcsid[] _U_ =
"@(#) Header: /tcpdump/master/tcpdump/print-dhcp6.c,v 1.37 2008-02-06 10:26:09 guy Exp";
#else
__RCSID("$NetBSD: print-dhcp6.c,v 1.2 2010/12/05 05:11:30 christos Exp $");
#endif
#endif
#ifdef HAVE_CONFIG_H

View File

@ -19,9 +19,14 @@
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
*/
#include <sys/cdefs.h>
#ifndef lint
#if 0
static const char rcsid[] _U_ =
"@(#) Header: /tcpdump/master/tcpdump/print-domain.c,v 1.98 2007-12-09 01:40:32 guy Exp (LBL)";
#else
__RCSID("$NetBSD: print-domain.c,v 1.2 2010/12/05 05:11:30 christos Exp $");
#endif
#endif
#ifdef HAVE_CONFIG_H

View File

@ -19,9 +19,14 @@
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
*/
#include <sys/cdefs.h>
#ifndef lint
#if 0
static const char rcsid[] _U_ =
"@(#) Header: /tcpdump/master/tcpdump/print-dvmrp.c,v 1.27 2003-11-19 09:42:04 guy Exp (LBL)";
#else
__RCSID("$NetBSD: print-dvmrp.c,v 1.2 2010/12/05 05:11:30 christos Exp $");
#endif
#endif
#ifdef HAVE_CONFIG_H

View File

@ -21,9 +21,14 @@
*
*/
#include <sys/cdefs.h>
#ifndef lint
#if 0
static const char rcsid[] _U_ =
"@(#) Header: /tcpdump/master/tcpdump/print-eap.c,v 1.5 2007-10-04 16:41:33 hannes Exp";
#else
__RCSID("$NetBSD: print-eap.c,v 1.2 2010/12/05 05:11:30 christos Exp $");
#endif
#endif
#ifdef HAVE_CONFIG_H

View File

@ -18,9 +18,14 @@
* Initial contribution from Jeff Honig (jch@MITCHELL.CIT.CORNELL.EDU).
*/
#include <sys/cdefs.h>
#ifndef lint
#if 0
static const char rcsid[] _U_ =
"@(#) Header: /tcpdump/master/tcpdump/print-egp.c,v 1.38 2006-02-11 22:13:24 hannes Exp (LBL)";
#else
__RCSID("$NetBSD: print-egp.c,v 1.2 2010/12/05 05:11:30 christos Exp $");
#endif
#endif
#ifdef HAVE_CONFIG_H

View File

@ -14,9 +14,14 @@
* FOR A PARTICULAR PURPOSE.
*/
#include <sys/cdefs.h>
#ifndef lint
#if 0
static const char rcsid[] _U_ =
"@(#) Header: /tcpdump/master/tcpdump/print-eigrp.c,v 1.7 2005-05-06 02:53:26 guy Exp";
#else
__RCSID("$NetBSD: print-eigrp.c,v 1.2 2010/12/05 05:11:30 christos Exp $");
#endif
#endif
#ifdef HAVE_CONFIG_H

View File

@ -21,9 +21,14 @@
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
*/
#include <sys/cdefs.h>
#ifndef lint
#if 0
static const char rcsid[] _U_ =
"@(#) Header: /tcpdump/master/tcpdump/print-enc.c,v 1.6 2008-11-18 07:35:32 guy Exp (LBL)";
#else
__RCSID("$NetBSD: print-enc.c,v 1.2 2010/12/05 05:11:30 christos Exp $");
#endif
#endif
#ifdef HAVE_CONFIG_H

View File

@ -1,4 +1,4 @@
/* $NetBSD: print-esp.c,v 1.1.1.1 2010/12/05 03:15:15 christos Exp $ */
/* NetBSD: print-ah.c,v 1.4 1996/05/20 00:41:16 fvdl Exp */
/*
* Copyright (c) 1988, 1989, 1990, 1991, 1992, 1993, 1994
@ -21,9 +21,14 @@
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
*/
#include <sys/cdefs.h>
#ifndef lint
#if 0
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.2 2010/12/05 05:11:30 christos Exp $");
#endif
#endif
#ifdef HAVE_CONFIG_H

View File

@ -18,9 +18,14 @@
* WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
*/
#include <sys/cdefs.h>
#ifndef lint
#if 0
static const char rcsid[] _U_ =
"@(#) Header: /tcpdump/master/tcpdump/print-ether.c,v 1.106 2008-02-06 10:47:53 guy Exp (LBL)";
#else
__RCSID("$NetBSD: print-ether.c,v 1.2 2010/12/05 05:11:30 christos Exp $");
#endif
#endif
#ifdef HAVE_CONFIG_H

View File

@ -19,9 +19,14 @@
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
*/
#include <sys/cdefs.h>
#ifndef lint
#if 0
static const char rcsid[] _U_ =
"@(#) Header: /tcpdump/master/tcpdump/print-fddi.c,v 1.66 2005-11-13 12:12:41 guy Exp (LBL)";
#else
__RCSID("$NetBSD: print-fddi.c,v 1.2 2010/12/05 05:11:30 christos Exp $");
#endif
#endif
#ifdef HAVE_CONFIG_H

View File

@ -19,9 +19,14 @@
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
*/
#include <sys/cdefs.h>
#ifndef lint
#if 0
static const char rcsid[] _U_ =
"@(#)Header: /tcpdump/master/tcpdump/print-fr.c,v 1.51 2006-06-23 22:20:32 hannes Exp (LBL)";
#else
__RCSID("$NetBSD: print-fr.c,v 1.2 2010/12/05 05:11:30 christos Exp $");
#endif
#endif
#ifdef HAVE_CONFIG_H

View File

@ -19,9 +19,14 @@
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
*/
#include <sys/cdefs.h>
#ifndef lint
#if 0
static const char rcsid[] _U_ =
"@(#) Header: /tcpdump/master/tcpdump/print-frag6.c,v 1.20 2005-04-20 22:33:06 guy Exp";
#else
__RCSID("$NetBSD: print-frag6.c,v 1.2 2010/12/05 05:11:30 christos Exp $");
#endif
#endif
#ifdef HAVE_CONFIG_H

View File

@ -36,9 +36,14 @@
* RFC1701 (GRE), RFC1702 (GRE IPv4), and RFC2637 (Enhanced GRE)
*/
#include <sys/cdefs.h>
#ifndef lint
#if 0
static const char rcsid[] _U_ =
"@(#) Header: /tcpdump/master/tcpdump/print-gre.c,v 1.28 2005-04-06 21:32:39 mcr Exp (LBL)";
#else
__RCSID("$NetBSD: print-gre.c,v 1.2 2010/12/05 05:11:30 christos Exp $");
#endif
#endif
#ifdef HAVE_CONFIG_H

View File

@ -29,9 +29,14 @@
/* Cisco Hot Standby Router Protocol (HSRP). */
#include <sys/cdefs.h>
#ifndef lint
#if 0
static const char rcsid[] _U_ =
"@(#) Header: /tcpdump/master/tcpdump/print-hsrp.c,v 1.10 2005-05-06 07:56:52 guy Exp";
#else
__RCSID("$NetBSD: print-hsrp.c,v 1.2 2010/12/05 05:11:30 christos Exp $");
#endif
#endif
#ifdef HAVE_CONFIG_H

View File

@ -19,9 +19,14 @@
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
*/
#include <sys/cdefs.h>
#ifndef lint
#if 0
static const char rcsid[] _U_ =
"@(#) Header: /tcpdump/master/tcpdump/print-icmp.c,v 1.87 2007-09-13 17:42:31 guy Exp (LBL)";
#else
__RCSID("$NetBSD: print-icmp.c,v 1.2 2010/12/05 05:11:30 christos Exp $");
#endif
#endif
#ifdef HAVE_CONFIG_H

View File

@ -19,9 +19,14 @@
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
*/
#include <sys/cdefs.h>
#ifndef lint
#if 0
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 $");
#endif
#endif
#ifdef HAVE_CONFIG_H

View File

@ -19,9 +19,14 @@
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
*/
#include <sys/cdefs.h>
#ifndef lint
#if 0
static const char rcsid[] _U_ =
"@(#) Header: /tcpdump/master/tcpdump/print-igmp.c,v 1.15 2004-03-24 00:59:16 guy Exp (LBL)";
#else
__RCSID("$NetBSD: print-igmp.c,v 1.2 2010/12/05 05:11:30 christos Exp $");
#endif
#endif
#ifdef HAVE_CONFIG_H

View File

@ -21,9 +21,14 @@
* Initial contribution from Francis Dupont (francis.dupont@inria.fr)
*/
#include <sys/cdefs.h>
#ifndef lint
#if 0
static const char rcsid[] _U_ =
"@(#) Header: /tcpdump/master/tcpdump/print-igrp.c,v 1.21 2005-04-20 21:01:56 guy Exp (LBL)";
#else
__RCSID("$NetBSD: print-igrp.c,v 1.2 2010/12/05 05:11:30 christos Exp $");
#endif
#endif
#ifdef HAVE_CONFIG_H

View File

@ -19,9 +19,14 @@
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
*/
#include <sys/cdefs.h>
#ifndef lint
#if 0
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.2 2010/12/05 05:11:30 christos Exp $");
#endif
#endif
#ifdef HAVE_CONFIG_H
@ -520,6 +525,10 @@ again:
pgm_print(ipds->cp, ipds->len, (const u_char *)ipds->ip);
break;
case IPPROTO_PFSYNC:
pfsync_ip_print(ipds->cp, ipds->len, (const u_char *)ipds->ip);
break;
default:
if ((proto = getprotobynumber(ipds->nh)) != NULL)
ND_PRINT((ndo, " %s", proto->p_name));

View File

@ -19,9 +19,14 @@
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
*/
#include <sys/cdefs.h>
#ifndef lint
#if 0
static const char rcsid[] _U_ =
"@(#) Header: /tcpdump/master/tcpdump/print-ip6.c,v 1.52 2007-09-21 07:05:33 hannes Exp";
#else
__RCSID("$NetBSD: print-ip6.c,v 1.2 2010/12/05 05:11:30 christos Exp $");
#endif
#endif
#ifdef HAVE_CONFIG_H

View File

@ -31,9 +31,14 @@
#include "config.h"
#endif
#include <sys/cdefs.h>
#ifndef lint
#if 0
static const char rcsid[] _U_ =
"@(#) Header: /tcpdump/master/tcpdump/print-ip6opts.c,v 1.18 2005-04-20 22:18:50 guy Exp";
#else
__RCSID("$NetBSD: print-ip6opts.c,v 1.2 2010/12/05 05:11:30 christos Exp $");
#endif
#endif
#ifdef INET6

View File

@ -19,9 +19,14 @@
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
*/
#include <sys/cdefs.h>
#ifndef lint
#if 0
static const char rcsid[] _U_ =
"@(#) Header: /tcpdump/master/tcpdump/print-ipcomp.c,v 1.20 2003-11-19 00:36:08 guy Exp";
#else
__RCSID("$NetBSD: print-ipcomp.c,v 1.2 2010/12/05 05:11:30 christos Exp $");
#endif
#endif
#ifdef HAVE_CONFIG_H

View File

@ -19,9 +19,14 @@
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
*/
#include <sys/cdefs.h>
#ifndef lint
#if 0
static const char rcsid[] _U_ =
"@(#) Header: /tcpdump/master/tcpdump/print-ipfc.c,v 1.9 2005-11-13 12:12:42 guy Exp (LBL)";
#else
__RCSID("$NetBSD: print-ipfc.c,v 1.2 2010/12/05 05:11:30 christos Exp $");
#endif
#endif
#ifdef HAVE_CONFIG_H

View File

@ -22,9 +22,14 @@
* Contributed by Brad Parker (brad@fcr.com).
*/
#include <sys/cdefs.h>
#ifndef lint
#if 0
static const char rcsid[] _U_ =
"@(#) Header: /tcpdump/master/tcpdump/print-ipx.c,v 1.42 2005-05-06 08:26:44 guy Exp";
#else
__RCSID("$NetBSD: print-ipx.c,v 1.2 2010/12/05 05:11:30 christos Exp $");
#endif
#endif
#ifdef HAVE_CONFIG_H

View File

@ -28,9 +28,14 @@
*
*/
#include <sys/cdefs.h>
#ifndef lint
#if 0
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 $");
#endif
#endif
#define NETDISSECT_REWORKED

View File

@ -24,9 +24,14 @@
* complete IS-IS & CLNP support.
*/
#include <sys/cdefs.h>
#ifndef lint
#if 0
static const char rcsid[] _U_ =
"@(#) Header: /tcpdump/master/tcpdump/print-isoclns.c,v 1.165 2008-08-16 13:38:15 hannes Exp (LBL)";
#else
__RCSID("$NetBSD: print-isoclns.c,v 1.2 2010/12/05 05:11:30 christos Exp $");
#endif
#endif
#ifdef HAVE_CONFIG_H

View File

@ -15,11 +15,14 @@
* Original code by Hannes Gredler (hannes@juniper.net)
*/
#include <sys/cdefs.h>
#ifndef lint
#if 0
static const char rcsid[] _U_ =
"@(#) Header: /tcpdump/master/tcpdump/print-juniper.c,v 1.34 2007-08-29 02:31:44 mcr Exp (LBL)";
#else
__RCSID("NetBSD: print-juniper.c,v 1.3 2007/07/25 06:31:32 dogcow Exp ");
__RCSID("$NetBSD: print-juniper.c,v 1.2 2010/12/05 05:11:30 christos Exp $");
#endif
#endif
#ifdef HAVE_CONFIG_H

View File

@ -21,9 +21,14 @@
* Initial contribution from John Hawkinson (jhawk@mit.edu).
*/
#include <sys/cdefs.h>
#ifndef lint
#if 0
static const char rcsid[] _U_ =
"@(#) Header: /tcpdump/master/tcpdump/print-krb.c,v 1.23 2003-11-16 09:36:26 guy Exp";
#else
__RCSID("$NetBSD: print-krb.c,v 1.2 2010/12/05 05:11:30 christos Exp $");
#endif
#endif
#ifdef HAVE_CONFIG_H

View File

@ -21,9 +21,14 @@
* L2TP support contributed by Motonori Shindo (mshindo@mshindo.net)
*/
#include <sys/cdefs.h>
#ifndef lint
#if 0
static const char rcsid[] _U_ =
"@(#) Header: /tcpdump/master/tcpdump/print-l2tp.c,v 1.20 2006-06-23 02:03:09 hannes Exp";
#else
__RCSID("$NetBSD: print-l2tp.c,v 1.2 2010/12/05 05:11:30 christos Exp $");
#endif
#endif
#ifdef HAVE_CONFIG_H

View File

@ -20,9 +20,14 @@
*
*/
#include <sys/cdefs.h>
#ifndef lint
#if 0
static const char rcsid[] _U_ =
"@(#) Header: /tcpdump/master/tcpdump/print-lane.c,v 1.25 2005-11-13 12:12:42 guy Exp (LBL)";
#else
__RCSID("$NetBSD: print-lane.c,v 1.2 2010/12/05 05:11:30 christos Exp $");
#endif
#endif
#ifdef HAVE_CONFIG_H

View File

@ -14,9 +14,14 @@
* and Steinar Haug (sthaug@nethelp.no)
*/
#include <sys/cdefs.h>
#ifndef lint
#if 0
static const char rcsid[] _U_ =
"@(#) Header: /tcpdump/master/tcpdump/print-ldp.c,v 1.20 2006-06-23 02:03:09 hannes Exp";
#else
__RCSID("$NetBSD: print-ldp.c,v 1.2 2010/12/05 05:11:30 christos Exp $");
#endif
#endif
#ifdef HAVE_CONFIG_H

View File

@ -22,9 +22,14 @@
* with an awful lot of hacking by Jeffrey Mogul, DECWRL
*/
#include <sys/cdefs.h>
#ifndef lint
#if 0
static const char rcsid[] _U_ =
"@(#) Header: /tcpdump/master/tcpdump/print-llc.c,v 1.75 2007-04-13 09:43:11 hannes Exp";
#else
__RCSID("$NetBSD: print-llc.c,v 1.2 2010/12/05 05:11:30 christos Exp $");
#endif
#endif
#ifdef HAVE_CONFIG_H

View File

@ -18,9 +18,14 @@
* IEEE and TIA extensions by Carles Kishimoto <carles.kishimoto@gmail.com>
*/
#include <sys/cdefs.h>
#ifndef lint
#if 0
static const char rcsid[] _U_ =
"@(#) Header: /tcpdump/master/tcpdump/print-lldp.c,v 1.10 2008-03-20 09:30:56 hannes Exp";
#else
__RCSID("$NetBSD: print-lldp.c,v 1.2 2010/12/05 05:11:30 christos Exp $");
#endif
#endif
#ifdef HAVE_CONFIG_H

View File

@ -17,9 +17,14 @@
* by Manu Pathak (mapathak@cisco.com), May 2005
*/
#include <sys/cdefs.h>
#ifndef lint
#if 0
static const char rcsid[] _U_ =
"@(#) Header: /tcpdump/master/tcpdump/print-lmp.c,v 1.11 2007-08-02 17:32:49 hannes Exp";
#else
__RCSID("$NetBSD: print-lmp.c,v 1.2 2010/12/05 05:11:30 christos Exp $");
#endif
#endif
#ifdef HAVE_CONFIG_H

View File

@ -13,9 +13,14 @@
* Original code by Hannes Gredler (hannes@juniper.net)
*/
#include <sys/cdefs.h>
#ifndef lint
#if 0
static const char rcsid[] _U_ =
"@(#) Header: /tcpdump/master/tcpdump/print-lspping.c,v 1.20 2008-01-28 14:20:43 hannes Exp";
#else
__RCSID("$NetBSD: print-lspping.c,v 1.2 2010/12/05 05:11:30 christos Exp $");
#endif
#endif
#ifdef HAVE_CONFIG_H

View File

@ -17,9 +17,14 @@
* Original code by Carles Kishimoto <carles.kishimoto@gmail.com>
*/
#include <sys/cdefs.h>
#ifndef lint
#if 0
static const char rcsid[] _U_ =
"@(#) Header: /tcpdump/master/tcpdump/print-lwapp.c,v 1.1 2007-07-24 16:07:30 hannes Exp";
#else
__RCSID("$NetBSD: print-lwapp.c,v 1.2 2010/12/05 05:11:30 christos Exp $");
#endif
#endif
#ifdef HAVE_CONFIG_H

View File

@ -27,9 +27,14 @@
* SUCH DAMAGE.
*/
#include <sys/cdefs.h>
#ifndef lint
#if 0
static const char rcsid[] _U_ =
"@(#) Header: /tcpdump/master/tcpdump/print-lwres.c,v 1.13 2004-03-24 01:54:29 guy Exp (LBL)";
#else
__RCSID("$NetBSD: print-lwres.c,v 1.2 2010/12/05 05:11:30 christos Exp $");
#endif
#endif
#ifdef HAVE_CONFIG_H

View File

@ -1,4 +1,4 @@
/* $NetBSD: print-mobile.c,v 1.1.1.1 2010/12/05 03:15:24 christos Exp $ */
/* NetBSD: print-mobile.c,v 1.2 1998/09/30 08:57:01 hwr Exp */
/*
* (c) 1998 The NetBSD Foundation, Inc.
@ -40,9 +40,14 @@
#include "config.h"
#endif
#include <sys/cdefs.h>
#ifndef lint
#if 0
static const char rcsid[] _U_ =
"@(#) Header: /tcpdump/master/tcpdump/print-mobile.c,v 1.15 2004-03-24 01:58:14 guy Exp";
#else
__RCSID("$NetBSD: print-mobile.c,v 1.2 2010/12/05 05:11:30 christos Exp $");
#endif
#endif
#include <tcpdump-stdinc.h>

View File

@ -31,9 +31,14 @@
#include "config.h"
#endif
#include <sys/cdefs.h>
#ifndef lint
#if 0
static const char rcsid[] _U_ =
"@(#) Header: /tcpdump/master/tcpdump/print-mobility.c,v 1.12 2005-04-20 22:21:00 guy Exp";
#else
__RCSID("$NetBSD: print-mobility.c,v 1.2 2010/12/05 05:11:30 christos Exp $");
#endif
#endif
#ifdef INET6

View File

@ -17,9 +17,14 @@
* Original code by Hannes Gredler (hannes@juniper.net)
*/
#include <sys/cdefs.h>
#ifndef lint
#if 0
static const char rcsid[] _U_ =
"@(#) Header: /tcpdump/master/tcpdump/print-mpcp.c,v 1.2 2006-02-10 17:24:55 hannes Exp";
#else
__RCSID("$NetBSD: print-mpcp.c,v 1.2 2010/12/05 05:11:30 christos Exp $");
#endif
#endif
#ifdef HAVE_CONFIG_H

View File

@ -26,9 +26,14 @@
* SUCH DAMAGE.
*/
#include <sys/cdefs.h>
#ifndef lint
#if 0
static const char rcsid[] _U_ =
"@(#) Header: /tcpdump/master/tcpdump/print-mpls.c,v 1.14 2005-07-05 09:38:19 hannes Exp (LBL)";
#else
__RCSID("$NetBSD: print-mpls.c,v 1.2 2010/12/05 05:11:30 christos Exp $");
#endif
#endif
#ifdef HAVE_CONFIG_H

View File

@ -15,9 +15,14 @@
* LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
* FOR A PARTICULAR PURPOSE.
*/
#include <sys/cdefs.h>
#ifndef lint
#if 0
static const char rcsid[] _U_ =
"@(#) Header: /tcpdump/master/tcpdump/print-msdp.c,v 1.7 2005-04-06 21:32:41 mcr Exp";
#else
__RCSID("$NetBSD: print-msdp.c,v 1.2 2010/12/05 05:11:30 christos Exp $");
#endif
#endif
#ifdef HAVE_CONFIG_H

View File

@ -22,9 +22,14 @@
* Contributed by Brad Parker (brad@fcr.com).
*/
#include <sys/cdefs.h>
#ifndef lint
#if 0
static const char rcsid[] _U_ =
"@(#) Header: /tcpdump/master/tcpdump/print-netbios.c,v 1.20 2003-11-16 09:36:29 guy Exp";
#else
__RCSID("$NetBSD: print-netbios.c,v 1.2 2010/12/05 05:11:30 christos Exp $");
#endif
#endif
#ifdef HAVE_CONFIG_H

View File

@ -19,9 +19,14 @@
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
*/
#include <sys/cdefs.h>
#ifndef lint
#if 0
static const char rcsid[] _U_ =
"@(#) Header: /tcpdump/master/tcpdump/print-nfs.c,v 1.111 2007-12-22 03:08:04 guy Exp (LBL)";
#else
__RCSID("$NetBSD: print-nfs.c,v 1.2 2010/12/05 05:11:30 christos Exp $");
#endif
#endif
#ifdef HAVE_CONFIG_H

View File

@ -23,9 +23,14 @@
* loosely based on print-bootp.c
*/
#include <sys/cdefs.h>
#ifndef lint
#if 0
static const char rcsid[] _U_ =
"@(#) Header: /tcpdump/master/tcpdump/print-ntp.c,v 1.43 2007-11-30 13:45:10 hannes Exp (LBL)";
#else
__RCSID("$NetBSD: print-ntp.c,v 1.2 2010/12/05 05:11:30 christos Exp $");
#endif
#endif
#ifdef HAVE_CONFIG_H

View File

@ -19,9 +19,14 @@
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
*/
#include <sys/cdefs.h>
#ifndef lint
#if 0
static const char rcsid[] _U_ =
"@(#) Header: /tcpdump/master/tcpdump/print-null.c,v 1.57 2006-03-23 14:58:44 hannes Exp (LBL)";
#else
__RCSID("$NetBSD: print-null.c,v 1.2 2010/12/05 05:11:30 christos Exp $");
#endif
#endif
#ifdef HAVE_CONFIG_H

View File

@ -21,9 +21,14 @@
* OSPF support contributed by Jeffrey Honig (jch@mitchell.cit.cornell.edu)
*/
#include <sys/cdefs.h>
#ifndef lint
#if 0
static const char rcsid[] _U_ =
"@(#) Header: /tcpdump/master/tcpdump/print-ospf.c,v 1.66 2007-10-08 07:53:21 hannes Exp (LBL)";
#else
__RCSID("$NetBSD: print-ospf.c,v 1.2 2010/12/05 05:11:30 christos Exp $");
#endif
#endif
#ifdef HAVE_CONFIG_H

View File

@ -21,9 +21,14 @@
* OSPF support contributed by Jeffrey Honig (jch@mitchell.cit.cornell.edu)
*/
#include <sys/cdefs.h>
#ifndef lint
#if 0
static const char rcsid[] _U_ =
"@(#) Header: /tcpdump/master/tcpdump/print-ospf6.c,v 1.15 2006-09-13 06:31:11 guy Exp (LBL)";
#else
__RCSID("$NetBSD: print-ospf6.c,v 1.2 2010/12/05 05:11:30 christos Exp $");
#endif
#endif
#ifdef HAVE_CONFIG_H

Some files were not shown because too many files have changed in this diff Show More