diff options
author | Francois-Xavier Le Bail <devel.fx.lebail@orange.fr> | 2018-03-14 16:54:17 +0100 |
---|---|---|
committer | Francois-Xavier Le Bail <devel.fx.lebail@orange.fr> | 2018-03-16 19:44:47 +0100 |
commit | 546558eabd81cfc36a81a4df728fdfea0d83b41a (patch) | |
tree | 1c73014ecfb7653ffaf4bfa1855ace7d6bd6e33e /print-802_11.c | |
parent | 61f71d2046ced967e1bd998d41c68faf512f75ab (diff) | |
download | tcpdump-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-802_11.c')
-rw-r--r-- | print-802_11.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/print-802_11.c b/print-802_11.c index 5849a071..a3d376b6 100644 --- a/print-802_11.c +++ b/print-802_11.c @@ -2016,6 +2016,7 @@ ieee802_11_print(netdissect_options *ndo, struct lladdr_info src, dst; int llc_hdrlen; + ndo->ndo_protocol = "802.11"; caplen = orig_caplen; /* Remove FCS, if present */ if (length < fcslen) { @@ -2124,6 +2125,7 @@ u_int ieee802_11_if_print(netdissect_options *ndo, const struct pcap_pkthdr *h, const u_char *p) { + ndo->ndo_protocol = "802.11_if"; return ieee802_11_print(ndo, p, h->len, h->caplen, 0, 0); } @@ -3080,6 +3082,7 @@ ieee802_11_radio_print(netdissect_options *ndo, int pad; u_int fcslen; + ndo->ndo_protocol = "802.11_radio"; if (caplen < sizeof(*hdr)) { ND_PRINT("%s", tstr); return caplen; @@ -3257,6 +3260,7 @@ ieee802_11_radio_avs_print(netdissect_options *ndo, { uint32_t caphdr_len; + ndo->ndo_protocol = "802.11_radio_avs"; if (caplen < 8) { ND_PRINT("%s", tstr); return caplen; @@ -3309,6 +3313,7 @@ prism_if_print(netdissect_options *ndo, u_int length = h->len; uint32_t msgcode; + ndo->ndo_protocol = "prism_if"; if (caplen < 4) { ND_PRINT("%s", tstr); return caplen; @@ -3336,6 +3341,7 @@ u_int ieee802_11_radio_if_print(netdissect_options *ndo, const struct pcap_pkthdr *h, const u_char *p) { + ndo->ndo_protocol = "802.11_radio_if"; return ieee802_11_radio_print(ndo, p, h->len, h->caplen); } @@ -3348,5 +3354,6 @@ u_int ieee802_11_radio_avs_if_print(netdissect_options *ndo, const struct pcap_pkthdr *h, const u_char *p) { + ndo->ndo_protocol = "802.11_radio_avs_if"; return ieee802_11_radio_avs_print(ndo, p, h->len, h->caplen); } |