/* \summary: Token Ring printer */
-#ifdef HAVE_CONFIG_H
#include <config.h>
-#endif
#include "netdissect-stdinc.h"
struct token_header {
nd_uint8_t token_ac;
nd_uint8_t token_fc;
- nd_mac_addr token_dhost;
- nd_mac_addr token_shost;
+ nd_mac48 token_dhost;
+ nd_mac48 token_shost;
nd_uint16_t token_rcf;
nd_uint16_t token_rseg[ROUTING_SEGMENT_MAX];
};
{
const char *srcname, *dstname;
- srcname = etheraddr_string(ndo, fsrc);
- dstname = etheraddr_string(ndo, fdst);
+ srcname = mac48_string(ndo, fsrc);
+ dstname = mac48_string(ndo, fdst);
if (!ndo->ndo_qflag)
ND_PRINT("%02x %02x ",
{
const struct token_header *trp;
int llc_hdrlen;
- nd_mac_addr srcmac, dstmac;
+ nd_mac48 srcmac, dstmac;
struct lladdr_info src, dst;
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) {
}
src.addr = srcmac;
- src.addr_string = etheraddr_string;
+ src.addr_string = mac48_string;
dst.addr = dstmac;
- dst.addr_string = etheraddr_string;
+ dst.addr_string = mac48_string;
/* Skip over token ring MAC header and routing information */
length -= hdr_len;
* '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);
}