7171 #else /* HAVE_STRUCT_ETHER_ADDR */
7272 struct ether_addr {
7373 /* Beware FreeBSD calls this "octet". */
74- unsigned char ether_addr_octet [MAC_ADDR_LEN ];
74+ unsigned char ether_addr_octet [MAC48_LEN ];
7575 };
7676 #endif /* HAVE_STRUCT_ETHER_ADDR */
7777 #endif /* what declares ether_ntohost() */
@@ -589,7 +589,7 @@ lookup_protoid(netdissect_options *ndo, const u_char *pi)
589589}
590590
591591const char *
592- etheraddr_string (netdissect_options * ndo , const uint8_t * ep )
592+ mac64_string (netdissect_options * ndo , const uint8_t * ep )
593593{
594594 int i ;
595595 char * cp ;
@@ -610,7 +610,7 @@ etheraddr_string(netdissect_options *ndo, const uint8_t *ep)
610610 */
611611 struct ether_addr ea ;
612612
613- memcpy (& ea , ep , MAC_ADDR_LEN );
613+ memcpy (& ea , ep , MAC48_LEN );
614614 if (ether_ntohost (buf2 , & ea ) == 0 ) {
615615 tp -> e_name = strdup (buf2 );
616616 if (tp -> e_name == NULL )
@@ -690,8 +690,8 @@ linkaddr_string(netdissect_options *ndo, const uint8_t *ep,
690690 if (len == 0 )
691691 return ("<empty>" );
692692
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 ));
695695
696696 if (type == LINKADDR_FRELAY )
697697 return (q922_string (ndo , ep , len ));
@@ -938,7 +938,7 @@ init_protoidarray(netdissect_options *ndo)
938938}
939939
940940static const struct etherlist {
941- const nd_mac_addr addr ;
941+ const nd_mac48 addr ;
942942 const char * name ;
943943} etherlist [] = {
944944 {{ 0xff , 0xff , 0xff , 0xff , 0xff , 0xff }, "Broadcast" },
@@ -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 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,
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,9 +995,9 @@ init_etherarray(netdissect_options *ndo)
995995 /*
996996 * Use YP/NIS version of name if available.
997997 */
998- /* Same workaround as in etheraddr_string (). */
998+ /* Same workaround as in mac64_string (). */
999999 struct ether_addr ea ;
1000- memcpy (& ea , el -> addr , MAC_ADDR_LEN );
1000+ memcpy (& ea , el -> addr , MAC48_LEN );
10011001 if (ether_ntohost (name , & ea ) == 0 ) {
10021002 tp -> e_name = strdup (name );
10031003 if (tp -> e_name == NULL )
0 commit comments