adding connectivity documentation
@@ -125,28 +125,84 @@ struct oc_message_s
#endif /* OC_SECURITY */
};
+/**
+ * @brief send buffer
+ *
+ * @param message message to send
+ * @return int 0 = success
+ */
int oc_send_buffer(oc_message_t *message);
+/**
+ * @brief initialize the connectivity (e.g. open sockets) for the device
+ *
+ * @param device the device index
+ * @return int 0 = success
+ */
int oc_connectivity_init(size_t device);
+/**
+ * @brief shut down the connectivity for device at device index
+ *
+ * @param device the device index
+ */
void oc_connectivity_shutdown(size_t device);
+/**
+ * @brief send discovery request
+ *
+ * @param message the message
+ */
void oc_send_discovery_request(oc_message_t *message);
+/**
+ * @brief end session for the specific endpoint
+ *
+ * @param endpoint the endpoint to close the session for
+ */
void oc_connectivity_end_session(oc_endpoint_t *endpoint);
#ifdef OC_DNS_LOOKUP
+/**
+ * @brief dns look up
+ *
+ * @param domain the url
+ * @param addr the address
+ * @param flags the transport flags
+ * @return int 0 = success
+ */
int oc_dns_lookup(const char *domain, oc_string_t *addr,
enum transport_flags flags);
#ifdef OC_DNS_CACHE
+/**
+ * @brief clear the DNS cache
+ *
+ */
void oc_dns_clear_cache(void);
#endif /* OC_DNS_CACHE */
#endif /* OC_DNS_LOOKUP */
+/**
+ * @brief retrieve list of endpoints for the device
+ *
+ * @param device the device index
+ * @return oc_endpoint_t* list of endpoints
+ */
oc_endpoint_t *oc_connectivity_get_endpoints(size_t device);
+/**
+ * @brief the callback function for an network change
+ *
+ * @param event the network event
+ */
void handle_network_interface_event_callback(oc_interface_event_t event);
+/**
+ * @brief the session callback
+ *
+ * @param endpoint endpoint for the session
+ * @param state the state of the session
+ */
void handle_session_event_callback(const oc_endpoint_t *endpoint,
oc_session_state_t state);
