summaryrefslogtreecommitdiffstats
path: root/contrib/tcpdump/print-null.c
diff options
context:
space:
mode:
authorfenner <fenner@FreeBSD.org>1998-09-15 19:46:59 +0000
committerfenner <fenner@FreeBSD.org>1998-09-15 19:46:59 +0000
commit03014afd0377fb8957d9c87572c96a6096b14d45 (patch)
tree06d0bbbc70fe36db13ceefd086607351b3abea15 /contrib/tcpdump/print-null.c
parent577b5b88b39bedc51620403e37d7e98cceb75351 (diff)
downloadFreeBSD-src-03014afd0377fb8957d9c87572c96a6096b14d45.zip
FreeBSD-src-03014afd0377fb8957d9c87572c96a6096b14d45.tar.gz
Merge tcpdump 3.4
PR: bin/7877
Diffstat (limited to 'contrib/tcpdump/print-null.c')
-rw-r--r--contrib/tcpdump/print-null.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/contrib/tcpdump/print-null.c b/contrib/tcpdump/print-null.c
index cf845d4..f1469ab 100644
--- a/contrib/tcpdump/print-null.c
+++ b/contrib/tcpdump/print-null.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1991, 1993, 1994, 1995, 1996
+ * Copyright (c) 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: print-null.c,v 1.22 96/12/10 23:18:58 leres Exp $ (LBL)";
+ "@(#) $Header: print-null.c,v 1.24 97/05/28 12:52:47 leres Exp $ (LBL)";
#endif
#include <sys/param.h>
@@ -50,15 +50,19 @@ struct rtentry;
#include <stdio.h>
#include <string.h>
-#include "addrtoname.h"
#include "interface.h"
-
-#define NULL_HDRLEN 4
+#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
+ * order 32 bit integer that specifies the family, e.g. AF_INET
+ */
+#define NULL_HDRLEN 4
+
static void
null_print(const u_char *p, const struct ip *ip, u_int length)
{
OpenPOWER on IntegriCloud