45 #include "contiki-net.h" 69 while(curr->id != 0) {
88 while(curr->id != 0) {
102 if(
id == 0 || lladdr == NULL) {
105 while(curr->id != 0) {
117 const linkaddr_t lladdr;
static uip_ipaddr_t ipaddr
Pointer to prefix information option in uip_buf.
void uip_ds6_set_lladdr_from_iid(uip_lladdr_t *lladdr, const uip_ipaddr_t *ipaddr)
Build a link-layer address from an IPv6 address based on its UUID64.
Node-id (simple 16-bit identifiers) handling.
void deployment_iid_from_id(uip_ipaddr_t *ipaddr, uint16_t id)
Get IPv6 IID from node IDs.
void uip_ds6_set_addr_iid(uip_ipaddr_t *ipaddr, uip_lladdr_t *lladdr)
set the last 64 bits of an IP address based on the MAC address
ID<->MAC address mapping structure.
linkaddr_t linkaddr_node_addr
The link-layer address of the node.
void deployment_init(void)
DEPLOYMENT_MAPPING: A table of struct id_mac that provides ID-MAC mapping for a deployment.
int deployment_node_count(void)
Get the number of nodes for the deployment (length of mapping table)
const struct id_mac DEPLOYMENT_MAPPING[]
List of ID<->MAC mapping used for different deployments.
Per-deployment MAC <-> nodeid mapping.
void linkaddr_copy(linkaddr_t *dest, const linkaddr_t *src)
Copy a link-layer address.
int linkaddr_cmp(const linkaddr_t *addr1, const linkaddr_t *addr2)
Compare two link-layer addresses.
uint16_t deployment_id_from_lladdr(const linkaddr_t *lladdr)
Get node ID from a link-layer address, from the deployment mapping table.
void deployment_lladdr_from_id(linkaddr_t *lladdr, uint16_t id)
Get node link-layer address from a node ID, from the deployment mapping table.
static int node_count
The number of nodes in the deployment.
uint16_t deployment_id_from_index(uint16_t index)
Get node ID from index in mapping table.
uint16_t deployment_id_from_iid(const uip_ipaddr_t *ipaddr)
Get node ID from the IID of an IPv6 address.