71
71
#else /* HAVE_STRUCT_ETHER_ADDR */
72
72
struct ether_addr {
73
73
/* Beware FreeBSD calls this "octet". */
74
- unsigned char ether_addr_octet [MAC_ADDR_LEN ];
74
+ unsigned char ether_addr_octet [MAC48_LEN ];
75
75
};
76
76
#endif /* HAVE_STRUCT_ETHER_ADDR */
77
77
#endif /* what declares ether_ntohost() */
@@ -589,7 +589,7 @@ lookup_protoid(netdissect_options *ndo, const u_char *pi)
589
589
}
590
590
591
591
const char *
592
- etheraddr_string (netdissect_options * ndo , const uint8_t * ep )
592
+ mac64_string (netdissect_options * ndo , const uint8_t * ep )
593
593
{
594
594
int i ;
595
595
char * cp ;
@@ -610,7 +610,7 @@ etheraddr_string(netdissect_options *ndo, const uint8_t *ep)
610
610
*/
611
611
struct ether_addr ea ;
612
612
613
- memcpy (& ea , ep , MAC_ADDR_LEN );
613
+ memcpy (& ea , ep , MAC48_LEN );
614
614
if (ether_ntohost (buf2 , & ea ) == 0 ) {
615
615
tp -> e_name = strdup (buf2 );
616
616
if (tp -> e_name == NULL )
@@ -690,8 +690,8 @@ linkaddr_string(netdissect_options *ndo, const uint8_t *ep,
690
690
if (len == 0 )
691
691
return ("<empty>" );
692
692
693
- if (type == LINKADDR_ETHER && len == MAC_ADDR_LEN )
694
- return (etheraddr_string (ndo , ep ));
693
+ if (type == LINKADDR_MAC48 && len == MAC48_LEN )
694
+ return (mac64_string (ndo , ep ));
695
695
696
696
if (type == LINKADDR_FRELAY )
697
697
return (q922_string (ndo , ep , len ));
@@ -938,7 +938,7 @@ init_protoidarray(netdissect_options *ndo)
938
938
}
939
939
940
940
static const struct etherlist {
941
- const nd_mac_addr addr ;
941
+ const nd_mac48 addr ;
942
942
const char * name ;
943
943
} etherlist [] = {
944
944
{{ 0xff , 0xff , 0xff , 0xff , 0xff , 0xff }, "Broadcast" },
@@ -949,7 +949,7 @@ static const struct etherlist {
949
949
* Initialize the ethers hash table. We take two different approaches
950
950
* depending on whether or not the system provides the ethers name
951
951
* service. If it does, we just wire in a few names at startup,
952
- * and etheraddr_string () fills in the table on demand. If it doesn't,
952
+ * and mac64_string () fills in the table on demand. If it doesn't,
953
953
* then we suck in the entire /etc/ethers file at startup. The idea
954
954
* is that parsing the local file will be fast, but spinning through
955
955
* all the ethers entries via NIS & next_etherent might be very slow.
@@ -995,9 +995,9 @@ init_etherarray(netdissect_options *ndo)
995
995
/*
996
996
* Use YP/NIS version of name if available.
997
997
*/
998
- /* Same workaround as in etheraddr_string (). */
998
+ /* Same workaround as in mac64_string (). */
999
999
struct ether_addr ea ;
1000
- memcpy (& ea , el -> addr , MAC_ADDR_LEN );
1000
+ memcpy (& ea , el -> addr , MAC48_LEN );
1001
1001
if (ether_ntohost (name , & ea ) == 0 ) {
1002
1002
tp -> e_name = strdup (name );
1003
1003
if (tp -> e_name == NULL )
0 commit comments