summaryrefslogtreecommitdiff
path: root/print-ether.c
diff options
context:
space:
mode:
authorFrancois-Xavier Le Bail <devel.fx.lebail@orange.fr>2018-03-14 16:54:17 +0100
committerFrancois-Xavier Le Bail <devel.fx.lebail@orange.fr>2018-03-16 19:44:47 +0100
commit546558eabd81cfc36a81a4df728fdfea0d83b41a (patch)
tree1c73014ecfb7653ffaf4bfa1855ace7d6bd6e33e /print-ether.c
parent61f71d2046ced967e1bd998d41c68faf512f75ab (diff)
downloadtcpdump-546558eabd81cfc36a81a4df728fdfea0d83b41a.tar.gz
Add the ndo_protocol field in the netdissect_options structure
Update this field in printer entry functions. It will be used for some printings.
Diffstat (limited to 'print-ether.c')
-rw-r--r--print-ether.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/print-ether.c b/print-ether.c
index 0a331d18..112c6e81 100644
--- a/print-ether.c
+++ b/print-ether.c
@@ -157,6 +157,7 @@ ether_print(netdissect_options *ndo,
int llc_hdrlen;
struct lladdr_info src, dst;
+ ndo->ndo_protocol = "ether";
if (caplen < ETHER_HDRLEN) {
ND_PRINT("[|ether]");
return (caplen);
@@ -274,6 +275,7 @@ u_int
ether_if_print(netdissect_options *ndo, const struct pcap_pkthdr *h,
const u_char *p)
{
+ ndo->ndo_protocol = "ether_if";
return (ether_print(ndo, p, h->len, h->caplen, NULL, NULL));
}
@@ -293,6 +295,7 @@ netanalyzer_if_print(netdissect_options *ndo, const struct pcap_pkthdr *h,
/*
* Fail if we don't have enough data for the Hilscher pseudo-header.
*/
+ ndo->ndo_protocol = "netanalyzer_if";
if (h->len < 4 || h->caplen < 4) {
ND_PRINT("[|netanalyzer]");
return (h->caplen);
@@ -321,6 +324,7 @@ netanalyzer_transparent_if_print(netdissect_options *ndo,
* Fail if we don't have enough data for the Hilscher pseudo-header,
* preamble, and SOF.
*/
+ ndo->ndo_protocol = "netanalyzer_transparent_if";
if (h->len < 12 || h->caplen < 12) {
ND_PRINT("[|netanalyzer-transparent]");
return (h->caplen);