Network link address library .
More...
Network link address library .
- Since
- 1.0
- Version
- 1.0.0
◆ NET_LINK_ADDR_MAX_LENGTH
| #define NET_LINK_ADDR_MAX_LENGTH 6 |
◆ net_link_type
#include <zephyr/net/net_linkaddr.h>
Type of the link address.
This indicates the network technology that this address is used in. Note that in order to save space we store the value into a uint8_t variable, so please do not introduce any values > 255 in this enum.
| Enumerator |
|---|
| NET_LINK_UNKNOWN | Unknown link address type.
|
| NET_LINK_IEEE802154 | IEEE 802.15.4 link address.
|
| NET_LINK_BLUETOOTH | Bluetooth IPSP link address.
|
| NET_LINK_ETHERNET | Ethernet link address.
|
| NET_LINK_DUMMY | Dummy link address.
Used in testing apps and loopback support.
|
| NET_LINK_CANBUS_RAW | CANBUS link address.
|
◆ net_linkaddr_clear()
| static int net_linkaddr_clear |
( |
struct net_linkaddr * | lladdr | ) |
|
|
inlinestatic |
#include <zephyr/net/net_linkaddr.h>
Clear link address.
- Parameters
-
| lladdr | The link address structure. |
- Returns
- 0 if ok, <0 if error
◆ net_linkaddr_cmp()
#include <zephyr/net/net_linkaddr.h>
Compare two link layer addresses.
- Parameters
-
| lladdr1 | Pointer to a link layer address |
| lladdr2 | Pointer to a link layer address |
- Returns
- True if the addresses are the same, false otherwise.
◆ net_linkaddr_copy()
#include <zephyr/net/net_linkaddr.h>
Copy link address from one variable to another.
- Parameters
-
| dst | The link address structure destination. |
| src | The link address structure to source. |
- Returns
- 0 if ok, <0 if error
◆ net_linkaddr_create()
#include <zephyr/net/net_linkaddr.h>
Create a link address structure.
- Parameters
-
| lladdr | The link address structure to change. |
| addr | Array of bytes containing the link address. If set to NULL, the address will be cleared. |
| len | Length of the link address array. |
| type | Type of the link address. |
- Returns
- 0 if ok, <0 if error
◆ net_linkaddr_set()
#include <zephyr/net/net_linkaddr.h>
Set the member data of a link layer address storage structure.
- Parameters
-
| lladdr | The link address storage structure to change. |
| new_addr | Array of bytes containing the link address. |
| new_len | Length of the link address array. This value should always be <= NET_LINK_ADDR_MAX_LENGTH. |
- Returns
- 0 if ok, <0 if error