Skip to content

Commit 977aa95

Browse files
committed
MAC-48, not MAC-64.
1 parent 7865163 commit 977aa95

File tree

8 files changed

+26
-26
lines changed

8 files changed

+26
-26
lines changed

addrtoname.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -589,7 +589,7 @@ lookup_protoid(netdissect_options *ndo, const u_char *pi)
589589
}
590590

591591
const char *
592-
mac64_string(netdissect_options *ndo, const uint8_t *ep)
592+
mac48_string(netdissect_options *ndo, const uint8_t *ep)
593593
{
594594
int i;
595595
char *cp;
@@ -691,7 +691,7 @@ linkaddr_string(netdissect_options *ndo, const uint8_t *ep,
691691
return ("<empty>");
692692

693693
if (type == LINKADDR_MAC48 && len == MAC48_LEN)
694-
return (mac64_string(ndo, ep));
694+
return (mac48_string(ndo, ep));
695695

696696
if (type == LINKADDR_FRELAY)
697697
return (q922_string(ndo, ep, len));
@@ -949,7 +949,7 @@ static const struct etherlist {
949949
* Initialize the ethers hash table. We take two different approaches
950950
* depending on whether or not the system provides the ethers name
951951
* service. If it does, we just wire in a few names at startup,
952-
* and mac64_string() fills in the table on demand. If it doesn't,
952+
* and mac48_string() fills in the table on demand. If it doesn't,
953953
* then we suck in the entire /etc/ethers file at startup. The idea
954954
* is that parsing the local file will be fast, but spinning through
955955
* all the ethers entries via NIS & next_etherent might be very slow.
@@ -995,7 +995,7 @@ init_etherarray(netdissect_options *ndo)
995995
/*
996996
* Use YP/NIS version of name if available.
997997
*/
998-
/* Same workaround as in mac64_string(). */
998+
/* Same workaround as in mac48_string(). */
999999
struct ether_addr ea;
10001000
memcpy (&ea, el->addr, MAC48_LEN);
10011001
if (ether_ntohost(name, &ea) == 0) {

addrtoname.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ enum {
4747
#define BUFSIZE 128
4848

4949
extern const char *linkaddr_string(netdissect_options *, const uint8_t *, const unsigned int, const unsigned int);
50-
extern const char *mac64_string(netdissect_options *, const uint8_t *);
50+
extern const char *mac48_string(netdissect_options *, const uint8_t *);
5151
extern const char *eui64_string(netdissect_options *, const uint8_t *);
5252
extern const char *eui64le_string(netdissect_options *, const uint8_t *);
5353
extern const char *tcpport_string(netdissect_options *, u_short);
@@ -79,11 +79,11 @@ get_linkaddr_string(netdissect_options *ndo, const uint8_t *p,
7979
}
8080

8181
static inline const char *
82-
get_mac64_string(netdissect_options *ndo, const uint8_t *p)
82+
get_mac48_string(netdissect_options *ndo, const uint8_t *p)
8383
{
8484
if (!ND_TTEST_LEN(p, MAC48_LEN))
8585
nd_trunc_longjmp(ndo);
86-
return mac64_string(ndo, p);
86+
return mac48_string(ndo, p);
8787
}
8888

8989
static inline const char *
@@ -128,7 +128,7 @@ get_ip6addr_string(netdissect_options *ndo, const u_char *p)
128128
}
129129

130130
#define GET_LINKADDR_STRING(p, type, len) get_linkaddr_string(ndo, (const u_char *)(p), type, len)
131-
#define GET_MAC48_STRING(p) get_mac64_string(ndo, (const u_char *)(p))
131+
#define GET_MAC48_STRING(p) get_mac48_string(ndo, (const u_char *)(p))
132132
#define GET_EUI64_STRING(p) get_eui64_string(ndo, (const u_char *)(p))
133133
#define GET_EUI64LE_STRING(p) get_eui64le_string(ndo, (const u_char *)(p))
134134
#define GET_ISONSAP_STRING(nsap, nsap_length) get_isonsap_string(ndo, (const u_char *)(nsap), nsap_length)

print-802_11.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1534,7 +1534,7 @@ handle_reassoc_request(netdissect_options *ndo,
15341534
ret = parse_elements(ndo, &pbody, p, offset, length);
15351535

15361536
PRINT_SSID(pbody);
1537-
ND_PRINT(" AP : %s", mac64_string(ndo, pbody.ap ));
1537+
ND_PRINT(" AP : %s", mac48_string(ndo, pbody.ap ));
15381538

15391539
return ret;
15401540
trunc:
@@ -2272,8 +2272,8 @@ ieee802_11_print(netdissect_options *ndo,
22722272
caplen -= hdrlen;
22732273
p += hdrlen;
22742274

2275-
src.addr_string = mac64_string;
2276-
dst.addr_string = mac64_string;
2275+
src.addr_string = mac48_string;
2276+
dst.addr_string = mac48_string;
22772277
switch (FC_TYPE(fc)) {
22782278
case T_MGMT:
22792279
get_mgmt_src_dst_mac(p - hdrlen, &src.addr, &dst.addr);

print-ether.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -171,9 +171,9 @@ ether_common_print(netdissect_options *ndo, const u_char *p, u_int length,
171171
*/
172172
ehp = (const struct ether_header *)p;
173173
src.addr = ehp->ether_shost;
174-
src.addr_string = mac64_string;
174+
src.addr_string = mac48_string;
175175
dst.addr = ehp->ether_dhost;
176-
dst.addr_string = mac64_string;
176+
dst.addr_string = mac48_string;
177177

178178
length -= 2*MAC48_LEN;
179179
caplen -= 2*MAC48_LEN;

print-fddi.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -256,8 +256,8 @@ fddi_hdr_print(netdissect_options *ndo,
256256
{
257257
const char *srcname, *dstname;
258258

259-
srcname = mac64_string(ndo, fsrc);
260-
dstname = mac64_string(ndo, fdst);
259+
srcname = mac48_string(ndo, fsrc);
260+
dstname = mac48_string(ndo, fdst);
261261

262262
if (!ndo->ndo_qflag)
263263
print_fddi_fc(ndo, GET_U_1(fddip->fddi_fc));
@@ -298,9 +298,9 @@ fddi_print(netdissect_options *ndo, const u_char *p, u_int length, u_int caplen)
298298
fddi_hdr_print(ndo, fddip, length, srcmac, dstmac);
299299

300300
src.addr = srcmac;
301-
src.addr_string = mac64_string;
301+
src.addr_string = mac48_string;
302302
dst.addr = dstmac;
303-
dst.addr_string = mac64_string;
303+
dst.addr_string = mac48_string;
304304

305305
/* Skip over FDDI MAC header */
306306
length -= FDDI_HDRLEN;

print-ipfc.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -66,8 +66,8 @@ ipfc_hdr_print(netdissect_options *ndo,
6666
{
6767
const char *srcname, *dstname;
6868

69-
srcname = mac64_string(ndo, ipfcsrc);
70-
dstname = mac64_string(ndo, ipfcdst);
69+
srcname = mac48_string(ndo, ipfcsrc);
70+
dstname = mac48_string(ndo, ipfcdst);
7171

7272
/*
7373
* XXX - should we show the upper 16 bits of the addresses?
@@ -106,9 +106,9 @@ ipfc_print(netdissect_options *ndo, const u_char *p, u_int length, u_int caplen)
106106
ipfc_hdr_print(ndo, ipfcp, length, srcmac, dstmac);
107107

108108
src.addr = srcmac;
109-
src.addr_string = mac64_string;
109+
src.addr_string = mac48_string;
110110
dst.addr = dstmac;
111-
dst.addr_string = mac64_string;
111+
dst.addr_string = mac48_string;
112112

113113
/* Skip over Network_Header */
114114
length -= IPFC_HDRLEN;

print-lldp.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1362,7 +1362,7 @@ lldp_network_addr_print(netdissect_options *ndo, const u_char *tptr, u_int len)
13621362
case AFNUM_802:
13631363
if (len < MAC48_LEN)
13641364
return NULL;
1365-
pfunc = mac64_string;
1365+
pfunc = mac48_string;
13661366
break;
13671367
default:
13681368
pfunc = NULL;

print-token.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -108,8 +108,8 @@ token_hdr_print(netdissect_options *ndo,
108108
{
109109
const char *srcname, *dstname;
110110

111-
srcname = mac64_string(ndo, fsrc);
112-
dstname = mac64_string(ndo, fdst);
111+
srcname = mac48_string(ndo, fsrc);
112+
dstname = mac48_string(ndo, fdst);
113113

114114
if (!ndo->ndo_qflag)
115115
ND_PRINT("%02x %02x ",
@@ -204,9 +204,9 @@ token_print(netdissect_options *ndo, const u_char *p, u_int length, u_int caplen
204204
}
205205

206206
src.addr = srcmac;
207-
src.addr_string = mac64_string;
207+
src.addr_string = mac48_string;
208208
dst.addr = dstmac;
209-
dst.addr_string = mac64_string;
209+
dst.addr_string = mac48_string;
210210

211211
/* Skip over token ring MAC header and routing information */
212212
length -= hdr_len;

0 commit comments

Comments
 (0)