]> The Tcpdump Group git mirrors - tcpdump/blobdiff - print-token.c
Include <string.h> only if required.
[tcpdump] / print-token.c
index 6a32330880863ab028dffd61318598e83119769b..bcb72584c294cbe09f47c8d3a47691e3c5920c28 100644 (file)
@@ -152,7 +152,7 @@ token_print(netdissect_options *ndo, const u_char *p, u_int length, u_int caplen
        u_int route_len = 0, hdr_len = TOKEN_HDRLEN;
        int seg;
 
-       ndo->ndo_protocol = "token";
+       ndo->ndo_protocol = "token-ring";
        trp = (const struct token_header *)p;
 
        if (caplen < TOKEN_HDRLEN) {
@@ -242,9 +242,9 @@ token_print(netdissect_options *ndo, const u_char *p, u_int length, u_int caplen
  * 'h->len' is the length of the packet off the wire, and 'h->caplen'
  * is the number of bytes actually captured.
  */
-u_int
+void
 token_if_print(netdissect_options *ndo, const struct pcap_pkthdr *h, const u_char *p)
 {
-       ndo->ndo_protocol = "token_if";
-       return (token_print(ndo, p, h->len, h->caplen));
+       ndo->ndo_protocol = "token-ring";
+       ndo->ndo_ll_hdr_len += token_print(ndo, p, h->len, h->caplen);
 }