platform abstraction of networking
More...
#include "messaging/coap/conf.h"
#include "oc_config.h"
#include "oc_endpoint.h"
#include "oc_network_events.h"
#include "oc_session_events.h"
#include "port/oc_log.h"
#include "util/oc_process.h"
#include <stdint.h>
#include "oc_buffer_settings.h"
Go to the source code of this file.
platform abstraction of networking
Definition in file oc_connectivity.h.
◆ tcp_csm_state_t
The CSM states.
Enumerator |
---|
CSM_NONE | None.
|
CSM_SENT | Send.
|
CSM_DONE | Done.
|
CSM_ERROR | Error.
|
Definition at line 251 of file oc_connectivity.h.
tcp_csm_state_t
The CSM states.
◆ handle_network_interface_event_callback()
the callback function for an network change
- Parameters
-
◆ handle_session_event_callback()
the session callback
- Parameters
-
endpoint | the endpoint for the session |
state | the state of the session |
◆ oc_connectivity_end_session()
end session for the specific endpoint
- Parameters
-
endpoint | the endpoint to close the session for |
◆ oc_connectivity_get_endpoints()
retrieve list of endpoints for the device
- Parameters
-
- Returns
- oc_endpoint_t* list of endpoints
◆ oc_connectivity_init()
int oc_connectivity_init |
( |
size_t |
device | ) |
|
initialize the connectivity (e.g.
open sockets) for the device
- Parameters
-
- Returns
- int 0 = success
◆ oc_connectivity_set_port()
int oc_connectivity_set_port |
( |
uint32_t |
port | ) |
|
set the default (unicast) CoAp port to another value
Note: must be called before oc_connectivity_init
- Parameters
-
port | the port number to change |
- Returns
- int 0 = success
◆ oc_connectivity_shutdown()
void oc_connectivity_shutdown |
( |
size_t |
device | ) |
|
shut down the connectivity for device at device index
- Parameters
-
◆ oc_connectivity_subscribe_mcast_ipv6()
void oc_connectivity_subscribe_mcast_ipv6 |
( |
oc_endpoint_t * |
address | ) |
|
Subscribe to a multicast address.
- Parameters
-
address | endpoint describing the address to subscribe to. The device & addr.ipv6.address members must be set for the function call to be valid. |
◆ oc_connectivity_unsubscribe_mcast_ipv6()
void oc_connectivity_unsubscribe_mcast_ipv6 |
( |
oc_endpoint_t * |
address | ) |
|
unsubscribe to a multicast address
- Parameters
-
address | endpoint describing the address to un subscribe from. The device & addr.ipv6.address members must be set for the function call to be valid. |
◆ oc_dns_lookup()
int oc_dns_lookup |
( |
const char * |
domain, |
|
|
oc_string_t * |
addr, |
|
|
enum transport_flags |
flags |
|
) |
| |
DNS look up.
- Parameters
-
domain | the url |
addr | the address |
flags | the transport flags |
- Returns
- int 0 = success
◆ oc_get_incoming_message_with_ptr()
oc_message_t* oc_get_incoming_message_with_ptr |
( |
uint8_t * |
data | ) |
|
get buffer of a received message
- Parameters
-
data | pointer to data within a received message |
- Returns
- oc_message_t* the buffer containing the data, or NULL if such a buffer could not be found
◆ oc_send_buffer()
int oc_send_buffer |
( |
oc_message_t * |
message | ) |
|
send buffer
- Parameters
-
message | the message to send |
- Returns
- int 0 = success
◆ oc_send_discovery_request()
void oc_send_discovery_request |
( |
oc_message_t * |
message | ) |
|
send discovery request
- Parameters
-
◆ oc_tcp_get_csm_state()
retrieve the cms state
- Parameters
-
- Returns
- tcp_csm_state_t the cms state
◆ oc_tcp_update_csm_state()
update the csm state on the tcp connection
- Parameters
-
endpoint | the endpoint |
csm | the cms state |
- Returns
- int 0 = success