X-Git-Url: https://git.tcpdump.org/tcpdump/blobdiff_plain/38700c7f24646dfbc6ac0ed529d3ed727c545cd0..1fb50928ce27360c1c987312774f686b23c69b51:/print-symantec.c diff --git a/print-symantec.c b/print-symantec.c index 665dbcc2..9e9f8f33 100644 --- a/print-symantec.c +++ b/print-symantec.c @@ -19,13 +19,15 @@ * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. */ +/* \summary: Symantec Enterprise Firewall printer */ + #ifdef HAVE_CONFIG_H #include "config.h" #endif -#include +#include -#include "interface.h" +#include "netdissect.h" #include "extract.h" #include "ethertype.h" @@ -74,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)) { @@ -87,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); @@ -95,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);