46 #define FNET_MAC_ADDR_STR_SIZE (18) 53 #define FNET_ETH_MTU (1500u) 71 #define FNET_MAC_ADDR_INIT(a, b, c, d, e, f) { (a), (b), (c), (d), (e), (f) } 74 #define FNET_MAC_ADDR_IS_MULTICAST(a) ((((a)[0]) == 0x01U)?FNET_TRUE:FNET_FALSE) 77 #define FNET_MAC_ADDR_IS_BROADCAST(a) (((((a)[0]) == 0xFFU) && \ 78 (((a)[1]) == 0xFFU)&& \ 79 (((a)[1]) == 0xFFU)&& \ 80 (((a)[1]) == 0xFFU)&& \ 81 (((a)[1]) == 0xFFU)&& \ 82 (((a)[1]) == 0xFFU))? FNET_TRUE:FNET_FALSE) 84 #define FNET_MAC_ADDR_COPY(from_addr, to_addr) \ 85 (fnet_memcpy(&to_addr[0], &from_addr[0], sizeof(fnet_mac_addr_t))) 95 #if defined(__cplusplus) 148 #if defined(__cplusplus) fnet_return_t
General return codes, used by most of API functions.
fnet_char_t * fnet_mac_to_str(const fnet_mac_addr_t addr, fnet_char_t *str_mac)
Converts a 6 byte MAC address into a null terminated string.
fnet_return_t fnet_str_to_mac(const fnet_char_t *str_mac, fnet_mac_addr_t addr)
Converts a null terminated string to a 6 byte MAC address.
char fnet_char_t
Type representing the charecter.
fnet_uint8_t fnet_mac_addr_t[6]
Media Access Control (MAC) address type.