Contiki 2.5
|
Files | |
file | eid.h |
this file defines the memory representation of an EID and provides methods for construction and parsing | |
Functions | |
int | eid_parse_host (char *buffer, uint8_t length, uint32_t *node_id) |
Parses an incoming string and fills out the EID struct. More... | |
int | eid_parse_host_length (uint8_t *buffer, uint8_t length, uint32_t *node_id) |
Parses an byte buffer that contains the SDNV length and an EID string and fills out the EID struct. More... | |
int | eid_parse_full (char *buffer, uint8_t length, uint32_t *node_id, uint32_t *service_id) |
Parses an incoming string and fills out the EID struct. More... | |
int | eid_parse_full_length (uint8_t *buffer, uint8_t length, uint32_t *node_id, uint32_t *service_id) |
Parses an byte buffer that contains the SDNV length and an EID string and fills out the EID struct. More... | |
int | eid_create_host (uint32_t node_id, char *buffer, uint8_t length) |
Converts the EID struct into a string representation. More... | |
int | eid_create_host_length (uint32_t node_id, uint8_t *buffer, uint8_t length) |
Converts the EID struct into a string representation prefixed with the SDNV-encoded length. More... | |
int | eid_create_full (uint32_t node_id, uint32_t service_id, char *buffer, uint8_t length) |
Converts the EID struct into a string representation. More... | |
int | eid_create_full_length (uint32_t node_id, uint32_t service_id, uint8_t *buffer, uint8_t length) |
Converts the EID struct into a string representation prefixed with the SDNV-encoded length. More... | |
int eid_create_full | ( | uint32_t | node_id, |
uint32_t | service_id, | ||
char * | buffer, | ||
uint8_t | length | ||
) |
Converts the EID struct into a string representation.
eid | Pointer to the EID struct |
buffer | Pointer to the string buffer |
length | Length of the string buffer |
Definition at line 155 of file eid.c.
Referenced by eid_create_full_length().
int eid_create_full_length | ( | uint32_t | node_id, |
uint32_t | service_id, | ||
uint8_t * | buffer, | ||
uint8_t | length | ||
) |
Converts the EID struct into a string representation prefixed with the SDNV-encoded length.
eid | Pointer to the EID struct |
buffer | Pointer to the string buffer |
length | Length of the string buffer |
Definition at line 160 of file eid.c.
References eid_create_full(), and sdnv_encode().
Referenced by statusreport_encode().
int eid_create_host | ( | uint32_t | node_id, |
char * | buffer, | ||
uint8_t | length | ||
) |
Converts the EID struct into a string representation.
eid | Pointer to the EID struct |
buffer | Pointer to the string buffer |
length | Length of the string buffer |
Definition at line 121 of file eid.c.
Referenced by eid_create_host_length().
int eid_create_host_length | ( | uint32_t | node_id, |
uint8_t * | buffer, | ||
uint8_t | length | ||
) |
Converts the EID struct into a string representation prefixed with the SDNV-encoded length.
eid | Pointer to the EID struct |
buffer | Pointer to the string buffer |
length | Length of the string buffer |
Definition at line 126 of file eid.c.
References eid_create_host(), and sdnv_encode().
Referenced by discovery_ipnd_send().
int eid_parse_full | ( | char * | buffer, |
uint8_t | length, | ||
uint32_t * | node_id, | ||
uint32_t * | service_id | ||
) |
Parses an incoming string and fills out the EID struct.
buffer | Pointer to the string buffer |
length | Length of the string buffer |
eid | Pointer to the EID struct that should be filled out |
Definition at line 62 of file eid.c.
References NULL.
Referenced by eid_parse_full_length().
int eid_parse_full_length | ( | uint8_t * | buffer, |
uint8_t | length, | ||
uint32_t * | node_id, | ||
uint32_t * | service_id | ||
) |
Parses an byte buffer that contains the SDNV length and an EID string and fills out the EID struct.
buffer | Pointer to the string buffer |
length | Length of the string buffer |
eid | Pointer to the EID struct that should be filled out |
Definition at line 99 of file eid.c.
References eid_parse_full(), and sdnv_decode().
int eid_parse_host | ( | char * | buffer, |
uint8_t | length, | ||
uint32_t * | node_id | ||
) |
Parses an incoming string and fills out the EID struct.
buffer | Pointer to the string buffer |
length | Length of the string buffer |
eid | Pointer to the EID struct that should be filled out |
Definition at line 25 of file eid.c.
Referenced by eid_parse_host_length().
int eid_parse_host_length | ( | uint8_t * | buffer, |
uint8_t | length, | ||
uint32_t * | node_id | ||
) |
Parses an byte buffer that contains the SDNV length and an EID string and fills out the EID struct.
buffer | Pointer to the string buffer |
length | Length of the string buffer |
eid | Pointer to the EID struct that should be filled out |
Definition at line 39 of file eid.c.
References eid_parse_host(), and sdnv_decode().
Referenced by discovery_ipnd_parse_eid().