![]() |
Contiki-NG
|
Functions | |
| void | coap_endpoint_log (const coap_endpoint_t *ep) |
| Print a CoAP endpoint via the logging module. | |
| void | coap_endpoint_print (const coap_endpoint_t *ep) |
| Print a CoAP endpoint. | |
| int | coap_endpoint_snprint (char *buf, size_t size, const coap_endpoint_t *ep) |
| Print a CoAP endpoint to a string. | |
| void | coap_endpoint_copy (coap_endpoint_t *destination, const coap_endpoint_t *from) |
| Copy a CoAP endpoint from one memory area to another. | |
| int | coap_endpoint_cmp (const coap_endpoint_t *e1, const coap_endpoint_t *e2) |
| Compare two CoAP endpoints. | |
| int | coap_endpoint_parse (const char *text, size_t size, coap_endpoint_t *ep) |
| Parse a CoAP endpoint. | |
| int | coap_endpoint_is_secure (const coap_endpoint_t *ep) |
| Check if a CoAP endpoint is secure (encrypted). | |
| int | coap_endpoint_is_connected (const coap_endpoint_t *ep) |
| Check if a CoAP endpoint is connected. | |
| int | coap_endpoint_connect (coap_endpoint_t *ep) |
| Request a connection to a CoAP endpoint. | |
| void | coap_endpoint_disconnect (coap_endpoint_t *ep) |
| Request that any connection to a CoAP endpoint is discontinued. | |
| uint8_t * | coap_databuf (void) |
| Returns a common data buffer that can be used when generating CoAP messages for transmission. | |
| void | coap_transport_init (void) |
| Initialize the CoAP transport. | |
| int | coap_sendto (const coap_endpoint_t *ep, const uint8_t *data, uint16_t length) |
| Send a message to the specified CoAP endpoint. | |
This is an implementation of CoAP transport and CoAP endpoint over uIP with DTLS support.
| uint8_t * coap_databuf | ( | void | ) |
Returns a common data buffer that can be used when generating CoAP messages for transmission.
The buffer size is at least COAP_MAX_PACKET_SIZE bytes.
In Contiki-NG, this corresponds to the uIP buffer.
Definition at line 367 of file coap-uip.c.
References uip_appdata.
Referenced by coap_separate_accept().
| int coap_endpoint_cmp | ( | const coap_endpoint_t * | e1, |
| const coap_endpoint_t * | e2 ) |
Compare two CoAP endpoints.
| e1 | A pointer to the first CoAP endpoint. |
| e2 | A pointer to the second CoAP endpoint. |
Definition at line 168 of file coap-uip.c.
Referenced by coap_ep_get_dtls_session_info(), and coap_ep_is_dtls_peer().
| int coap_endpoint_connect | ( | coap_endpoint_t * | ep | ) |
Request a connection to a CoAP endpoint.
| ep | A pointer to a CoAP endpoint. |
Definition at line 284 of file coap-uip.c.
| void coap_endpoint_copy | ( | coap_endpoint_t * | dest, |
| const coap_endpoint_t * | src ) |
Copy a CoAP endpoint from one memory area to another.
| dest | A pointer to a CoAP endpoint to copy to. |
| src | A pointer to a CoAP endpoint to copy from. |
Definition at line 159 of file coap-uip.c.
References uip_ipaddr_copy.
Referenced by coap_separate_accept().
| void coap_endpoint_disconnect | ( | coap_endpoint_t * | ep | ) |
Request that any connection to a CoAP endpoint is discontinued.
| ep | A pointer to a CoAP endpoint. |
Definition at line 359 of file coap-uip.c.
References coap_ep_dtls_disconnect().
| int coap_endpoint_is_connected | ( | const coap_endpoint_t * | ep | ) |
Check if a CoAP endpoint is connected.
| ep | A pointer to a CoAP endpoint. |
Definition at line 255 of file coap-uip.c.
References coap_ep_is_dtls_connected(), coap_ep_is_dtls_peer(), routing_driver::node_is_reachable, and uip_is_addr_linklocal.
Referenced by coap_sendto().
| int coap_endpoint_is_secure | ( | const coap_endpoint_t * | ep | ) |
Check if a CoAP endpoint is secure (encrypted).
| ep | A pointer to a CoAP endpoint. |
Definition at line 249 of file coap-uip.c.
Referenced by coap_sendto().
| void coap_endpoint_log | ( | const coap_endpoint_t * | ep | ) |
Print a CoAP endpoint via the logging module.
| ep | A pointer to the CoAP endpoint to log. |
Definition at line 99 of file coap-uip.c.
References log_6addr().
| int coap_endpoint_parse | ( | const char * | text, |
| size_t | size, | ||
| coap_endpoint_t * | ep ) |
Parse a CoAP endpoint.
| text | The string to parse. |
| size | The max number of characters in the string. |
| ep | A pointer to the CoAP endpoint to write to. |
Definition at line 206 of file coap-uip.c.
References start(), UIP_HTONS, and uiplib_ipaddrconv.
| void coap_endpoint_print | ( | const coap_endpoint_t * | ep | ) |
Print a CoAP endpoint.
| ep | A pointer to the CoAP endpoint to print. |
Definition at line 115 of file coap-uip.c.
References uiplib_ipaddr_print().
| int coap_endpoint_snprint | ( | char * | str, |
| size_t | size, | ||
| const coap_endpoint_t * | ep ) |
Print a CoAP endpoint to a string.
The output is always null-terminated unless size is zero.
| str | The string to write to. |
| size | The max number of characters to write. |
| ep | A pointer to the CoAP endpoint to print. |
Definition at line 131 of file coap-uip.c.
References uiplib_ipaddr_snprint().
| int coap_sendto | ( | const coap_endpoint_t * | ep, |
| const uint8_t * | data, | ||
| uint16_t | len ) |
Send a message to the specified CoAP endpoint.
| ep | A pointer to a CoAP endpoint |
| data | A pointer to data to send |
| len | The size of the data to send |
Definition at line 416 of file coap-uip.c.
References coap_endpoint_is_connected(), coap_endpoint_is_secure(), and coap_ep_dtls_write().
Referenced by coap_separate_accept().
| void coap_transport_init | ( | void | ) |
Initialize the CoAP transport.
This function initializes the CoAP transport implementation and
should only be called by the CoAP engine.
Definition at line 373 of file coap-uip.c.
References coap_dtls_init(), coap_keystore_simple_init(), and process_start().