Contiki-NG
Functions | Variables
Link-layer addresses

The linkaddr module handles link-layer addresses. More...

Functions

void linkaddr_copy (linkaddr_t *dest, const linkaddr_t *from)
 Copy a link-layer address. More...
 
int linkaddr_cmp (const linkaddr_t *addr1, const linkaddr_t *addr2)
 Compare two link-layer addresses. More...
 
void linkaddr_set_node_addr (linkaddr_t *addr)
 Set the address of the current node. More...
 

Variables

linkaddr_t linkaddr_node_addr
 The link-layer address of the node. More...
 
linkaddr_t linkaddr_node_addr
 The link-layer address of the node. More...
 
const linkaddr_t linkaddr_null
 The null link-layer address. More...
 

Detailed Description

The linkaddr module handles link-layer addresses.

Function Documentation

◆ linkaddr_cmp()

int linkaddr_cmp ( const linkaddr_t *  addr1,
const linkaddr_t *  addr2 
)

Compare two link-layer addresses.

Parameters
addr1The first address
addr2The second address
Returns
Non-zero if the addresses are the same, zero if they are different
        This function compares two link-layer addresses and returns
        the result of the comparison. The function acts like
        the '==' operator and returns non-zero if the addresses
        are the same, and zero if the addresses are different.

Definition at line 69 of file linkaddr.c.

Referenced by packetbuf_holds_broadcast(), and tsch_queue_update_all_backoff_windows().

◆ linkaddr_copy()

void linkaddr_copy ( linkaddr_t *  dest,
const linkaddr_t *  from 
)

Copy a link-layer address.

Parameters
destThe destination
fromThe source
        This function copies a link-layer address from one location
        to another.

Definition at line 63 of file linkaddr.c.

Referenced by platform_init_stage_three().

◆ linkaddr_set_node_addr()

void linkaddr_set_node_addr ( linkaddr_t *  addr)

Set the address of the current node.

Parameters
addrThe address
        This function sets the link-layer address of the node.

Definition at line 75 of file linkaddr.c.

Referenced by platform_init_stage_three().

Variable Documentation

◆ linkaddr_node_addr [1/2]

linkaddr_t linkaddr_node_addr

The link-layer address of the node.

This variable contains the link-layer address of the node. This variable should not be changed directly; rather, the linkaddr_set_node_addr() function should be used.

Definition at line 48 of file linkaddr.c.

Referenced by platform_init_stage_three().

◆ linkaddr_node_addr [2/2]

linkaddr_t linkaddr_node_addr

The link-layer address of the node.

This variable contains the link-layer address of the node. This variable should not be changed directly; rather, the linkaddr_set_node_addr() function should be used.

Definition at line 48 of file linkaddr.c.

Referenced by platform_init_stage_three().

◆ linkaddr_null

const linkaddr_t linkaddr_null

The null link-layer address.

This variable contains the null link-layer address. The null address is used in route tables to indicate that the table entry is unused. Nodes with no configured address has the null address. Nodes with their node address set to the null address will have problems communicating with other nodes.