X-Git-Url: https://git.saurik.com/apple/xnu.git/blobdiff_plain/3903760236c30e3b5ace7a4eefac3a269d68957c..b226f5e54a60dc81db17b1260381d7dbfea3cdf1:/bsd/net/ethernet.h diff --git a/bsd/net/ethernet.h b/bsd/net/ethernet.h index 5f29b6e71..23719456b 100644 --- a/bsd/net/ethernet.h +++ b/bsd/net/ethernet.h @@ -82,18 +82,18 @@ /* * Structure of a 10Mb/s Ethernet header. */ -struct ether_header { +typedef struct ether_header { u_char ether_dhost[ETHER_ADDR_LEN]; u_char ether_shost[ETHER_ADDR_LEN]; u_short ether_type; -}; +} ether_header_t; /* * Structure of a 48-bit Ethernet address. */ -struct ether_addr { +typedef struct ether_addr { u_char octet[ETHER_ADDR_LEN]; -}; +} ether_addr_t; #define ether_addr_octet octet @@ -130,6 +130,17 @@ struct ether_addr *ether_aton(const char *); #ifdef BSD_KERNEL_PRIVATE extern u_char etherbroadcastaddr[ETHER_ADDR_LEN]; +#if defined (__arm__) + +#include + +static __inline__ int +_ether_cmp(const void * a, const void * b) +{ + return (memcmp(a, b, ETHER_ADDR_LEN)); +} + +#else /* __arm__ */ static __inline__ int _ether_cmp(const void * a, const void * b) @@ -145,6 +156,7 @@ _ether_cmp(const void * a, const void * b) return (0); } +#endif /* __arm__ */ #endif /* BSD_KERNEL_PRIVATE */ #define ETHER_IS_MULTICAST(addr) (*(addr) & 0x01) /* is address mcast/bcast? */