Contiki-NG
Loading...
Searching...
No Matches
Link-layer addresses

Functions

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

Variables

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

Detailed Description

The linkaddr module handles link-layer addresses.

Function Documentation

◆ linkaddr_cmp()

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

Compare two link-layer addresses.

Parameters
addr1The first address
addr2The second address
Returns
True if the addresses are the same, false if they are different

Definition at line 69 of file linkaddr.c.

Referenced by deployment_id_from_lladdr(), log_lladdr_compact(), mac_sequence_is_duplicate(), mac_sequence_register_seqno(), packet_sent(), packetbuf_holds_broadcast(), tsch_packet_parse_eack(), tsch_queue_add_nbr(), tsch_queue_update_all_backoff_windows(), and uip_ds6_link_callback().

◆ 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 deployment_lladdr_from_id(), frame802154_parse(), linkaddr_set_node_addr(), mac_sequence_register_seqno(), platform_init_stage_three(), sixp_nbr_alloc(), tsch_packet_create_eack(), tsch_schedule_add_link(), and tsch_schedule_remove_link().

◆ linkaddr_set_node_addr()

static void linkaddr_set_node_addr ( linkaddr_t * addr)
inlinestatic

Set the address of the current node.

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

Definition at line 124 of file linkaddr.h.

References addr, linkaddr_copy(), and linkaddr_node_addr.

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 deployment_init(), linkaddr_set_node_addr(), node_id_init(), platform_init_stage_three(), platform_init_stage_two(), platform_init_stage_two(), populate_link_address(), sixtop_output(), tsch_packet_create_eack(), tsch_packet_create_eb(), tsch_packet_parse_eack(), and tsch_security_secure_frame().

◆ linkaddr_node_addr [2/2]

linkaddr_t linkaddr_node_addr
extern

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 deployment_init(), linkaddr_set_node_addr(), node_id_init(), platform_init_stage_three(), platform_init_stage_two(), platform_init_stage_two(), populate_link_address(), sixtop_output(), tsch_packet_create_eack(), tsch_packet_create_eb(), tsch_packet_parse_eack(), and tsch_security_secure_frame().

◆ linkaddr_null

const linkaddr_t linkaddr_null
extern

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.

Referenced by frame802154_parse(), log_lladdr_compact(), output(), packet_sent(), packetbuf_holds_broadcast(), tsch_packet_parse_eack(), tsch_schedule_add_link(), and uip_ds6_link_callback().