12#ifndef ZEPHYR_INCLUDE_NET_NET_LINKADDR_H_
13#define ZEPHYR_INCLUDE_NET_NET_LINKADDR_H_
33#ifdef CONFIG_NET_L2_IEEE802154
34#define NET_LINK_ADDR_MAX_LENGTH 8
36#ifdef CONFIG_NET_L2_PPP
37#define NET_LINK_ADDR_MAX_LENGTH 8
39#define NET_LINK_ADDR_MAX_LENGTH 6
96 if (!lladdr1 || !lladdr2) {
100 if (lladdr1->
len != lladdr2->
len) {
121 if (lladdr ==
NULL || new_addr ==
NULL) {
129 lladdr->
len = new_len;
174 if (lladdr ==
NULL) {
static int net_linkaddr_copy(struct net_linkaddr *dst, const struct net_linkaddr *src)
Copy link address from one variable to another.
Definition net_linkaddr.h:142
net_link_type
Type of the link address.
Definition net_linkaddr.h:49
static bool net_linkaddr_cmp(struct net_linkaddr *lladdr1, struct net_linkaddr *lladdr2)
Compare two link layer addresses.
Definition net_linkaddr.h:93
static int net_linkaddr_clear(struct net_linkaddr *lladdr)
Clear link address.
Definition net_linkaddr.h:200
#define NET_LINK_ADDR_MAX_LENGTH
Maximum length of the link address.
Definition net_linkaddr.h:39
static int net_linkaddr_set(struct net_linkaddr *lladdr, const uint8_t *new_addr, uint8_t new_len)
Set the member data of a link layer address storage structure.
Definition net_linkaddr.h:117
static int net_linkaddr_create(struct net_linkaddr *lladdr, const uint8_t *addr, uint8_t len, enum net_link_type type)
Create a link address structure.
Definition net_linkaddr.h:170
@ NET_LINK_UNKNOWN
Unknown link address type.
Definition net_linkaddr.h:51
@ NET_LINK_IEEE802154
IEEE 802.15.4 link address.
Definition net_linkaddr.h:53
@ NET_LINK_DUMMY
Dummy link address.
Definition net_linkaddr.h:59
@ NET_LINK_ETHERNET
Ethernet link address.
Definition net_linkaddr.h:57
@ NET_LINK_CANBUS_RAW
CANBUS link address.
Definition net_linkaddr.h:61
@ NET_LINK_BLUETOOTH
Bluetooth IPSP link address.
Definition net_linkaddr.h:55
#define EINVAL
Invalid argument.
Definition errno.h:60
#define EMSGSIZE
Message size.
Definition errno.h:106
#define NULL
Definition iar_missing_defs.h:20
__UINT8_TYPE__ uint8_t
Definition stdint.h:88
void * memset(void *buf, int c, size_t n)
int memcmp(const void *m1, const void *m2, size_t n)
void * memcpy(void *ZRESTRICT d, const void *ZRESTRICT s, size_t n)
Hardware link address structure.
Definition net_linkaddr.h:74
uint8_t addr[6]
The array of bytes representing the address.
Definition net_linkaddr.h:82
uint8_t type
What kind of address is this for.
Definition net_linkaddr.h:76
uint8_t len
The real length of the ll address.
Definition net_linkaddr.h:79