IoTivity-Lite
|
#include "messaging/coap/conf.h"
#include "oc_config.h"
#include "oc_endpoint.h"
#include "oc_export.h"
#include "oc_network_events.h"
#include "oc_session_events.h"
#include "util/oc_atomic.h"
#include "util/oc_features.h"
#include "util/oc_memb.h"
#include "util/oc_process.h"
#include <stddef.h>
#include <stdint.h>
#include "oc_buffer_settings.h"
Macros | |
#define | OC_BLOCK_SIZE (oc_get_block_size()) |
#define | OC_MAX_APP_DATA_SIZE (oc_get_max_app_data_size()) |
#define | OC_MIN_APP_DATA_SIZE (oc_get_min_app_data_size()) |
#define | OC_PDU_SIZE (oc_get_max_app_data_size() + COAP_MAX_HEADER_SIZE) |
Typedefs | |
typedef struct oc_message_s | oc_message_t |
Enumerations | |
enum | oc_tcp_socket_error_t { OC_TCP_SOCKET_ERROR = -1 , OC_TCP_SOCKET_ERROR_NOT_CONNECTED = -2 , OC_TCP_SOCKET_ERROR_TIMEOUT = -3 , OC_TCP_SOCKET_ERROR_EXISTS_CONNECTING , OC_TCP_SOCKET_ERROR_EXISTS_CONNECTED } |
enum | oc_tcp_socket_state_t { OC_TCP_SOCKET_STATE_CONNECTING = 1 , OC_TCP_SOCKET_STATE_CONNECTED } |
enum | tcp_csm_state_t { CSM_NONE , CSM_SENT , CSM_DONE , CSM_ERROR = 255 } |
The CSM states. More... | |
Functions | |
void | oc_connectivity_end_session (const oc_endpoint_t *endpoint) |
end TCP session for the specific endpoint. More... | |
oc_endpoint_t * | oc_connectivity_get_endpoints (size_t device) |
retrieve list of endpoints for the device More... | |
int | oc_dns_lookup (const char *domain, oc_string_t *addr, transport_flags flags) |
dns look up More... | |
int | oc_send_buffer (oc_message_t *message) |
send buffer More... | |
void | oc_send_discovery_request (oc_message_t *message) |
send discovery request More... | |
int | oc_tcp_connection_state (const oc_endpoint_t *endpoint) |
Get state of TCP connection for given endpoint. More... | |
tcp_csm_state_t | oc_tcp_get_csm_state (const oc_endpoint_t *endpoint) |
retrieve the csm state More... | |
int | oc_tcp_update_csm_state (const oc_endpoint_t *endpoint, tcp_csm_state_t csm) |
update the csm state on the tcp connection More... | |
enum tcp_csm_state_t |
void oc_connectivity_end_session | ( | const oc_endpoint_t * | endpoint | ) |
end TCP session for the specific endpoint.
endpoint | the endpoint to close the session for |
oc_endpoint_t* oc_connectivity_get_endpoints | ( | size_t | device | ) |
retrieve list of endpoints for the device
device | the device index |
int oc_dns_lookup | ( | const char * | domain, |
oc_string_t * | addr, | ||
transport_flags | flags | ||
) |
dns look up
domain | the url |
addr | the address |
flags | the transport flags |
int oc_send_buffer | ( | oc_message_t * | message | ) |
send buffer
message | message to send |
void oc_send_discovery_request | ( | oc_message_t * | message | ) |
send discovery request
message | the message |
int oc_tcp_connection_state | ( | const oc_endpoint_t * | endpoint | ) |
Get state of TCP connection for given endpoint.
endpoint | the endpoint (cannot be NULL) |
tcp_csm_state_t oc_tcp_get_csm_state | ( | const oc_endpoint_t * | endpoint | ) |
retrieve the csm state
endpoint | the endpoint |
int oc_tcp_update_csm_state | ( | const oc_endpoint_t * | endpoint, |
tcp_csm_state_t | csm | ||
) |
update the csm state on the tcp connection
endpoint | the endpoint |
csm | the cms state |