}
const char *
-mac64_string(netdissect_options *ndo, const uint8_t *ep)
+mac48_string(netdissect_options *ndo, const uint8_t *ep)
{
int i;
char *cp;
return ("<empty>");
if (type == LINKADDR_MAC48 && len == MAC48_LEN)
- return (mac64_string(ndo, ep));
+ return (mac48_string(ndo, ep));
if (type == LINKADDR_FRELAY)
return (q922_string(ndo, ep, len));
* Initialize the ethers hash table. We take two different approaches
* depending on whether or not the system provides the ethers name
* service. If it does, we just wire in a few names at startup,
- * and mac64_string() fills in the table on demand. If it doesn't,
+ * and mac48_string() fills in the table on demand. If it doesn't,
* then we suck in the entire /etc/ethers file at startup. The idea
* is that parsing the local file will be fast, but spinning through
* all the ethers entries via NIS & next_etherent might be very slow.
/*
* Use YP/NIS version of name if available.
*/
- /* Same workaround as in mac64_string(). */
+ /* Same workaround as in mac48_string(). */
struct ether_addr ea;
memcpy (&ea, el->addr, MAC48_LEN);
if (ether_ntohost(name, &ea) == 0) {
#define BUFSIZE 128
extern const char *linkaddr_string(netdissect_options *, const uint8_t *, const unsigned int, const unsigned int);
-extern const char *mac64_string(netdissect_options *, const uint8_t *);
+extern const char *mac48_string(netdissect_options *, const uint8_t *);
extern const char *eui64_string(netdissect_options *, const uint8_t *);
extern const char *eui64le_string(netdissect_options *, const uint8_t *);
extern const char *tcpport_string(netdissect_options *, u_short);
}
static inline const char *
-get_mac64_string(netdissect_options *ndo, const uint8_t *p)
+get_mac48_string(netdissect_options *ndo, const uint8_t *p)
{
if (!ND_TTEST_LEN(p, MAC48_LEN))
nd_trunc_longjmp(ndo);
- return mac64_string(ndo, p);
+ return mac48_string(ndo, p);
}
static inline const char *
}
#define GET_LINKADDR_STRING(p, type, len) get_linkaddr_string(ndo, (const u_char *)(p), type, len)
-#define GET_MAC48_STRING(p) get_mac64_string(ndo, (const u_char *)(p))
+#define GET_MAC48_STRING(p) get_mac48_string(ndo, (const u_char *)(p))
#define GET_EUI64_STRING(p) get_eui64_string(ndo, (const u_char *)(p))
#define GET_EUI64LE_STRING(p) get_eui64le_string(ndo, (const u_char *)(p))
#define GET_ISONSAP_STRING(nsap, nsap_length) get_isonsap_string(ndo, (const u_char *)(nsap), nsap_length)
ret = parse_elements(ndo, &pbody, p, offset, length);
PRINT_SSID(pbody);
- ND_PRINT(" AP : %s", mac64_string(ndo, pbody.ap ));
+ ND_PRINT(" AP : %s", mac48_string(ndo, pbody.ap ));
return ret;
trunc:
caplen -= hdrlen;
p += hdrlen;
- src.addr_string = mac64_string;
- dst.addr_string = mac64_string;
+ src.addr_string = mac48_string;
+ dst.addr_string = mac48_string;
switch (FC_TYPE(fc)) {
case T_MGMT:
get_mgmt_src_dst_mac(p - hdrlen, &src.addr, &dst.addr);
*/
ehp = (const struct ether_header *)p;
src.addr = ehp->ether_shost;
- src.addr_string = mac64_string;
+ src.addr_string = mac48_string;
dst.addr = ehp->ether_dhost;
- dst.addr_string = mac64_string;
+ dst.addr_string = mac48_string;
length -= 2*MAC48_LEN;
caplen -= 2*MAC48_LEN;
{
const char *srcname, *dstname;
- srcname = mac64_string(ndo, fsrc);
- dstname = mac64_string(ndo, fdst);
+ srcname = mac48_string(ndo, fsrc);
+ dstname = mac48_string(ndo, fdst);
if (!ndo->ndo_qflag)
print_fddi_fc(ndo, GET_U_1(fddip->fddi_fc));
fddi_hdr_print(ndo, fddip, length, srcmac, dstmac);
src.addr = srcmac;
- src.addr_string = mac64_string;
+ src.addr_string = mac48_string;
dst.addr = dstmac;
- dst.addr_string = mac64_string;
+ dst.addr_string = mac48_string;
/* Skip over FDDI MAC header */
length -= FDDI_HDRLEN;
{
const char *srcname, *dstname;
- srcname = mac64_string(ndo, ipfcsrc);
- dstname = mac64_string(ndo, ipfcdst);
+ srcname = mac48_string(ndo, ipfcsrc);
+ dstname = mac48_string(ndo, ipfcdst);
/*
* XXX - should we show the upper 16 bits of the addresses?
ipfc_hdr_print(ndo, ipfcp, length, srcmac, dstmac);
src.addr = srcmac;
- src.addr_string = mac64_string;
+ src.addr_string = mac48_string;
dst.addr = dstmac;
- dst.addr_string = mac64_string;
+ dst.addr_string = mac48_string;
/* Skip over Network_Header */
length -= IPFC_HDRLEN;
case AFNUM_802:
if (len < MAC48_LEN)
return NULL;
- pfunc = mac64_string;
+ pfunc = mac48_string;
break;
default:
pfunc = NULL;
{
const char *srcname, *dstname;
- srcname = mac64_string(ndo, fsrc);
- dstname = mac64_string(ndo, fdst);
+ srcname = mac48_string(ndo, fsrc);
+ dstname = mac48_string(ndo, fdst);
if (!ndo->ndo_qflag)
ND_PRINT("%02x %02x ",
}
src.addr = srcmac;
- src.addr_string = mac64_string;
+ src.addr_string = mac48_string;
dst.addr = dstmac;
- dst.addr_string = mac64_string;
+ dst.addr_string = mac48_string;
/* Skip over token ring MAC header and routing information */
length -= hdr_len;