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

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 find_handle(), log_lladdr_compact(), mac_sequence_is_duplicate(), mac_sequence_register_seqno(), packet_sent(), packetbuf_holds_broadcast(), send_to_peer(), tsch_disassociate(), tsch_packet_parse_eack(), tsch_queue_add_nbr(), tsch_queue_get_nbr(), tsch_queue_update_all_backoff_windows(), tsch_radio_off(), tsch_schedule_keepalive_immediately(), tsch_set_eb_period(), and uip_ds6_nbr_add().

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 frame802154_parse(), linkaddr_set_node_addr(), mac_sequence_register_seqno(), output(), packetbuf_remaininglen(), platform_init_stage_three(), sixp_nbr_alloc(), tsch_packet_create_eack(), tsch_queue_add_nbr(), tsch_radio_off(), tsch_schedule_add_link(), tsch_schedule_keepalive_immediately(), tsch_schedule_remove_link(), and tsch_set_eb_period().

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.

References linkaddr_copy(), and linkaddr_node_addr.

Referenced by platform_init_stage_three(), and uip_log().

Variable Documentation

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 ble_mac_ipsp_evt_handler_irq(), linkaddr_set_node_addr(), node_id_init(), nullnet_set_input_callback(), platform_init_stage_three(), platform_init_stage_two(), shell_output_lladdr(), sixtop_output(), tsch_disassociate(), tsch_packet_create_eack(), tsch_packet_create_eb(), tsch_packet_parse_eack(), tsch_radio_off(), and tsch_security_secure_frame().

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 ble_mac_ipsp_evt_handler_irq(), linkaddr_set_node_addr(), node_id_init(), nullnet_set_input_callback(), platform_init_stage_three(), platform_init_stage_two(), shell_output_lladdr(), sixtop_output(), tsch_disassociate(), tsch_packet_create_eack(), tsch_packet_create_eb(), tsch_packet_parse_eack(), tsch_radio_off(), and tsch_security_secure_frame().

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.

Referenced by frame802154_parse(), log_lladdr_compact(), nullnet_set_input_callback(), output(), packet_sent(), packetbuf_holds_broadcast(), packetbuf_remaininglen(), send_to_peer(), tsch_disassociate(), tsch_packet_parse_eack(), tsch_radio_off(), tsch_schedule_add_link(), tsch_set_eb_period(), and uip_ds6_nbr_add().