X-Git-Url: https://git.tcpdump.org/tcpdump/blobdiff_plain/b751376719cfe1924aa07ab8fd364ec1a55c04b3..4da3308f277b7cb520a0edf43b2cca2bc0ed2e29:/print-dsa.c diff --git a/print-dsa.c b/print-dsa.c index 7dad9e2a..1ed9acf6 100644 --- a/print-dsa.c +++ b/print-dsa.c @@ -83,7 +83,7 @@ #define DSA_RX_SNIFF(tag) TOK(tag, 1, 0x04, 2) #define DSA_CFI(tag) TOK(tag, 1, 0x01, 0) #define DSA_PRI(tag) TOK(tag, 2, 0xe0, 5) -#define DSA_VID(tag) ((u_short)((TOK(tag, 2, 0xe0, 5) << 8) | (TOK(tag, 3, 0xff, 0)))) +#define DSA_VID(tag) ((u_short)((TOK(tag, 2, 0x0f, 0) << 8) | (TOK(tag, 3, 0xff, 0)))) #define DSA_CODE(tag) ((TOK(tag, 1, 0x06, 1) << 1) | TOK(tag, 2, 0x10, 4)) #define EDSA_LEN 8 @@ -196,24 +196,24 @@ edsa_tag_print(netdissect_options *ndo, const u_char *bp) tag_common_print(ndo, p); } -u_int +void dsa_if_print(netdissect_options *ndo, const struct pcap_pkthdr *h, const u_char *p) { u_int caplen = h->caplen; u_int length = h->len; ndo->ndo_protocol = "dsa"; - return (ether_switch_tag_print(ndo, p, length, caplen, - dsa_tag_print, DSA_LEN)); + ndo->ndo_ll_hdr_len += + ether_switch_tag_print(ndo, p, length, caplen, dsa_tag_print, DSA_LEN); } -u_int +void edsa_if_print(netdissect_options *ndo, const struct pcap_pkthdr *h, const u_char *p) { u_int caplen = h->caplen; u_int length = h->len; ndo->ndo_protocol = "edsa"; - return (ether_switch_tag_print(ndo, p, length, caplen, - edsa_tag_print, EDSA_LEN)); + ndo->ndo_ll_hdr_len += + ether_switch_tag_print(ndo, p, length, caplen, edsa_tag_print, EDSA_LEN); }