Contiki 2.5
Modules | Files | Functions
uDTN: Bundle Protocol stack

Modules

 Administrative Records
 
 Bundle Protocol Agent
 
 Bundle Protocol API
 
 Bundle Memory Representation
 
 IEEE 802.15.4 Convergence Layer
 
 Custody modules
 
 Discovery modules
 
 Network Layer interface
 
 EID Representation and Helper Methods
 
 Hashing modules
 
 Redundancy check moduldes
 
 Routing modules
 
 SDNV Functions
 
 Bundle Status reports
 
 Bundle Storage modules
 

Files

file  eid.c
 

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...
 

Detailed Description

Function Documentation

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.

Parameters
eidPointer to the EID struct
bufferPointer to the string buffer
lengthLength of the string buffer
Returns
Returns length of string on success or -1 on error

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.

Parameters
eidPointer to the EID struct
bufferPointer to the string buffer
lengthLength of the string buffer
Returns
Returns length of string on success or -1 on error

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.

Parameters
eidPointer to the EID struct
bufferPointer to the string buffer
lengthLength of the string buffer
Returns
Returns length of string on success or -1 on error

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.

Parameters
eidPointer to the EID struct
bufferPointer to the string buffer
lengthLength of the string buffer
Returns
Returns length of string on success or -1 on error

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.

Parameters
bufferPointer to the string buffer
lengthLength of the string buffer
eidPointer to the EID struct that should be filled out
Returns
Returns length of parsed EID on success or -1 on error

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.

Parameters
bufferPointer to the string buffer
lengthLength of the string buffer
eidPointer to the EID struct that should be filled out
Returns
Returns length of parsed EID on success or -1 on error

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.

Parameters
bufferPointer to the string buffer
lengthLength of the string buffer
eidPointer to the EID struct that should be filled out
Returns
Returns length of parsed EID on success or -1 on error

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.

Parameters
bufferPointer to the string buffer
lengthLength of the string buffer
eidPointer to the EID struct that should be filled out
Returns
Returns length of parsed EID on success or -1 on error

Definition at line 39 of file eid.c.

References eid_parse_host(), and sdnv_decode().

Referenced by discovery_ipnd_parse_eid().