@@ -39,7 +39,7 @@ extern cap_channel_t *capdns;
3939enum {
4040 LINKADDR_ETHER ,
4141 LINKADDR_FRELAY ,
42- LINKADDR_IEEE1394 ,
42+ LINKADDR_EUI64 ,
4343 LINKADDR_ATM ,
4444 LINKADDR_OTHER
4545};
4848
4949extern const char * linkaddr_string (netdissect_options * , const uint8_t * , const unsigned int , const unsigned int );
5050extern const char * etheraddr_string (netdissect_options * , const uint8_t * );
51- extern const char * le64addr_string (netdissect_options * , const uint8_t * );
51+ extern const char * eui64_string (netdissect_options * , const uint8_t * );
52+ extern const char * eui64le_string (netdissect_options * , const uint8_t * );
5253extern const char * tcpport_string (netdissect_options * , u_short );
5354extern const char * udpport_string (netdissect_options * , u_short );
5455extern const char * isonsap_string (netdissect_options * , const uint8_t * , u_int );
@@ -86,11 +87,19 @@ get_etheraddr_string(netdissect_options *ndo, const uint8_t *p)
8687}
8788
8889static inline const char *
89- get_le64addr_string (netdissect_options * ndo , const u_char * p )
90+ get_eui64_string (netdissect_options * ndo , const uint8_t * p )
9091{
91- if (!ND_TTEST_8 ( p ))
92+ if (!ND_TTEST_LEN ( p , EUI64_LEN ))
9293 nd_trunc_longjmp (ndo );
93- return le64addr_string (ndo , p );
94+ return eui64_string (ndo , p );
95+ }
96+
97+ static inline const char *
98+ get_eui64le_string (netdissect_options * ndo , const uint8_t * p )
99+ {
100+ if (!ND_TTEST_LEN (p , EUI64_LEN ))
101+ nd_trunc_longjmp (ndo );
102+ return eui64le_string (ndo , p );
94103}
95104
96105static inline const char *
@@ -120,7 +129,8 @@ get_ip6addr_string(netdissect_options *ndo, const u_char *p)
120129
121130#define GET_LINKADDR_STRING (p , type , len ) get_linkaddr_string(ndo, (const u_char *)(p), type, len)
122131#define GET_ETHERADDR_STRING (p ) get_etheraddr_string(ndo, (const u_char *)(p))
123- #define GET_LE64ADDR_STRING (p ) get_le64addr_string(ndo, (const u_char *)(p))
132+ #define GET_EUI64_STRING (p ) get_eui64_string(ndo, (const u_char *)(p))
133+ #define GET_EUI64LE_STRING (p ) get_eui64le_string(ndo, (const u_char *)(p))
124134#define GET_ISONSAP_STRING (nsap , nsap_length ) get_isonsap_string(ndo, (const u_char *)(nsap), nsap_length)
125135#define GET_IPADDR_STRING (p ) get_ipaddr_string(ndo, (const u_char *)(p))
126136#define GET_IP6ADDR_STRING (p ) get_ip6addr_string(ndo, (const u_char *)(p))
0 commit comments