#define CA_COMMON_H_
#include "iotivity_config.h"
+#ifdef WITH_PROCESS_EVENT
+#include "ocevent.h"
+#endif
#ifndef WITH_ARDUINO
#ifdef TCP_ADAPTER
/**
* TAG of Analyzer log.
*/
-#define ANALYZER_TAG "OIC_CA_ANALYZER_071801"
-#define BLE_CLIENT_TAG "OIC_CA_LE_CLIENT_0718"
-#define BLE_SERVER_MCD_TAG "OIC_CA_LE_SER_MC_0718"
-#define IP_SERVER_TAG "OIC_CA_IP_SERVER_0718"
-#define TCP_SERVER_TAG "OIC_CA_TCP_SERVER_0718"
+#define ANALYZER_TAG "OIC_CA_ANALYZER_102301"
+#define BLE_CLIENT_TAG "OIC_CA_LE_CLIENT_1023"
+#define BLE_SERVER_MCD_TAG "OIC_CA_LE_SER_MC_1023"
+#define IP_SERVER_TAG "OIC_CA_IP_SERVER_1023"
+#define TCP_SERVER_TAG "OIC_CA_TCP_SERVER_1023"
/**
* IP address Length.
#define CA_MAX_TOKEN_LEN (8)
/**
+* Max interface name length.
+*/
+#define CA_MAX_INTERFACE_NAME_LEN (16)
+
+/**
* Max URI length.
*/
#ifdef ARDUINO
CA_NOT_ACCEPTABLE = 406, /**< Not Acceptable */
CA_REQUEST_ENTITY_INCOMPLETE = 408, /**< Request Entity Incomplete */
CA_REQUEST_ENTITY_TOO_LARGE = 413, /**< Request Entity Too Large */
+ CA_TOO_MANY_REQUESTS = 429, /**< Too Many Requests */
CA_INTERNAL_SERVER_ERROR = 500, /**< Internal Server Error */
CA_NOT_IMPLEMENTED = 501, /**< Not Implenented */
CA_BAD_GATEWAY = 502, /**< Bad Gateway */
CA_RESPONSE_DATA,
CA_ERROR_DATA,
CA_RESPONSE_FOR_RES,
- CA_NETWORK_COMMAND
+ CA_NETWORK_COMMAND,
+ CA_REQUEST_DATA_SERVER_INIT,
+ CA_RESPONSE_DATA_CLIENT_INIT
} CADataType_t;
typedef enum
uint16_t messageId;
char token[CA_MAX_TOKEN_LEN];
uint8_t tokenLength;
+ uint32_t ifindex;
} CAHistoryItem_t;
typedef struct
#endif
#endif
int selectTimeout; /**< in seconds */
- int maxfd; /**< highest fd (for select) */
bool started; /**< the IP adapter has started */
bool terminate; /**< the IP adapter needs to stop */
bool ipv6enabled; /**< IPv6 enabled by OCInit flags */
int shutdownFds[2]; /**< shutdown pipe */
#endif
int connectionFds[2]; /**< connection pipe */
- int maxfd; /**< highest fd (for select) */
bool started; /**< the TCP adapter has started */
bool terminate; /**< the TCP adapter needs to stop */
+ bool bindenabled; /**< binding of TCP socket enabled */
bool ipv4tcpenabled; /**< IPv4 TCP enabled by OCInit flags */
bool ipv6tcpenabled; /**< IPv6 TCP enabled by OCInit flags */
} tcp;
*/
typedef void (*CANetworkMonitorCallback)(const CAEndpoint_t *info, CANetworkStatus_t status);
+/**
+ * Callback function type for editing bluetooth advertisement data before starting bluetooth advertisement.
+ * param[in] max_data_size Maximal size of advertisement data array
+ * param[out] data Advertisement data array
+ * param[out] data_size Actual Data size of advertisement data array
+ */
+typedef void (*CAAdvertisementDataGetterCB)(int max_data_size, char *data, int *data_size);
+
#ifdef __cplusplus
} /* extern "C" */
#endif