aboutsummaryrefslogtreecommitdiff
path: root/print-symantec.c
diff options
context:
space:
mode:
authorGleb Smirnoff <glebius@FreeBSD.org>2017-01-31 19:17:06 +0000
committerGleb Smirnoff <glebius@FreeBSD.org>2017-01-31 19:17:06 +0000
commitd79b843cb78484ea27f877f1541055e1a6a5a4d3 (patch)
tree57b11b7f3aa68244815f4469b548fcab0c5c3e78 /print-symantec.c
parent1bf4ba1024df1c302debe8156a60a9dfafb149ee (diff)
downloadsrc-d79b843cb78484ea27f877f1541055e1a6a5a4d3.tar.gz
src-d79b843cb78484ea27f877f1541055e1a6a5a4d3.zip
Import tcpdump-4.9.0 into dist.
Notes
Notes: svn path=/vendor/tcpdump/dist/; revision=313024
Diffstat (limited to 'print-symantec.c')
-rw-r--r--print-symantec.c17
1 files changed, 9 insertions, 8 deletions
diff --git a/print-symantec.c b/print-symantec.c
index dcff2a66bf05..9e9f8f33f06d 100644
--- a/print-symantec.c
+++ b/print-symantec.c
@@ -19,14 +19,15 @@
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
*/
-#define NETDISSECT_REWORKED
+/* \summary: Symantec Enterprise Firewall printer */
+
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
-#include <tcpdump-stdinc.h>
+#include <netdissect-stdinc.h>
-#include "interface.h"
+#include "netdissect.h"
#include "extract.h"
#include "ethertype.h"
@@ -75,7 +76,7 @@ symantec_if_print(netdissect_options *ndo, const struct pcap_pkthdr *h, const u_
{
u_int length = h->len;
u_int caplen = h->caplen;
- struct symantec_header *sp;
+ const struct symantec_header *sp;
u_short ether_type;
if (caplen < sizeof (struct symantec_header)) {
@@ -88,7 +89,7 @@ symantec_if_print(netdissect_options *ndo, const struct pcap_pkthdr *h, const u_
length -= sizeof (struct symantec_header);
caplen -= sizeof (struct symantec_header);
- sp = (struct symantec_header *)p;
+ sp = (const struct symantec_header *)p;
p += sizeof (struct symantec_header);
ether_type = EXTRACT_16BITS(&sp->ether_type);
@@ -96,14 +97,14 @@ symantec_if_print(netdissect_options *ndo, const struct pcap_pkthdr *h, const u_
if (ether_type <= ETHERMTU) {
/* ether_type not known, print raw packet */
if (!ndo->ndo_eflag)
- symantec_hdr_print(ndo, (u_char *)sp, length + sizeof (struct symantec_header));
+ symantec_hdr_print(ndo, (const u_char *)sp, length + sizeof (struct symantec_header));
if (!ndo->ndo_suppress_default_print)
ND_DEFAULTPRINT(p, caplen);
- } else if (ethertype_print(ndo, ether_type, p, length, caplen) == 0) {
+ } else if (ethertype_print(ndo, ether_type, p, length, caplen, NULL, NULL) == 0) {
/* ether_type not known, print raw packet */
if (!ndo->ndo_eflag)
- symantec_hdr_print(ndo, (u_char *)sp, length + sizeof (struct symantec_header));
+ symantec_hdr_print(ndo, (const u_char *)sp, length + sizeof (struct symantec_header));
if (!ndo->ndo_suppress_default_print)
ND_DEFAULTPRINT(p, caplen);