mirror of https://github.com/ARMmbed/mbed-os.git
Merge pull request #3517 from hasnainvirk/ONME_2927
[ONME-2927] Socket adaptation layer for nanostackpull/3798/head
commit
769712f2f3
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
features/nanostack/FEATURE_LOWPAN_BORDER_ROUTER/TOOLCHAIN_ARM/TARGET_LIKE_CORTEX_M0/libnanostack_armcc_Cortex-M0_lowpan_border_router.ar
Executable file → Normal file
BIN
features/nanostack/FEATURE_LOWPAN_BORDER_ROUTER/TOOLCHAIN_ARM/TARGET_LIKE_CORTEX_M0/libnanostack_armcc_Cortex-M0_lowpan_border_router.ar
Executable file → Normal file
Binary file not shown.
BIN
features/nanostack/FEATURE_LOWPAN_BORDER_ROUTER/TOOLCHAIN_ARM/TARGET_M3/libnanostack_armcc_Cortex-M3_lowpan_border_router.ar
Executable file → Normal file
BIN
features/nanostack/FEATURE_LOWPAN_BORDER_ROUTER/TOOLCHAIN_ARM/TARGET_M3/libnanostack_armcc_Cortex-M3_lowpan_border_router.ar
Executable file → Normal file
Binary file not shown.
BIN
features/nanostack/FEATURE_LOWPAN_BORDER_ROUTER/TOOLCHAIN_ARM/TARGET_RTOS_M4_M7/libnanostack_armcc_Cortex-M3_lowpan_border_router.ar
Executable file → Normal file
BIN
features/nanostack/FEATURE_LOWPAN_BORDER_ROUTER/TOOLCHAIN_ARM/TARGET_RTOS_M4_M7/libnanostack_armcc_Cortex-M3_lowpan_border_router.ar
Executable file → Normal file
Binary file not shown.
Binary file not shown.
BIN
features/nanostack/FEATURE_LOWPAN_BORDER_ROUTER/TOOLCHAIN_GCC/TARGET_M3/libnanostack_arm-none-eabi-gcc_Cortex-M3_lowpan_border_router.a
Executable file → Normal file
BIN
features/nanostack/FEATURE_LOWPAN_BORDER_ROUTER/TOOLCHAIN_GCC/TARGET_M3/libnanostack_arm-none-eabi-gcc_Cortex-M3_lowpan_border_router.a
Executable file → Normal file
Binary file not shown.
Binary file not shown.
BIN
features/nanostack/FEATURE_LOWPAN_BORDER_ROUTER/TOOLCHAIN_IAR/TARGET_LIKE_CORTEX_M0/libnanostack_iccarm_Cortex-M0_lowpan_border_router.a
Executable file → Normal file
BIN
features/nanostack/FEATURE_LOWPAN_BORDER_ROUTER/TOOLCHAIN_IAR/TARGET_LIKE_CORTEX_M0/libnanostack_iccarm_Cortex-M0_lowpan_border_router.a
Executable file → Normal file
Binary file not shown.
BIN
features/nanostack/FEATURE_LOWPAN_BORDER_ROUTER/TOOLCHAIN_IAR/TARGET_M3/libnanostack_iccarm_Cortex-M3_lowpan_border_router.a
Executable file → Normal file
BIN
features/nanostack/FEATURE_LOWPAN_BORDER_ROUTER/TOOLCHAIN_IAR/TARGET_M3/libnanostack_iccarm_Cortex-M3_lowpan_border_router.a
Executable file → Normal file
Binary file not shown.
BIN
features/nanostack/FEATURE_LOWPAN_BORDER_ROUTER/TOOLCHAIN_IAR/TARGET_RTOS_M4_M7/libnanostack_iccarm_Cortex-M3_lowpan_border_router.a
Executable file → Normal file
BIN
features/nanostack/FEATURE_LOWPAN_BORDER_ROUTER/TOOLCHAIN_IAR/TARGET_RTOS_M4_M7/libnanostack_iccarm_Cortex-M3_lowpan_border_router.a
Executable file → Normal file
Binary file not shown.
BIN
features/nanostack/FEATURE_LOWPAN_HOST/TOOLCHAIN_ARM/TARGET_LIKE_CORTEX_M0/libnanostack_armcc_Cortex-M0_lowpan_host.ar
Executable file → Normal file
BIN
features/nanostack/FEATURE_LOWPAN_HOST/TOOLCHAIN_ARM/TARGET_LIKE_CORTEX_M0/libnanostack_armcc_Cortex-M0_lowpan_host.ar
Executable file → Normal file
Binary file not shown.
BIN
features/nanostack/FEATURE_LOWPAN_HOST/TOOLCHAIN_ARM/TARGET_M3/libnanostack_armcc_Cortex-M3_lowpan_host.ar
Executable file → Normal file
BIN
features/nanostack/FEATURE_LOWPAN_HOST/TOOLCHAIN_ARM/TARGET_M3/libnanostack_armcc_Cortex-M3_lowpan_host.ar
Executable file → Normal file
Binary file not shown.
BIN
features/nanostack/FEATURE_LOWPAN_HOST/TOOLCHAIN_ARM/TARGET_RTOS_M4_M7/libnanostack_armcc_Cortex-M3_lowpan_host.ar
Executable file → Normal file
BIN
features/nanostack/FEATURE_LOWPAN_HOST/TOOLCHAIN_ARM/TARGET_RTOS_M4_M7/libnanostack_armcc_Cortex-M3_lowpan_host.ar
Executable file → Normal file
Binary file not shown.
BIN
features/nanostack/FEATURE_LOWPAN_HOST/TOOLCHAIN_GCC/TARGET_LIKE_CORTEX_M0/libnanostack_arm-none-eabi-gcc_Cortex-M0_lowpan_host.a
Executable file → Normal file
BIN
features/nanostack/FEATURE_LOWPAN_HOST/TOOLCHAIN_GCC/TARGET_LIKE_CORTEX_M0/libnanostack_arm-none-eabi-gcc_Cortex-M0_lowpan_host.a
Executable file → Normal file
Binary file not shown.
BIN
features/nanostack/FEATURE_LOWPAN_HOST/TOOLCHAIN_GCC/TARGET_M3/libnanostack_arm-none-eabi-gcc_Cortex-M3_lowpan_host.a
Executable file → Normal file
BIN
features/nanostack/FEATURE_LOWPAN_HOST/TOOLCHAIN_GCC/TARGET_M3/libnanostack_arm-none-eabi-gcc_Cortex-M3_lowpan_host.a
Executable file → Normal file
Binary file not shown.
BIN
features/nanostack/FEATURE_LOWPAN_HOST/TOOLCHAIN_GCC/TARGET_RTOS_M4_M7/libnanostack_arm-none-eabi-gcc_Cortex-M3_lowpan_host.a
Executable file → Normal file
BIN
features/nanostack/FEATURE_LOWPAN_HOST/TOOLCHAIN_GCC/TARGET_RTOS_M4_M7/libnanostack_arm-none-eabi-gcc_Cortex-M3_lowpan_host.a
Executable file → Normal file
Binary file not shown.
BIN
features/nanostack/FEATURE_LOWPAN_HOST/TOOLCHAIN_IAR/TARGET_LIKE_CORTEX_M0/libnanostack_iccarm_Cortex-M0_lowpan_host.a
Executable file → Normal file
BIN
features/nanostack/FEATURE_LOWPAN_HOST/TOOLCHAIN_IAR/TARGET_LIKE_CORTEX_M0/libnanostack_iccarm_Cortex-M0_lowpan_host.a
Executable file → Normal file
Binary file not shown.
BIN
features/nanostack/FEATURE_LOWPAN_HOST/TOOLCHAIN_IAR/TARGET_M3/libnanostack_iccarm_Cortex-M3_lowpan_host.a
Executable file → Normal file
BIN
features/nanostack/FEATURE_LOWPAN_HOST/TOOLCHAIN_IAR/TARGET_M3/libnanostack_iccarm_Cortex-M3_lowpan_host.a
Executable file → Normal file
Binary file not shown.
BIN
features/nanostack/FEATURE_LOWPAN_HOST/TOOLCHAIN_IAR/TARGET_RTOS_M4_M7/libnanostack_iccarm_Cortex-M3_lowpan_host.a
Executable file → Normal file
BIN
features/nanostack/FEATURE_LOWPAN_HOST/TOOLCHAIN_IAR/TARGET_RTOS_M4_M7/libnanostack_iccarm_Cortex-M3_lowpan_host.a
Executable file → Normal file
Binary file not shown.
BIN
features/nanostack/FEATURE_LOWPAN_ROUTER/TOOLCHAIN_ARM/TARGET_LIKE_CORTEX_M0/libnanostack_armcc_Cortex-M0_lowpan_router.ar
Executable file → Normal file
BIN
features/nanostack/FEATURE_LOWPAN_ROUTER/TOOLCHAIN_ARM/TARGET_LIKE_CORTEX_M0/libnanostack_armcc_Cortex-M0_lowpan_router.ar
Executable file → Normal file
Binary file not shown.
BIN
features/nanostack/FEATURE_LOWPAN_ROUTER/TOOLCHAIN_ARM/TARGET_M3/libnanostack_armcc_Cortex-M3_lowpan_router.ar
Executable file → Normal file
BIN
features/nanostack/FEATURE_LOWPAN_ROUTER/TOOLCHAIN_ARM/TARGET_M3/libnanostack_armcc_Cortex-M3_lowpan_router.ar
Executable file → Normal file
Binary file not shown.
BIN
features/nanostack/FEATURE_LOWPAN_ROUTER/TOOLCHAIN_ARM/TARGET_RTOS_M4_M7/libnanostack_armcc_Cortex-M3_lowpan_router.ar
Executable file → Normal file
BIN
features/nanostack/FEATURE_LOWPAN_ROUTER/TOOLCHAIN_ARM/TARGET_RTOS_M4_M7/libnanostack_armcc_Cortex-M3_lowpan_router.ar
Executable file → Normal file
Binary file not shown.
BIN
features/nanostack/FEATURE_LOWPAN_ROUTER/TOOLCHAIN_GCC/TARGET_LIKE_CORTEX_M0/libnanostack_arm-none-eabi-gcc_Cortex-M0_lowpan_router.a
Executable file → Normal file
BIN
features/nanostack/FEATURE_LOWPAN_ROUTER/TOOLCHAIN_GCC/TARGET_LIKE_CORTEX_M0/libnanostack_arm-none-eabi-gcc_Cortex-M0_lowpan_router.a
Executable file → Normal file
Binary file not shown.
BIN
features/nanostack/FEATURE_LOWPAN_ROUTER/TOOLCHAIN_GCC/TARGET_M3/libnanostack_arm-none-eabi-gcc_Cortex-M3_lowpan_router.a
Executable file → Normal file
BIN
features/nanostack/FEATURE_LOWPAN_ROUTER/TOOLCHAIN_GCC/TARGET_M3/libnanostack_arm-none-eabi-gcc_Cortex-M3_lowpan_router.a
Executable file → Normal file
Binary file not shown.
BIN
features/nanostack/FEATURE_LOWPAN_ROUTER/TOOLCHAIN_GCC/TARGET_RTOS_M4_M7/libnanostack_arm-none-eabi-gcc_Cortex-M3_lowpan_router.a
Executable file → Normal file
BIN
features/nanostack/FEATURE_LOWPAN_ROUTER/TOOLCHAIN_GCC/TARGET_RTOS_M4_M7/libnanostack_arm-none-eabi-gcc_Cortex-M3_lowpan_router.a
Executable file → Normal file
Binary file not shown.
BIN
features/nanostack/FEATURE_LOWPAN_ROUTER/TOOLCHAIN_IAR/TARGET_LIKE_CORTEX_M0/libnanostack_iccarm_Cortex-M0_lowpan_router.a
Executable file → Normal file
BIN
features/nanostack/FEATURE_LOWPAN_ROUTER/TOOLCHAIN_IAR/TARGET_LIKE_CORTEX_M0/libnanostack_iccarm_Cortex-M0_lowpan_router.a
Executable file → Normal file
Binary file not shown.
BIN
features/nanostack/FEATURE_LOWPAN_ROUTER/TOOLCHAIN_IAR/TARGET_M3/libnanostack_iccarm_Cortex-M3_lowpan_router.a
Executable file → Normal file
BIN
features/nanostack/FEATURE_LOWPAN_ROUTER/TOOLCHAIN_IAR/TARGET_M3/libnanostack_iccarm_Cortex-M3_lowpan_router.a
Executable file → Normal file
Binary file not shown.
BIN
features/nanostack/FEATURE_LOWPAN_ROUTER/TOOLCHAIN_IAR/TARGET_RTOS_M4_M7/libnanostack_iccarm_Cortex-M3_lowpan_router.a
Executable file → Normal file
BIN
features/nanostack/FEATURE_LOWPAN_ROUTER/TOOLCHAIN_IAR/TARGET_RTOS_M4_M7/libnanostack_iccarm_Cortex-M3_lowpan_router.a
Executable file → Normal file
Binary file not shown.
|
@ -1,4 +0,0 @@
|
|||
unittest/*
|
||||
test/*
|
||||
doxygen/*
|
||||
|
|
@ -1,27 +0,0 @@
|
|||
{
|
||||
"name": "coap-service",
|
||||
"version": "4.0.3",
|
||||
"description": "CoAP Service library",
|
||||
"keywords": [
|
||||
"coap",
|
||||
"service"
|
||||
],
|
||||
"repository": {
|
||||
"url": "git@github.com:ARMmbed/coap-service.git",
|
||||
"type": "git"
|
||||
},
|
||||
"homepage": "https://github.com/ARMmbed/coap-service",
|
||||
"license": "Apache-2.0",
|
||||
"extraIncludes": [
|
||||
"coap-service",
|
||||
"nanostack-event-loop",
|
||||
"source/include"
|
||||
],
|
||||
"dependencies": {
|
||||
"nanostack-libservice": "^3.0.0",
|
||||
"mbed-client-c": "^3.0.0",
|
||||
"sal-stack-nanostack": "^5.0.0",
|
||||
"mbedtls": "^2.0.0"
|
||||
},
|
||||
"targetDependencies": {}
|
||||
}
|
|
@ -32,7 +32,7 @@ typedef struct internal_socket_s {
|
|||
int16_t data_len;
|
||||
uint8_t *data;
|
||||
|
||||
int8_t socket;
|
||||
int8_t socket; //positive value = socket id, negative value virtual socket id
|
||||
bool real_socket;
|
||||
uint8_t usage_counter;
|
||||
bool is_secure;
|
||||
|
@ -46,6 +46,11 @@ static NS_LIST_DEFINE(socket_list, internal_socket_t, link);
|
|||
|
||||
static void timer_cb(void* param);
|
||||
|
||||
static void recv_sckt_msg(void *cb_res);
|
||||
#ifdef COAP_SECURITY_AVAILABLE
|
||||
static void secure_recv_sckt_msg(void *cb_res);
|
||||
#endif
|
||||
|
||||
#define TIMER_STATE_CANCELLED -1 /* cancelled */
|
||||
#define TIMER_STATE_NO_EXPIRY 0 /* none of the delays is expired */
|
||||
#define TIMER_STATE_INT_EXPIRY 1 /* the intermediate delay only is expired */
|
||||
|
@ -92,6 +97,17 @@ static secure_session_t *secure_session_find_by_timer_id(int8_t timer_id)
|
|||
return this;
|
||||
}
|
||||
|
||||
static bool is_secure_session_valid(secure_session_t *session)
|
||||
{
|
||||
secure_session_t *this = NULL;
|
||||
ns_list_foreach(secure_session_t, cur_ptr, &secure_session_list) {
|
||||
if (cur_ptr == session) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
static void secure_session_delete(secure_session_t *this)
|
||||
{
|
||||
if (this) {
|
||||
|
@ -111,6 +127,17 @@ static void secure_session_delete(secure_session_t *this)
|
|||
return;
|
||||
}
|
||||
|
||||
static int8_t virtual_socket_id_allocate()
|
||||
{
|
||||
int8_t new_virtual_socket_id = -1; // must not overlap with real socket id's
|
||||
ns_list_foreach(internal_socket_t, cur_ptr, &socket_list) {
|
||||
if (cur_ptr->socket <= new_virtual_socket_id) {
|
||||
new_virtual_socket_id = cur_ptr->socket - 1;
|
||||
}
|
||||
}
|
||||
return new_virtual_socket_id;
|
||||
}
|
||||
|
||||
static secure_session_t *secure_session_create(internal_socket_t *parent, const uint8_t *address_ptr, uint16_t port)
|
||||
{
|
||||
if(!address_ptr){
|
||||
|
@ -195,11 +222,6 @@ static secure_session_t *secure_session_find(internal_socket_t *parent, const ui
|
|||
return this;
|
||||
}
|
||||
|
||||
|
||||
|
||||
static void recv_sckt_msg(void *cb_res);
|
||||
static void secure_recv_sckt_msg(void *cb_res);
|
||||
|
||||
static internal_socket_t *int_socket_create(uint16_t listen_port, bool use_ephemeral_port, bool is_secure, bool real_socket, bool bypassSec)
|
||||
{
|
||||
internal_socket_t *this = ns_dyn_mem_alloc(sizeof(internal_socket_t));
|
||||
|
@ -245,8 +267,8 @@ static internal_socket_t *int_socket_create(uint16_t listen_port, bool use_ephem
|
|||
// Set socket option to receive packet info
|
||||
socket_setsockopt(this->socket, SOCKET_IPPROTO_IPV6, SOCKET_IPV6_RECVPKTINFO, &(const bool) {1}, sizeof(bool));
|
||||
|
||||
}else{
|
||||
this->socket = -1;
|
||||
} else {
|
||||
this->socket = virtual_socket_id_allocate();
|
||||
}
|
||||
|
||||
ns_list_add_to_start(&socket_list, this);
|
||||
|
@ -300,16 +322,18 @@ static internal_socket_t *int_socket_find(uint16_t port, bool is_secure, bool is
|
|||
return this;
|
||||
}
|
||||
|
||||
static int8_t send_to_real_socket(int8_t socket_id, const ns_address_t *address, const uint8_t source_address[static 16], const void *buffer, uint16_t length)
|
||||
static int send_to_real_socket(int8_t socket_id, const ns_address_t *address, const uint8_t source_address[static 16], const void *buffer, uint16_t length)
|
||||
{
|
||||
ns_iovec_t msg_iov;
|
||||
ns_msghdr_t msghdr;
|
||||
|
||||
msghdr.msg_name = (void*)address;
|
||||
msghdr.msg_namelen = sizeof(ns_address_t);
|
||||
msghdr.msg_iov = &msg_iov;
|
||||
msghdr.msg_iovlen = 1;
|
||||
msghdr.flags = 0;
|
||||
ns_iovec_t msg_iov = {
|
||||
.iov_base = (void *) buffer,
|
||||
.iov_len = length
|
||||
};
|
||||
ns_msghdr_t msghdr = {
|
||||
.msg_name = (void *) address,
|
||||
.msg_namelen = sizeof(ns_address_t),
|
||||
.msg_iov = &msg_iov,
|
||||
.msg_iovlen = 1
|
||||
};
|
||||
|
||||
if (memcmp(source_address, ns_in6addr_any, 16)) {
|
||||
uint8_t ancillary_databuffer[NS_CMSG_SPACE(sizeof(ns_in6_pktinfo_t))];
|
||||
|
@ -328,14 +352,8 @@ static int8_t send_to_real_socket(int8_t socket_id, const ns_address_t *address,
|
|||
pktinfo = (ns_in6_pktinfo_t*)NS_CMSG_DATA(cmsg);
|
||||
pktinfo->ipi6_ifindex = 0;
|
||||
memcpy(pktinfo->ipi6_addr, source_address, 16);
|
||||
} else {
|
||||
msghdr.msg_control = NULL;
|
||||
msghdr.msg_controllen = 0;
|
||||
}
|
||||
|
||||
msg_iov.iov_base = (void *)buffer;
|
||||
msg_iov.iov_len = length;
|
||||
|
||||
return socket_sendmsg(socket_id, &msghdr, 0);
|
||||
}
|
||||
|
||||
|
@ -364,7 +382,7 @@ static int secure_session_sendto(int8_t socket_id, void *handle, const void *buf
|
|||
//For some reason socket_sendto returns 0 in success, while other socket impls return number of bytes sent!!!
|
||||
//TODO: check if address_ptr is valid and use that instead if it is
|
||||
|
||||
int8_t ret = send_to_real_socket(sock->socket, &session->remote_host, session->local_address, buf, len);
|
||||
int ret = send_to_real_socket(sock->socket, &session->remote_host, session->local_address, buf, len);
|
||||
if (ret < 0) {
|
||||
return ret;
|
||||
}
|
||||
|
@ -395,7 +413,8 @@ static int secure_session_recvfrom(int8_t socket_id, unsigned char *buf, size_t
|
|||
static void timer_cb(void *param)
|
||||
{
|
||||
secure_session_t *sec = param;
|
||||
if( sec ){
|
||||
|
||||
if( sec && is_secure_session_valid(sec)){
|
||||
if(sec->timer.fin_ms > sec->timer.int_ms){
|
||||
/* Intermediate expiry */
|
||||
sec->timer.fin_ms -= sec->timer.int_ms;
|
||||
|
@ -483,7 +502,6 @@ static int read_data(socket_callback_t *sckt_data, internal_socket_t *sock, ns_a
|
|||
msghdr.msg_iovlen = 1;
|
||||
msghdr.msg_control = ancillary_databuffer;
|
||||
msghdr.msg_controllen = sizeof(ancillary_databuffer);
|
||||
msghdr.flags = 0;
|
||||
|
||||
msg_iov.iov_base = sock->data;
|
||||
msg_iov.iov_len = sckt_data->d_len;
|
||||
|
@ -511,6 +529,8 @@ static int read_data(socket_callback_t *sckt_data, internal_socket_t *sock, ns_a
|
|||
} else {
|
||||
goto return_failure;
|
||||
}
|
||||
} else {
|
||||
goto return_failure;
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
@ -524,6 +544,7 @@ return_failure:
|
|||
|
||||
}
|
||||
|
||||
#ifdef COAP_SECURITY_AVAILABLE
|
||||
static void secure_recv_sckt_msg(void *cb_res)
|
||||
{
|
||||
socket_callback_t *sckt_data = cb_res;
|
||||
|
@ -606,6 +627,7 @@ static void secure_recv_sckt_msg(void *cb_res)
|
|||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
static void recv_sckt_msg(void *cb_res)
|
||||
{
|
||||
|
|
|
@ -75,12 +75,19 @@ static int get_timer( void *sec_obj );
|
|||
static int coap_security_handler_configure_keys( coap_security_t *sec, coap_security_keys_t keys );
|
||||
|
||||
int entropy_poll( void *data, unsigned char *output, size_t len, size_t *olen );
|
||||
|
||||
//Point these back to M2MConnectionHandler!!!
|
||||
int f_send( void *ctx, const unsigned char *buf, size_t len );
|
||||
int f_recv(void *ctx, unsigned char *buf, size_t len);
|
||||
|
||||
static int coap_security_handler_init(coap_security_t *sec){
|
||||
const char *pers = "dtls_client";
|
||||
#ifdef COAP_SERVICE_PROVIDE_STRONG_ENTROPY_SOURCE
|
||||
const int entropy_source_type = MBEDTLS_ENTROPY_SOURCE_STRONG;
|
||||
#else
|
||||
const int entropy_source_type = MBEDTLS_ENTROPY_SOURCE_WEAK;
|
||||
#endif
|
||||
|
||||
mbedtls_ssl_init( &sec->_ssl );
|
||||
mbedtls_ssl_config_init( &sec->_conf );
|
||||
mbedtls_ctr_drbg_init( &sec->_ctr_drbg );
|
||||
|
@ -97,10 +104,8 @@ static int coap_security_handler_init(coap_security_t *sec){
|
|||
|
||||
sec->_is_started = false;
|
||||
|
||||
//TODO: Must have at least 1 strong entropy source, otherwise DTLS will fail.
|
||||
//This is NOT strong even we say it is!
|
||||
if( mbedtls_entropy_add_source( &sec->_entropy, entropy_poll, NULL,
|
||||
128, 1 ) < 0 ){
|
||||
128, entropy_source_type ) < 0 ){
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
|
|
@ -127,14 +127,14 @@ static uint8_t coap_tx_function(uint8_t *data_ptr, uint16_t data_len, sn_nsdl_ad
|
|||
ns_address_t dest_addr;
|
||||
|
||||
if (!transaction_ptr || !data_ptr) {
|
||||
return -1;
|
||||
return 0;
|
||||
}
|
||||
|
||||
tr_debug("Service %d, CoAP TX Function - mid: %d", transaction_ptr->service_id, common_read_16_bit(data_ptr + 2));
|
||||
|
||||
this = service_find(transaction_ptr->service_id);
|
||||
if (!this) {
|
||||
return -1;
|
||||
return 0;
|
||||
}
|
||||
|
||||
memcpy(&(dest_addr.address), address_ptr->addr_ptr, 16);
|
||||
|
@ -235,7 +235,7 @@ static int send_cb(int8_t socket_id, const uint8_t address[static 16], uint16_t
|
|||
{
|
||||
coap_service_t *this = service_find_by_socket(socket_id);
|
||||
if (this && this->virtual_socket_send_cb) {
|
||||
tr_debug("send to virtual socket");
|
||||
tr_debug("send to virtual socket, service: %d", this->service_id);
|
||||
return this->virtual_socket_send_cb(this->service_id, (uint8_t*)address, port, data_ptr, data_len);
|
||||
}
|
||||
return -1;
|
||||
|
@ -380,7 +380,7 @@ int16_t coap_service_virtual_socket_recv(int8_t service_id, uint8_t source_addr_
|
|||
int16_t coap_service_virtual_socket_set_cb(int8_t service_id, coap_service_virtual_socket_send_cb *send_method_ptr)
|
||||
{
|
||||
coap_service_t *this = service_find(service_id);
|
||||
tr_debug("register virtual socket cb");
|
||||
tr_debug("register virtual socket cb to service %d", service_id);
|
||||
if (!this) {
|
||||
return -1;
|
||||
}
|
||||
|
|
|
@ -18,9 +18,7 @@
|
|||
#ifndef __COAP_SECURITY_HANDLER_H__
|
||||
#define __COAP_SECURITY_HANDLER_H__
|
||||
|
||||
#include <stddef.h>
|
||||
#include <inttypes.h>
|
||||
#include <stdbool.h>
|
||||
#include "ns_types.h"
|
||||
|
||||
#ifdef NS_USE_EXTERNAL_MBED_TLS
|
||||
#include "mbedtls/ssl.h"
|
||||
|
@ -99,6 +97,8 @@ const void *coap_security_handler_keyblock(const coap_security_t *sec);
|
|||
|
||||
#else
|
||||
|
||||
NS_DUMMY_DEFINITIONS_OK
|
||||
|
||||
/* Dummy definitions, including needed error codes */
|
||||
#define MBEDTLS_ERR_SSL_TIMEOUT (-1)
|
||||
#define MBEDTLS_ERR_SSL_WANT_READ (-2)
|
||||
|
|
|
@ -252,22 +252,22 @@ bool test_coap_callbacks()
|
|||
addr.addr_len = 2;
|
||||
addr.port = 4;
|
||||
addr.addr_ptr = &data;
|
||||
if( 255 != coap_message_handler_stub.coap_ptr->sn_coap_tx_callback(NULL, 0, &addr, NULL))
|
||||
if( 0 != coap_message_handler_stub.coap_ptr->sn_coap_tx_callback(NULL, 0, &addr, NULL))
|
||||
return false;
|
||||
|
||||
coap_transaction_t *tr = (coap_transaction_t *)malloc(sizeof(coap_transaction_t));
|
||||
memset(tr, 0, sizeof(coap_transaction_t));
|
||||
|
||||
if( 255 != coap_message_handler_stub.coap_ptr->sn_coap_tx_callback(&data, 0, &addr, tr))
|
||||
if( 0 != coap_message_handler_stub.coap_ptr->sn_coap_tx_callback(&data, 0, &addr, tr))
|
||||
return false;
|
||||
|
||||
tr->service_id = 1;
|
||||
thread_conn_handler_stub.int_value = -2;
|
||||
if( 255 != coap_message_handler_stub.coap_ptr->sn_coap_tx_callback(&data, 0, &addr, tr))
|
||||
if( 0 != coap_message_handler_stub.coap_ptr->sn_coap_tx_callback(&data, 0, &addr, tr))
|
||||
return false;
|
||||
|
||||
nsdynmemlib_stub.returnCounter = 1;
|
||||
if( 255 != coap_message_handler_stub.coap_ptr->sn_coap_tx_callback(&data, 2, &addr, tr))
|
||||
if( 0 != coap_message_handler_stub.coap_ptr->sn_coap_tx_callback(&data, 2, &addr, tr))
|
||||
return false;
|
||||
|
||||
free(tr->data_ptr);
|
||||
|
|
|
@ -9,11 +9,6 @@
|
|||
|
||||
eventOs_event_stub_def eventOs_event_stub;
|
||||
|
||||
int8_t eventOS_event_send(arm_event_s *event)
|
||||
{
|
||||
return eventOs_event_stub.int8_value;
|
||||
}
|
||||
|
||||
int8_t eventOS_event_handler_create(void (*handler_func_ptr)(arm_event_s *), uint8_t init_event_type)
|
||||
{
|
||||
eventOs_event_stub.event_ptr = handler_func_ptr;
|
||||
|
|
|
@ -58,14 +58,6 @@ int8_t socket_bind(int8_t socket, const ns_address_t *address)
|
|||
return socket_api_stub.int8_value;
|
||||
}
|
||||
|
||||
int8_t socket_send(int8_t socket, uint8_t *buffer, uint16_t length)
|
||||
{
|
||||
if( socket_api_stub.counter >= 0){
|
||||
return socket_api_stub.values[socket_api_stub.counter--];
|
||||
}
|
||||
|
||||
return socket_api_stub.int8_value;
|
||||
}
|
||||
int16_t socket_read(int8_t socket, ns_address_t *address, uint8_t *buffer, uint16_t length)
|
||||
{
|
||||
if( address ){
|
||||
|
@ -78,15 +70,7 @@ int16_t socket_read(int8_t socket, ns_address_t *address, uint8_t *buffer, uint1
|
|||
|
||||
return socket_api_stub.int8_value;
|
||||
}
|
||||
int8_t socket_sendto(int8_t socket, ns_address_t *address, uint8_t *buffer, uint16_t length)
|
||||
{
|
||||
if( socket_api_stub.counter >= 0){
|
||||
return socket_api_stub.values[socket_api_stub.counter--];
|
||||
}
|
||||
|
||||
return socket_api_stub.int8_value;
|
||||
}
|
||||
int8_t socket_read_session_address(int8_t socket, ns_address_t *address)
|
||||
int8_t socket_getpeername(int8_t socket, ns_address_t *address)
|
||||
{
|
||||
if( socket_api_stub.counter >= 0){
|
||||
return socket_api_stub.values[socket_api_stub.counter--];
|
||||
|
@ -110,8 +94,7 @@ int8_t socket_getsockopt(int8_t socket, uint8_t level, uint8_t opt_name, void *o
|
|||
|
||||
return socket_api_stub.int8_value;
|
||||
}
|
||||
|
||||
int8_t socket_sendmsg(int8_t socket, const ns_msghdr_t *msg, int flags)
|
||||
int16_t socket_sendmsg(int8_t socket, const ns_msghdr_t *msg, int flags)
|
||||
{
|
||||
if( socket_api_stub.counter >= 0){
|
||||
return socket_api_stub.values[socket_api_stub.counter--];
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -26,6 +26,8 @@
|
|||
#include "NanostackEthernetInterface.h"
|
||||
#include "MeshInterfaceNanostack.h"
|
||||
|
||||
struct ns_address;
|
||||
|
||||
class NanostackInterface : public NetworkStack {
|
||||
public:
|
||||
static NanostackInterface *get_stack();
|
||||
|
@ -229,6 +231,8 @@ protected:
|
|||
virtual nsapi_error_t getsockopt(void *handle, int level, int optname, void *optval, unsigned *optlen);
|
||||
|
||||
private:
|
||||
nsapi_size_or_error_t do_sendto(void *handle, const struct ns_address *address, const void *data, nsapi_size_t size);
|
||||
char text_ip_address[40];
|
||||
static NanostackInterface * _ns_interface;
|
||||
};
|
||||
|
||||
|
|
|
@ -0,0 +1,42 @@
|
|||
/*
|
||||
* Copyright (c) 2017 ARM Limited. All rights reserved.
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
* Licensed under the Apache License, Version 2.0 (the License); you may
|
||||
* not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an AS IS BASIS, WITHOUT
|
||||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#ifndef NANOSTACK_LOCK_GUARD_H_
|
||||
#define NANOSTACK_LOCK_GUARD_H_
|
||||
|
||||
#include "eventOS_scheduler.h"
|
||||
|
||||
/**
|
||||
* RAII style Nanostack mutex acquisition.
|
||||
* Mutex is held until object leaves scope.
|
||||
*/
|
||||
|
||||
class NanostackLockGuard {
|
||||
public:
|
||||
NanostackLockGuard() {
|
||||
eventOS_scheduler_mutex_wait();
|
||||
}
|
||||
|
||||
~NanostackLockGuard() {
|
||||
eventOS_scheduler_mutex_release();
|
||||
}
|
||||
|
||||
private:
|
||||
NanostackLockGuard(const NanostackLockGuard&);
|
||||
NanostackLockGuard& operator=(const NanostackLockGuard&);
|
||||
};
|
||||
|
||||
#endif /* NANOSTACK_LOCK_GUARD_H_ */
|
|
@ -82,16 +82,17 @@ Member|Description
|
|||
Event type|Description
|
||||
----------|-----------
|
||||
`SOCKET_DATA`|Data received.
|
||||
`SOCKET_BIND_DONE`|TCP connection ready.
|
||||
`SOCKET_BIND_FAIL`|TCP connection failed.
|
||||
`SOCKET_BIND_AUTH_FAIL`|TCP connection authentication failed.
|
||||
`SOCKET_CONNECT_DONE`|TCP connection ready.
|
||||
`SOCKET_CONNECT_FAIL`|TCP connection failed.
|
||||
`SOCKET_CONNECT_AUTH_FAIL`|TCP connection authentication failed.
|
||||
`SOCKET_INCOMING_CONNECTION`|TCP connection state change from listen to establishment.
|
||||
`SOCKET_TX_FAIL`|Socket data send failed.
|
||||
`SOCKET_CONNECT_CLOSED`|TCP connection closed.
|
||||
`SOCKET_CONNECTION_RESET`|TCP connection reset.
|
||||
`SOCKET_NO_ROUTER`|No route available to destination.
|
||||
`SOCKET_TX_DONE`|Last socket TX process done, in TCP case whole TCP process is ready.
|
||||
`SOCKET_TX_DONE`|TX process done (one per datagram, or if stream will be called each time some data acknowledged)
|
||||
`SOCKET_NO_RAM `|If no RAM is present.
|
||||
`SOCKET_CONNECTION_PROBLEM`|If TCP is suffering a connection problem (a soft event, it continues to retry).
|
||||
|
||||
An example parsing socket event:
|
||||
|
||||
|
@ -102,7 +103,7 @@ An example parsing socket event:
|
|||
static uint8_t rx_buffer[APP_SOCK_RX_SIZE];
|
||||
|
||||
void main_receive
|
||||
(
|
||||
(SOCKET_NO_ROUTER
|
||||
void *cb
|
||||
)
|
||||
{
|
||||
|
@ -248,6 +249,31 @@ Parameter|Description
|
|||
<dd>-6 bind2addrsel is not supported on this type of socket.</dd>
|
||||
</dl>
|
||||
|
||||
### How to connect a socket
|
||||
|
||||
To connect a socket to a remote host:
|
||||
|
||||
```
|
||||
int8_t socket_connect
|
||||
(
|
||||
int8_t socket,
|
||||
ns_address_t *address,
|
||||
uint8_t randomly_take_src_numbers
|
||||
)
|
||||
```
|
||||
|
||||
Parameter|Description
|
||||
---------|-----------
|
||||
`socket`|The socket ID, which is used to connect to the remote host.
|
||||
`address`|A pointer to an <code>address_t</code> structure that contains the address of the remote host.
|
||||
`randomly_take_src_numbers`|Value 1 indicates that a randomly selected source port number is used.
|
||||
|
||||
<dl>
|
||||
<dt>Return value</dt>
|
||||
<dd>0 Valid request.</dd>
|
||||
<dd>-1 Fail.</dd>
|
||||
</dl>
|
||||
|
||||
### How to read data from a socket
|
||||
|
||||
To read received data from a socket:
|
||||
|
@ -300,9 +326,9 @@ _Table 3-24_ describes the possible response events when the outcome of the func
|
|||
|
||||
Response Event|Socket Type|Description
|
||||
--------------|-----------|-----------
|
||||
`SOCKET_TX_DONE`|TCP/UDP|UDP link layer TX ready/TCP TX process ready by TCP _Acknowledgement_ (ACK).
|
||||
`SOCKET_TX_FAIL`|UDP|UDP link layer TX fails.
|
||||
`SOCKET_CONNECTION_RESET`|TCP|TX process fails and connection closed.
|
||||
`SOCKET_TX_DONE`|TCP/UDP|UDP: link layer TX ready (d_len = length of datagram). TCP: some data acknowledged (d_len = unacknowledged data remaining in send queue).
|
||||
`SOCKET_TX_FAIL`|TCP/UDP|UDP: link layer TX fails. TCP: transmit timeout (no ACKs) and connection closed.
|
||||
`SOCKET_CONNECTION_RESET`|TCP|Either the peer reset the connection or there was a protocol error. Connection closed.
|
||||
|
||||
To transmit data on an unconnected socket:
|
||||
|
||||
|
@ -364,7 +390,7 @@ The TCP socket configuration API offers three function calls, as shown in _Table
|
|||
Function|Description
|
||||
--------|-----------
|
||||
`socket_listen()`|Set socket to the listen state.
|
||||
`socket_connect()`|Connect socket to a host.
|
||||
`socket_accept()`|Accepts an incoming TCP connection.
|
||||
`socket_shutdown()`|Shut down socket connection.
|
||||
|
||||
To set a TCP socket into the listen state:
|
||||
|
@ -380,47 +406,50 @@ int8_t socket_listen
|
|||
Parameter|Description
|
||||
---------|-----------
|
||||
`socket`|The socket ID that is to be set to the listen state.
|
||||
`backlog`|The pending connections queue size. (Not yet implemented).
|
||||
`backlog`|The pending connections queue size.
|
||||
|
||||
<dl>
|
||||
<dt>Return value</dt>
|
||||
<dd>0 Valid request.</dd>
|
||||
<dd><b>Note:</b> This does not imply that the state of the socket has been successfully changed.</dd>
|
||||
<dd>-1 Fail.</dd>
|
||||
</dl>
|
||||
|
||||
To connect a socket to a remote host:
|
||||
For connecting a socket, please refer to the section above [How to connect a socket](#how-to-connect-a-socket).
|
||||
|
||||
There are three possible responses from the stack for `socket_connect( )`:
|
||||
|
||||
- `SOCKET_CONNECT_DONE`
|
||||
- TCP handshake ready.
|
||||
|
||||
- `SOCKET_CONNECT_FAIL`
|
||||
- TCP handshake fail - connection actively refused or protocol error.
|
||||
|
||||
- `SOCKET_TX_FAIL`
|
||||
- TCP handshake fail - timed out.
|
||||
|
||||
For accepting an incoming TCP connection, use `socket_accept()` function.
|
||||
|
||||
```
|
||||
int8_t socket_connect
|
||||
int8_t socket_accept()
|
||||
(
|
||||
int8_t socket,
|
||||
ns_address_t *address,
|
||||
uint8_t randomly_take_src_numbers
|
||||
int8_t listen_socket_id,
|
||||
ns_address_t *addr,
|
||||
void (*passed_fptr) (void *)
|
||||
)
|
||||
```
|
||||
|
||||
Parameter|Description
|
||||
---------|-----------
|
||||
`socket`|The socket ID, which is used to connect to the remote host.
|
||||
`address`|A pointer to an <code>address_t</code> structure that contains the address of the remote host.
|
||||
`randomly_take_src_numbers`|Value 1 indicates that a randomly selected source port number is used.
|
||||
`listen_socket_id`|The socket ID of the listening socket.
|
||||
`addr`|Pointer to the address structure where you wish to save the address
|
||||
`passed_fptr`|A function pointer to a function that is called whenever a data frame is received to the new socket
|
||||
|
||||
<dl>
|
||||
<dt>Return value</dt>
|
||||
<dd>0 Valid request.</dd>
|
||||
<dd><b>Note:</b>This does not imply that the state of the socket has been successfully changed.</dd>
|
||||
<dd>0 or greter than zero, i.e., id for the new socket.</dd>
|
||||
<dd>-1 Fail.</dd>
|
||||
</dl>
|
||||
|
||||
There are two possible responses from the stack for `socket_connect( )`:
|
||||
|
||||
- `SOCKET_BIND_DONE`
|
||||
- TCP handshake ready.
|
||||
|
||||
- `SOCKET_CONNECT_FAIL_CLOSED`
|
||||
- TCP handshake fail.
|
||||
|
||||
To shut down a TCP connection:
|
||||
|
||||
```
|
||||
|
|
|
@ -59,7 +59,9 @@ initializing.
|
|||
|
||||
![NanostackRfPhy](img/NanostackRfPhy.png)
|
||||
|
||||
Applications use only `LoWPANNDInterface` or `ThreadInterface` directly to set up the network and provide a driver. Rest of the classes provide an abstration between Nanostack and Socket layers of mbed OS.
|
||||
Applications use only `LoWPANNDInterface`, `ThreadInterface` or `NanostackEthernetInterface`
|
||||
directly to set up the network and provide a driver. Rest of the classes provide an abstration
|
||||
between Nanostack and Socket layers of mbed OS.
|
||||
|
||||
See [NanostackRfPhy.h](https://github.com/ARMmbed/mbed-os/blob/master/features/nanostack/FEATURE_NANOSTACK/nanostack-interface/NanostackRfPhy.h) for an up-to-date header file and API.
|
||||
|
||||
|
|
|
@ -1,28 +1,66 @@
|
|||
@startuml
|
||||
|
||||
class NanostackRfPhy {
|
||||
+int8_t rf_register()
|
||||
+int8_t rf_register()
|
||||
+void get_mac_address(uint8_t *mac)
|
||||
+void set_mac_address(uint8_t *mac)
|
||||
package "mbed OS Socket abstraction" {
|
||||
abstract class MeshInterface -|> NetworkInterface
|
||||
|
||||
interface NetworkInterface {
|
||||
+connect();
|
||||
+disconnect();
|
||||
+NetworkStack *get_stack();
|
||||
}
|
||||
|
||||
interface NetworkStack
|
||||
}
|
||||
|
||||
class MeshInterfaceNanostack {
|
||||
package "Nanostack PHY driver interface" {
|
||||
interface NanostackPhy {
|
||||
+int8_t phy_register()
|
||||
+void get_mac_address(uint8_t *mac)
|
||||
+void set_mac_address(uint8_t *mac)
|
||||
}
|
||||
NanostackPhy <|-- abstract class NanostackRfPhy
|
||||
NanostackPhy <|-- abstract class NanostackEthernetPhy
|
||||
}
|
||||
MeshInterfaceNanostack o-- NanostackRfPhy
|
||||
MeshInterfaceNanostack o-- AbstractMesh
|
||||
MeshInterfaceNanostack o-- NanostackInterface
|
||||
|
||||
class MeshInterface {
|
||||
package "mesh API internals" {
|
||||
class NanostackInterface {
|
||||
{static} +NanostackInterface *get_stack()
|
||||
#socket_open()
|
||||
#socket_close()
|
||||
#socket_bind()
|
||||
#socket_listen()
|
||||
#socket_connect()
|
||||
#socket_accept()
|
||||
#socket_send()
|
||||
#socket_recv()
|
||||
#socket_sendto()
|
||||
#socket_recvfrom()
|
||||
#socket_attach()
|
||||
#setsockopt()
|
||||
#getsockopt()
|
||||
}
|
||||
NetworkStack <|-- NanostackInterface
|
||||
|
||||
abstract class MeshInterfaceNanostack {
|
||||
+initialize(NanostackPhy *phy)
|
||||
+connect()
|
||||
+disconnect()
|
||||
#NetworkStack *get_stack(void)
|
||||
}
|
||||
MeshInterface <|-- MeshInterfaceNanostack
|
||||
NanostackPhy --o MeshInterfaceNanostack
|
||||
MeshInterfaceNanostack -left-> NanostackInterface : get_stack()
|
||||
}
|
||||
NanostackInterface --|> NetworkStack
|
||||
MeshInterfaceNanostack --|> MeshInterface
|
||||
MeshInterface --|> NetworkInterface
|
||||
|
||||
LoWPANNDInterface --|> MeshInterfaceNanostack
|
||||
ThreadInterface --|> MeshInterfaceNanostack
|
||||
package "mbed-mesh-api" {
|
||||
MeshInterfaceNanostack <|-- LoWPANNDInterface
|
||||
MeshInterfaceNanostack <|-- ThreadInterface
|
||||
MeshInterfaceNanostack <|-- NanostackEthernetInterface
|
||||
}
|
||||
|
||||
AbstractMesh --|> AbstractNetworkInterface
|
||||
class AbstractNetworkInterface
|
||||
|
||||
@enduml
|
||||
hide empty members
|
||||
hide empty attributes
|
||||
hide empty fields
|
||||
|
||||
@enduml
|
||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 27 KiB After Width: | Height: | Size: 66 KiB |
|
@ -0,0 +1,28 @@
|
|||
@startuml
|
||||
|
||||
package "mbed OS Socket abstraction" {
|
||||
interface NetworkStack
|
||||
NetworkStack -o Socket
|
||||
abstract class Socket
|
||||
Socket <|-- UDPSocket
|
||||
Socket <|-- TCPSocket
|
||||
Socket <|-- TCPServer
|
||||
}
|
||||
|
||||
interface NetworkInterface
|
||||
NetworkInterface --> NetworkStack : get_stack()
|
||||
EthernetInterface --|> NetworkInterface
|
||||
CellularInterface --|> NetworkInterface
|
||||
|
||||
package "mbed-mesh-api" {
|
||||
abstract class MeshInterfaceNanostack <|-- LoWPANNDInterface
|
||||
MeshInterfaceNanostack <|-- ThreadInterface
|
||||
MeshInterfaceNanostack --|> NetworkInterface
|
||||
}
|
||||
|
||||
|
||||
hide empty members
|
||||
hide empty attributes
|
||||
hide empty fields
|
||||
|
||||
@enduml
|
Binary file not shown.
Before Width: | Height: | Size: 66 KiB After Width: | Height: | Size: 31 KiB |
Binary file not shown.
Before Width: | Height: | Size: 60 KiB After Width: | Height: | Size: 45 KiB |
|
@ -380,14 +380,37 @@ Parameter|Description
|
|||
|
||||
### Collecting Thread management information
|
||||
|
||||
The function `thread_management_info_get()` is used to collect Thread management related information from the Leader Router.
|
||||
#### Fetching Thread Management Information
|
||||
|
||||
The function `thread_management_get()` is used to collect Thread management related information from the any device in the Thread network.
|
||||
|
||||
Parameter|Description
|
||||
-----------|-----------
|
||||
`instance_id`|Instance ID of the management session.
|
||||
`fields_ptr`|A pointer to management fields from which the information is fetched.
|
||||
`field_count`|Number of fields in the field pointer array.
|
||||
`cb_ptr`|A pointer to `management_get_response_cb` callback function.
|
||||
`dst_addr` |Destination address; the address of a remote device from whome it is desirable to fetch management information. If however, the address is not provided, a request is sent to the leader of the network for this purpose. If a native commissioner is used, the request for management information is sent to the border router.
|
||||
`uri_ptr` |The ASCII string for the URI. This string identifies the CoAP URI for the desired resource. For example, `/c/mg` identifies the management get information resource.
|
||||
`fields_ptr`|A pointer to management fields; a set of TLVs. A list of such TLVs can be found in `thread_meshcop_lib.h`.
|
||||
`field_count`|Number of fields in the field pointer array (set of TLVs).
|
||||
`cb_ptr`|A pointer to `management_get_response_cb` callback function carrying the result of the operation.
|
||||
|
||||
<dl>
|
||||
<dt>Response</dt>
|
||||
<dd> 0, success.</dd>
|
||||
<dd><0, failure.</dd>
|
||||
</dl>
|
||||
|
||||
#### Setting up Thread Management Information
|
||||
|
||||
The function `thread_management_set()` is used to set up Thread management related information to any device in the Thread network.
|
||||
|
||||
Parameter|Description
|
||||
-----------|-----------
|
||||
`instance_id`|Instance ID of the management session.
|
||||
`dst_addr` |Destination address; the address of a remote device where it is desired to set up management information. If however, the address is not provided, a request is sent to the leader of the network for this purpose. If a native commissioner is used, the request for setting up management information is sent to the border router.
|
||||
`uri_ptr` |The ASCII string for the URI. This string identifies the CoAP URI for the desired resource. For example, `/c/ms` identifies the management set information resource.
|
||||
`data_ptr`|A pointer to the desired set of TLVs.
|
||||
`field_count`|Number of fields in the field pointer array (set of TLVs).
|
||||
`cb_ptr`|A pointer to `management_get_response_cb` callback function carrying the result of the operation.
|
||||
|
||||
<dl>
|
||||
<dt>Response</dt>
|
||||
|
|
|
@ -79,21 +79,21 @@ extern int8_t ethernet_mac_destroy(eth_mac_api_t *mac_api);
|
|||
* @param api API to handle the request
|
||||
* @param data Data containing request parameters
|
||||
*/
|
||||
typedef void data_request(const eth_mac_api_t* api, const eth_data_req_t *data);
|
||||
typedef void eth_mac_data_request(const eth_mac_api_t* api, const eth_data_req_t *data);
|
||||
|
||||
/**
|
||||
* @brief data_confirm confirm is called as a response to data_request
|
||||
* @param api The API which handled the request
|
||||
* @param data Data containing confirm parameters
|
||||
*/
|
||||
typedef void data_confirm(const eth_mac_api_t* api, const eth_data_conf_t *data );
|
||||
typedef void eth_mac_data_confirm(const eth_mac_api_t* api, const eth_data_conf_t *data );
|
||||
|
||||
/**
|
||||
* @brief data_indication Data indication is called when MAC layer has received data
|
||||
* @param api The API which handled the response
|
||||
* @param data Data containing indication parameters
|
||||
*/
|
||||
typedef void data_indication(const eth_mac_api_t* api, const eth_data_ind_t *data );
|
||||
typedef void eth_mac_data_indication(const eth_mac_api_t* api, const eth_data_ind_t *data );
|
||||
|
||||
/**
|
||||
* @brief Set 48 bit address from MAC
|
||||
|
@ -119,15 +119,15 @@ typedef int8_t eth_mac_mac48_address_get(const eth_mac_api_t* api, uint8_t *mac4
|
|||
* @param parent_id Upper layer identifier
|
||||
* @return 0 if success; -1 if api is NULL or not found
|
||||
*/
|
||||
typedef int8_t eth_mac_api_initialize(eth_mac_api_t *api, data_confirm *conf_cb,
|
||||
data_indication *ind_cb, uint8_t parent_id);
|
||||
typedef int8_t eth_mac_api_initialize(eth_mac_api_t *api, eth_mac_data_confirm *conf_cb,
|
||||
eth_mac_data_indication *ind_cb, uint8_t parent_id);
|
||||
|
||||
struct eth_mac_api_s {
|
||||
eth_mac_api_initialize *mac_initialize;
|
||||
|
||||
data_request *data_req;
|
||||
data_confirm *data_conf_cb;
|
||||
data_indication *data_ind_cb;
|
||||
eth_mac_data_request *data_req;
|
||||
eth_mac_data_confirm *data_conf_cb;
|
||||
eth_mac_data_indication *data_ind_cb;
|
||||
|
||||
eth_mac_mac48_address_set *mac48_set;
|
||||
eth_mac_mac48_address_get *mac48_get;
|
||||
|
@ -141,3 +141,4 @@ struct eth_mac_api_s {
|
|||
#endif
|
||||
|
||||
#endif // ETHERNET_MAC_API_H
|
||||
|
||||
|
|
|
@ -249,7 +249,7 @@ typedef enum {
|
|||
macAutoRequestKeyIndex = 0x7b, /*>The index of the key used for automatic data*/
|
||||
macDefaultKeySource = 0x7c, /*>Default key source*/
|
||||
//NON standard extension
|
||||
macLoadBalancingBeaconTxPeriod = 0xfd, /*> Set Beacon periodic Tx interval.Value size uint16_t in seconds, Use 0 to disable */
|
||||
macLoadBalancingBeaconTx = 0xfd, /*> Trig Beacon from load balance module periodic */
|
||||
macLoadBalancingAcceptAnyBeacon = 0xfe, /*>Beacon accept state control from other network. Value size bool, data true=Enable, false=disable .*/
|
||||
macThreadForceLongAddressForBeacon = 0xff /*>Thread standard force beacon source address for extended 64-bit*/
|
||||
} mlme_attr_t;
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
#ifndef NET_FHSS_H_
|
||||
#define NET_FHSS_H_
|
||||
|
||||
#include <stdint.h>
|
||||
#include "ns_types.h"
|
||||
|
||||
#ifndef RPL_SYNCHRONIZATION_INSTANCE_ID
|
||||
#define RPL_SYNCHRONIZATION_INSTANCE_ID 1
|
||||
|
@ -56,6 +56,7 @@ typedef struct
|
|||
int (*fhss_timer_start)(uint32_t, void (*fhss_timer_callback)(int8_t, uint16_t), int8_t);
|
||||
int (*fhss_timer_stop)(void);
|
||||
uint32_t (*fhss_get_remaining_slots)(void);
|
||||
uint32_t (*fhss_get_timestamp)(void);
|
||||
int (*fhss_time_measure_start)(void);
|
||||
uint32_t (*fhss_time_measure_read)(void);
|
||||
int (*fhss_time_measure_stop)(void);
|
||||
|
@ -120,9 +121,10 @@ extern int8_t arm_fhss_disable(int8_t interface_id);
|
|||
extern int8_t arm_fhss_set_tuning_params(int8_t interface_id, const fhss_platform_tuning_params_s *fhss_tuning_params);
|
||||
|
||||
#else
|
||||
#define arm_fhss_enable(interface_id, fhss_platform_functions,fhss_configuration) (int8_t) -1
|
||||
#define arm_fhss_disable(interface_id) (int8_t) -1
|
||||
#define arm_fhss_set_tuning_params(interface_id, fhss_tuning_params) (int8_t) -1
|
||||
NS_DUMMY_DEFINITIONS_OK
|
||||
#define arm_fhss_enable(interface_id, fhss_platform_functions,fhss_configuration) (-1)
|
||||
#define arm_fhss_disable(interface_id) (-1)
|
||||
#define arm_fhss_set_tuning_params(interface_id, fhss_tuning_params) (-1)
|
||||
#endif
|
||||
|
||||
#endif /* NET_FHSS_H_ */
|
||||
|
|
|
@ -81,16 +81,16 @@ typedef enum arm_library_event_type_e {
|
|||
/** Data received. */
|
||||
#define SOCKET_DATA (0 << 4)
|
||||
/** TCP connection ready. */
|
||||
#define SOCKET_BIND_DONE (1 << 4)
|
||||
#define SOCKET_CONNECT_DONE (1 << 4)
|
||||
/** TCP connection failure. */
|
||||
#define SOCKET_BIND_FAIL (2 << 4)
|
||||
#define SOCKET_CONNECT_FAIL (2 << 4)
|
||||
/** TCP connection authentication failed. */
|
||||
#define SOCKET_BIND_AUTH_FAIL (3 << 4)
|
||||
/** TCP incoming connection attempt to listening socket */
|
||||
#define SOCKET_CONNECT_AUTH_FAIL (3 << 4)
|
||||
/** TCP incoming connection on listening socket */
|
||||
#define SOCKET_INCOMING_CONNECTION (4 << 4)
|
||||
/** Socket data send failure. */
|
||||
#define SOCKET_TX_FAIL (5 << 4)
|
||||
/** TCP connection closed. */
|
||||
/** TCP connection closed (received their FIN and ACK of our FIN). */
|
||||
#define SOCKET_CONNECT_CLOSED (6 << 4)
|
||||
/** TCP connection reset */
|
||||
#define SOCKET_CONNECTION_RESET (7 << 4)
|
||||
|
@ -100,6 +100,13 @@ typedef enum arm_library_event_type_e {
|
|||
#define SOCKET_TX_DONE (9 << 4)
|
||||
/** Out of memory failure. */
|
||||
#define SOCKET_NO_RAM (10 << 4)
|
||||
/** TCP connection problem indication (RFC 1122 R1) */
|
||||
#define SOCKET_CONNECTION_PROBLEM (11 << 4)
|
||||
|
||||
/* Backwards compatibility */
|
||||
#define SOCKET_BIND_DONE SOCKET_CONNECT_DONE
|
||||
#define SOCKET_BIND_FAIL SOCKET_CONNECT_FAIL
|
||||
#define SOCKET_BIND_AUTH_FAIL SOCKET_CONNECT_AUTH_FAIL
|
||||
|
||||
/*!
|
||||
* \enum net_security_t
|
||||
|
@ -992,6 +999,23 @@ void arm_print_neigh_cache(void);
|
|||
*/
|
||||
void arm_print_neigh_cache2(void (*print_fn)(const char *fmt, ...));
|
||||
|
||||
/**
|
||||
* \brief Print PCB list
|
||||
*
|
||||
* Prints Protocol Control Block list to the command line
|
||||
*/
|
||||
void arm_print_protocols(void);
|
||||
|
||||
/**
|
||||
* \brief Print PCB list
|
||||
*
|
||||
* Prints Protocol Control Block list using the given printf style function
|
||||
*
|
||||
* \param print_fn pointer to a printf style output function
|
||||
* \param sep column separator character
|
||||
*/
|
||||
void arm_print_protocols2(void (*print_fn)(const char *fmt, ...), char sep);
|
||||
|
||||
/**
|
||||
* \brief Get the library version information.
|
||||
*
|
||||
|
|
|
@ -0,0 +1,105 @@
|
|||
/*
|
||||
* Copyright (c) 2016 ARM Limited. All rights reserved.
|
||||
*
|
||||
* SPDX-License-Identifier: LicenseRef-PBL
|
||||
*
|
||||
* Licensed under the Permissive Binary License, Version 1.0 (the "License"); you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* https://www.mbed.com/licenses/PBL-1.0
|
||||
*
|
||||
* See the License for the specific language governing permissions and limitations under the License.
|
||||
*
|
||||
*/
|
||||
|
||||
/**
|
||||
* \file net_load_balance_api.h
|
||||
* \brief 6Lowpan network load balance control API.
|
||||
*/
|
||||
|
||||
#ifndef NET_LOAD_BALANCE_API_H_
|
||||
#define NET_LOAD_BALANCE_API_H_
|
||||
|
||||
#include "ns_types.h"
|
||||
|
||||
/**
|
||||
* \brief load_balance_network_switch_notify this function will be called by load balance when it have detected better network to switch
|
||||
* \param interface id
|
||||
*
|
||||
* \return true Network switching can be performed immediately
|
||||
* \return false means that load balance will ask at a later time for network switching, if a better network is still available at that time
|
||||
*/
|
||||
typedef bool net_load_balance_network_switch_notify(int8_t interface_id);
|
||||
|
||||
/**
|
||||
* \brief Set user callback for accept network switch.
|
||||
* \param network_switch_notify user callback
|
||||
*/
|
||||
void net_load_balance_network_switch_cb_set(net_load_balance_network_switch_notify *network_switch_notify);
|
||||
|
||||
/**
|
||||
* \brief Create and enable load balance to selected interface.
|
||||
* \param interface_id interface id
|
||||
* \param enable_periodic_beacon_interval Set True when want activate load balance periodic beacon, false will work only properly with fhss system
|
||||
*
|
||||
* \return 0 Enable ok
|
||||
* \return -1 unknown Interface or parameter error
|
||||
* \return -2 Out of memory
|
||||
* \return -3 Load balance already configured to this interface
|
||||
*/
|
||||
int8_t net_load_balance_create(int8_t interface_id, bool enable_periodic_beacon_interval);
|
||||
|
||||
/**
|
||||
* \brief Disable and delete load balansing from interface
|
||||
* \param interface_id interface id
|
||||
*
|
||||
* \return 0 Process ok
|
||||
* \return -1 unknown Interface
|
||||
*/
|
||||
int8_t net_load_balance_delete(int8_t interface_id);
|
||||
|
||||
/**
|
||||
* \brief Set Load balance threshold min and max
|
||||
*
|
||||
* Nework switch will work next diff_priority >= randLIB_get_random_in_range(threshold_min, threshold_max) --> switch network if true
|
||||
* For border router Disable Network compare set threshold_min and threshold_max to 0.
|
||||
* \param threshold_min min value define random minimal value for compare
|
||||
* \param threshold_max max value for define random max value for compare
|
||||
*
|
||||
* \return 0 process ok -1 Unknown interface id
|
||||
*/
|
||||
int8_t net_load_balance_threshold_set(int8_t interface_id, uint8_t threshold_min, uint8_t threshold_max);
|
||||
|
||||
/**
|
||||
* \brief Set Load balance expected device count and enable automatic network load level update
|
||||
*
|
||||
* This feature is just for RPL DoDAG root device!
|
||||
*
|
||||
* \param interface_id interface id
|
||||
* \param expected_device_count Device count which will set max load level. If count is not expected_device_count % 8 it not zero function update number up to reach that.It is not hard limit it define max DoDAG preference
|
||||
*
|
||||
* \return 0 process ok -1 Unknown interface id -2 Out of memory
|
||||
*/
|
||||
int8_t net_load_balance_load_level_update_enable(int8_t interface_id, uint16_t expected_device_count);
|
||||
|
||||
/**
|
||||
* \brief Disable automatic network load level update
|
||||
*
|
||||
* \param interface_id interface id
|
||||
*
|
||||
* \return 0 process ok -1 Unknown interface id
|
||||
*/
|
||||
int8_t net_load_balance_load_level_update_disable(int8_t interface_id);
|
||||
|
||||
/**
|
||||
* \brief Set network probability percent when new network is better than threshold max
|
||||
*
|
||||
* \param interface_id interface id
|
||||
* \param max_p is percent probability to switch network. Default is 40%. Accepted values are [1,100] recommend values are 15-50.
|
||||
*
|
||||
* \return 0 process ok -1 Unknown interface id or parameter fail
|
||||
*/
|
||||
int8_t net_load_balance_set_max_probability(int8_t interface_id , uint8_t max_p);
|
||||
|
||||
|
||||
#endif /* NET_LOAD_BALANCE_API_H_ */
|
|
@ -0,0 +1,56 @@
|
|||
/*
|
||||
* Copyright (c) 2016 ARM Limited. All rights reserved.
|
||||
*
|
||||
* SPDX-License-Identifier: LicenseRef-PBL
|
||||
*
|
||||
* Licensed under the Permissive Binary License, Version 1.0 (the "License"); you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* https://www.mbed.com/licenses/PBL-1.0
|
||||
*
|
||||
* See the License for the specific language governing permissions and limitations under the License.
|
||||
*
|
||||
*/
|
||||
|
||||
/**
|
||||
* \file net_ipv6_api.h
|
||||
* \brief IPv6 configuration API.
|
||||
*/
|
||||
|
||||
#ifndef NET_TEST_API_H_
|
||||
#define NET_TEST_API_H_
|
||||
|
||||
#include "ns_types.h"
|
||||
|
||||
/**
|
||||
* \brief Makes TCP protocol drop given number of packets from a particular state (TX side, tcp_down()).
|
||||
*
|
||||
* Testing API for TCP retransmission mechanism after a packet is dropped in a particular state.
|
||||
*
|
||||
* \param state Particular TCP state - Identified by its number from 1-11. Numbering is from the SNMP MIB - RFC 4022.
|
||||
* \param count No. of packets to be dropped
|
||||
* \return 0 OK
|
||||
* \return <0 If request can't be fulfilled, i.e., Not test environment.
|
||||
*/
|
||||
int8_t arm_nwk_test_tcp_drop_tx(int state, uint8_t count);
|
||||
|
||||
/**
|
||||
* \brief Makes TCP protocol drop given number of packets from a particular state (RX side, tcp_up()).
|
||||
*
|
||||
* Testing API for TCP to drop received packets.
|
||||
*
|
||||
* \param state Particular TCP state - Identified by its number from 1-11. Numbering is from the SNMP MIB - RFC 4022.
|
||||
* \param count No. of packets to be dropped
|
||||
* \return 0 OK
|
||||
* \return <0 If request can't be fulfilled, i.e., Not test environment.
|
||||
*/
|
||||
int8_t arm_nwk_test_tcp_drop_rx(int state, uint8_t count);
|
||||
|
||||
/**
|
||||
* \brief Resets drop counters.
|
||||
*
|
||||
* Testing API for TCP reset any packet drop counters.
|
||||
*/
|
||||
void arm_nwk_test_tcp_drop_reset(void);
|
||||
|
||||
#endif //NET_TEST_API_H_
|
|
@ -220,6 +220,16 @@ int thread_test_version_set(int8_t interface_id, uint8_t version);
|
|||
*/
|
||||
int thread_test_router_selection_jitter_set(int8_t interface_id, uint32_t jitter);
|
||||
|
||||
/**
|
||||
* \brief Sets the thread MIN_DELAY_TIMER default value.
|
||||
*
|
||||
* \param interface_id Network Interface
|
||||
* \param delay_timer_value delay timer value in seconds used in leader
|
||||
*
|
||||
* \return 0, OK
|
||||
* \return <0 Error
|
||||
*/
|
||||
int thread_test_min_delay_timer_set(int8_t interface_id, uint32_t delay_timer_value);
|
||||
/**
|
||||
* \brief Increment Thread key sequence counter
|
||||
*
|
||||
|
|
|
@ -37,7 +37,7 @@ typedef enum address_type_t {
|
|||
*/
|
||||
typedef struct ns_address {
|
||||
address_type_t type; /**< Address type. */
|
||||
uint8_t address[16]; /**< Addresss. */
|
||||
uint8_t address[16]; /**< Address. */
|
||||
uint16_t identifier; /**< TCP/UDP port number. */
|
||||
} ns_address_t;
|
||||
|
||||
|
|
|
@ -52,6 +52,7 @@ typedef enum {
|
|||
PHY_EXTENSION_READ_CHANNEL_ENERGY, /**< RF interface ED scan energy read. */
|
||||
PHY_EXTENSION_READ_LINK_STATUS, /**< Net library could read link status. */
|
||||
PHY_EXTENSION_CONVERT_SIGNAL_INFO, /**< Convert signal info. */
|
||||
PHY_EXTENSION_ACCEPT_ANY_BEACON, /**< Set boolean true or false for accept beacon from other Pan-ID than configured. Default value should be false */
|
||||
} phy_extension_type_e;
|
||||
|
||||
/** Address types */
|
||||
|
|
|
@ -24,20 +24,23 @@ extern "C" {
|
|||
* \section socket-com Common socket API
|
||||
* - socket_open(), A function to open a socket.
|
||||
* - socket_close(), A function to close a socket.
|
||||
* - socket_connect(), A function to connect to a remote peer.
|
||||
* - socket_bind(), A function to bind a local address or port or both.
|
||||
* - socket_getpeername(), A function to get remote address and port of a connected socket.
|
||||
* - socket_getsockname(), A function to get local address and port of a bound socket.
|
||||
*
|
||||
* \section socket-read Socket read API at callback
|
||||
* - socket_read(), A function to read received data buffer from a socket.
|
||||
* - socket_recvmsg(), A function to read received data buffer from a socket to Posix defined message structure
|
||||
* - socket_read_session_address(), A function to read session info for a TCP event.
|
||||
*
|
||||
* \section socket-tx Socket TX API
|
||||
* - socket_send(), A function to write data buffer to a socket.
|
||||
* - socket_sendto(), A function to write data to a specific destination in the socket.
|
||||
* - socket_senmsg(), A function which support socket_send and socket_sendto functionality which supports ancillary data
|
||||
* - socket_sendmsg(), A function which support socket_send and socket_sendto functionality which supports ancillary data
|
||||
*
|
||||
* \section sock-connect TCP socket connection handle
|
||||
* - socket_listen(), A function to set the socket to listening mode.
|
||||
* - socket_connect(), A function to connect to a remote peer.
|
||||
* - socket_accept(), A function to accept an incoming connection.
|
||||
* - socket_shutdown(), A function to shut down a connection.
|
||||
*
|
||||
* Sockets are a common abstraction model for network communication and are used in most operating systems.
|
||||
|
@ -98,13 +101,17 @@ extern "C" {
|
|||
* | :------------------------: | :---: | :-----------------------------------------------------------------: |
|
||||
* | SOCKET_EVENT_MASK | 0xF0 | NC Socket event mask. |
|
||||
* | SOCKET_DATA | 0x00 | Data received, read data length available in d_len field. |
|
||||
* | SOCKET_BIND_DONE | 0x10 | TCP connection ready. |
|
||||
* | SOCKET_CONNECT_DONE | 0x10 | TCP connection ready. |
|
||||
* | SOCKET_CONNECT_FAIL | 0x20 | TCP connection failed. |
|
||||
* | SOCKET_INCOMING_CONNECTION | 0x40 | TCP incoming connection on listening socket. |
|
||||
* | SOCKET_TX_FAIL | 0x50 | Socket data send failed. |
|
||||
* | SOCKET_CONNECT_CLOSED | 0x60 | TCP connection closed. |
|
||||
* | SOCKET_CONNECTION_RESET | 0x70 | TCP connection reset. |
|
||||
* | SOCKET_NO_ROUTER | 0x80 | No route available to destination. |
|
||||
* | SOCKET_TX_DONE | 0x90 | Last socket TX process done, in TCP, whole TCP process is ready. |
|
||||
* | SOCKET_TX_DONE | 0x90 | UDP: link layer TX ready (d_len = length of datagram). |
|
||||
* | | | TCP: some data acknowledged (d_len = data remaining in send queue) |
|
||||
* | SOCKET_NO_RAM | 0xA0 | No RAM available. |
|
||||
* | SOCKET_CONNECTION_PROBLEM | 0xB0 | TCP connection is retrying. |
|
||||
*
|
||||
*
|
||||
* \section socket-tcp How to use TCP sockets:
|
||||
|
@ -112,28 +119,26 @@ extern "C" {
|
|||
* | API | Socket Type | Description |
|
||||
* | :---------------------------: | :-----------: | :------------------------------------------------------------: |
|
||||
* | socket_open() | Server/Client | Open socket to specific or dynamic port number. |
|
||||
* | socket_shutdown() | Client | Shut down opened TCP connection. |
|
||||
* | socket_shutdown() | Server/Client | Shut down opened TCP connection. |
|
||||
* | socket_listen() | Server | Set server port to listen state. |
|
||||
* | socket_accept() | Server | Accept a connection to a listening socket as a new socket. |
|
||||
* | socket_connect() | Client | Connect client socket to specific destination. |
|
||||
* | socket_close() | Server/Client | Closes the TCP Socket. |
|
||||
* | socket_send() | Client | Send data to session based destination. |
|
||||
* | socket_sendto() | Server/Client | Send data to specific destination. |
|
||||
* | socket_read_session_address() | Server/Client | Read socket TCP session address and port information. |
|
||||
* | socket_close() | Server/Client | Closes the TCP Socket. |
|
||||
* | socket_send() | Server/Client | Send data to peer. |
|
||||
* | socket_recv() | Server/Client | Receive data from peer. |
|
||||
*
|
||||
* When the TCP socket is opened it is in closed state. It must be set either to listen or to connect state before it can be used to receive or transmit data.
|
||||
*
|
||||
* A socket can be set to listen mode with the socket_listen() function. After the call, the socket can accept an incoming connection from a remote host.
|
||||
* The listen mode closes the connection automatically after server timeout or when the client or application closes the connection manually by socket_shutdown() function.
|
||||
*
|
||||
* A TCP socket can be connected to a remote host with socket_connect() with correct arguments. After the function call, a (non-blocking) application must wait for the socket event to confirm the successful state change of the socket.
|
||||
* After the successful state change, data can be sent using socket_send() by client and socket_send() by server.
|
||||
* The connection can be shut down with socket_shutdown() function or by server timeout.
|
||||
* After the successful state change, data can be sent using socket_send().
|
||||
* The connection can be shut down in either direction with socket_shutdown() function - shutting down write signals end-of-data to the peer.
|
||||
*
|
||||
* \section socket-udpicmp How to use UDP and RAW socket:
|
||||
*
|
||||
* A UDP socket is ready to receive and send data immediately after a successful call of socket_open() and a NET_READY event is received.
|
||||
* Data can be transmitted with the socket_sendto() function. An ICMP socket works with same function call.
|
||||
*
|
||||
*/
|
||||
|
||||
#include "ns_address.h"
|
||||
|
@ -199,7 +204,7 @@ typedef struct ns_msghdr {
|
|||
uint_fast16_t msg_iovlen; /**< Data vector count in msg_iov */
|
||||
void *msg_control; /**< Ancillary data list of ns_cmsghdr_t pointer */
|
||||
uint_fast16_t msg_controllen; /**< Ancillary data length */
|
||||
int flags; /**< Flags for received messages */
|
||||
int msg_flags; /**< Flags for received messages */
|
||||
} ns_msghdr_t;
|
||||
|
||||
/*!
|
||||
|
@ -212,8 +217,15 @@ typedef struct ns_cmsghdr {
|
|||
uint8_t cmsg_type; /**< Protocol Specific types for example SOCKET_IPV6_PKTINFO, */
|
||||
} ns_cmsghdr_t;
|
||||
|
||||
/** \name Error values
|
||||
* \anchor ERROR_CODES
|
||||
*/
|
||||
///@{
|
||||
/** No data currently available to read, or insufficient queue space for write */
|
||||
#define NS_EWOULDBLOCK (-100)
|
||||
///@}
|
||||
|
||||
/** \name socket_recvmsg() message error flags.
|
||||
/** \name socket_recvfrom() or socket_recvmsg() flags.
|
||||
* \anchor MSG_HEADER_FLAGS
|
||||
*/
|
||||
///@{
|
||||
|
@ -221,6 +233,10 @@ typedef struct ns_cmsghdr {
|
|||
#define NS_MSG_TRUNC 1
|
||||
/** Indicates that given ancillary data buffer was smaller than enabled at socket msg->msg_controllen define proper writed data lengths. */
|
||||
#define NS_MSG_CTRUNC 2
|
||||
/** Can be passed as an input flag to socket_recvfrom() to not consume data */
|
||||
#define NS_MSG_PEEK 4
|
||||
/** \deprecated Can be passed as an input flag to get legacy returns of zero - used by socket_read() and socket_sendto() */
|
||||
#define NS_MSG_LEGACY0 0x4000
|
||||
///@}
|
||||
/*!
|
||||
* \struct ns_in6_pktinfo_t
|
||||
|
@ -231,15 +247,22 @@ typedef struct ns_in6_pktinfo {
|
|||
int8_t ipi6_ifindex; /**< send/recv interface index */
|
||||
} ns_in6_pktinfo_t;
|
||||
|
||||
|
||||
/** \privatesection Alignment macros for control message headers
|
||||
* \anchor CMSG_ALIGN_FLAGS
|
||||
*/
|
||||
///@{
|
||||
/** Base header alignment size */
|
||||
#define CMSG_HEADER_ALIGN sizeof(long)
|
||||
|
||||
/** Base data alignment size */
|
||||
#define CMSG_DATA_ALIGN CMSG_HEADER_ALIGN
|
||||
|
||||
/** Returns control message alignment size for data or header based upon alignment base */
|
||||
#ifndef NS_ALIGN_SIZE
|
||||
#define NS_ALIGN_SIZE(length, aligment_base) \
|
||||
((length + (aligment_base -1 )) & ~(aligment_base -1))
|
||||
#endif
|
||||
|
||||
///@}
|
||||
/// \publicsection
|
||||
/**
|
||||
* \brief Parse first control message header from message ancillary data.
|
||||
*
|
||||
|
@ -327,7 +350,7 @@ int8_t socket_close(int8_t socket);
|
|||
* \brief A function to set a socket to listening mode.
|
||||
*
|
||||
* \param socket The socket ID.
|
||||
* \param backlog The pending connections queue size. (Not yet implemented).
|
||||
* \param backlog The pending connections queue size.
|
||||
* \return 0 on success.
|
||||
* \return -1 on failure.
|
||||
*/
|
||||
|
@ -336,13 +359,12 @@ int8_t socket_listen(int8_t socket, uint8_t backlog);
|
|||
/**
|
||||
* \brief A function to accept a new connection on an socket.
|
||||
*
|
||||
* NOT YET IMPLEMENTED - PLACEHOLDER FOR FUTURE TCP CHANGES
|
||||
*
|
||||
* \param socket_id The socket ID of the listening socket.
|
||||
* \param addr Either NULL pointer or pointer to structure where the remote address of the connecting host is copied.
|
||||
* \param passed_fptr A function pointer to a function that is called whenever a data frame is received to the new socket.
|
||||
* \return 0 or greater on success; return value is the new socket ID.
|
||||
* \return -1 on failure.
|
||||
* \return NS_EWOULDBLOCK if no pending connections.
|
||||
*/
|
||||
int8_t socket_accept(int8_t socket_id, ns_address_t *addr, void (*passed_fptr)(void *));
|
||||
|
||||
|
@ -367,11 +389,14 @@ int8_t socket_connect(int8_t socket, ns_address_t *address, uint8_t randomly_tak
|
|||
/**
|
||||
* \brief Bind socket to address.
|
||||
*
|
||||
* Used by the application to bind a socket to a port and/or an address. Binding can
|
||||
* be done only once. The port or address cannot be changed after binding.
|
||||
* Used by the application to bind a socket to a port and/or an address. Binding of each
|
||||
* of address and port can only be done once.
|
||||
*
|
||||
* If address is ns_in6addr_any, the address binding is not changed. If port is 0,
|
||||
* the port binding is not changed.
|
||||
*
|
||||
* \param socket Socket ID of the socket to bind.
|
||||
* \param address Address structure containing the port and address to bind.
|
||||
* \param address Address structure containing the port and/or address to bind.
|
||||
*
|
||||
* \return 0 on success.
|
||||
* \return -1 if the given address is NULL.
|
||||
|
@ -386,6 +411,7 @@ int8_t socket_bind(int8_t socket, const ns_address_t *address);
|
|||
/**
|
||||
* \brief Bind a local address to a socket based on the destination address and
|
||||
* the address selection preferences.
|
||||
*
|
||||
* Binding happens to the same address that socket_connect() would bind to.
|
||||
* Reference: RFC5014 IPv6 Socket API for Source Address Selection.
|
||||
*
|
||||
|
@ -417,70 +443,119 @@ int8_t socket_bind2addrsel(int8_t socket, const ns_address_t *dst_address);
|
|||
*
|
||||
* \return 0 on success.
|
||||
* \return -1 if the given socket ID is not found, if the socket type is wrong or TCP layer returns a failure.
|
||||
* \return -2 if no active TCP session was found.
|
||||
* \return -2 if socket is not connected.
|
||||
*/
|
||||
int8_t socket_shutdown(int8_t socket, uint8_t how);
|
||||
|
||||
/**
|
||||
* \brief Send data via a connected TCP socket by client.
|
||||
* \brief Send data via a connected socket by client.
|
||||
*
|
||||
* Note: The socket connection must be ready before using this function.
|
||||
* The stack uses automatically the address of the remote connected host as the destination address for the packet.
|
||||
*
|
||||
* This call is equivalent to socket_sendto() with address set to NULL - see
|
||||
* that call for more details.
|
||||
*
|
||||
* \param socket The socket ID.
|
||||
* \param buffer A pointer to data.
|
||||
* \param length Data length.
|
||||
*
|
||||
* \return 0 done
|
||||
* \return -1 Invalid socket ID.
|
||||
* \return -2 Socket memory allocation fail.
|
||||
* \return -3 TCP state not established or address scope not defined .
|
||||
* \return -4 Socket TX process busy or unknown interface.
|
||||
* \return -5 Socket not connected
|
||||
* \return -6 Packet too short (ICMP raw socket error).
|
||||
*/
|
||||
int8_t socket_send(int8_t socket, uint8_t *buffer, uint16_t length);
|
||||
int16_t socket_send(int8_t socket, const void *buffer, uint16_t length);
|
||||
|
||||
/**
|
||||
* \brief A function to read received data buffer from a socket.
|
||||
* \deprecated
|
||||
*
|
||||
* Used by the application to get data from a socket. This method must be called once
|
||||
* from a socket callback when handling event SOCKET_DATA. If the received data does not fit
|
||||
* in the buffer provided the excess data bytes are discarded.
|
||||
* Used by the application to get data from a socket. See socket_recvfrom()
|
||||
* for more details.
|
||||
*
|
||||
* This is equivalent to socket_recvfrom, except that it passes the
|
||||
* flag NS_MSG_LEGACY0, which modifies the return behaviour for zero data.
|
||||
*
|
||||
* \param socket The socket ID.
|
||||
* \param src_addr A pointer to a structure where the sender's address is stored.
|
||||
* May be NULL if not required.
|
||||
* \param buffer A pointer to an array where the read data is written to.
|
||||
* \param length The maximum length of the allocated buffer.
|
||||
*
|
||||
* \return greater than 0 indicates the length of the data copied to buffer.
|
||||
* \return 0 if no data is available to read.
|
||||
* \return >0 indicates the length of the data copied to buffer.
|
||||
* \return 0 if no data was read (includes zero-length datagram,
|
||||
* end of stream and no data currently available)
|
||||
* \return -1 invalid input parameters.
|
||||
*/
|
||||
int16_t socket_read(int8_t socket, ns_address_t *src_addr, uint8_t *buffer, uint16_t length);
|
||||
|
||||
/**
|
||||
* \brief A function to read received message with ancillary data from a socket.
|
||||
* \brief A function to read received data buffer from a socket,
|
||||
*
|
||||
* Used by the application to get data from a socket. This method must be called once
|
||||
* from a socket callback when handling event SOCKET_DATA. If the received data does not fit
|
||||
* in the buffer provided the excess data bytes are discarded.
|
||||
* Equivalent to socket_recvfrom with src_address set to NULL.
|
||||
*
|
||||
* Ancillary data must request by socket_setsockopt().
|
||||
* \param socket The socket ID.
|
||||
* \param buffer A pointer to an array where the read data is written to.
|
||||
* \param length The maximum length of the allocated buffer.
|
||||
* \param flags Flags for read call
|
||||
*
|
||||
* msg->msg_controllen is updated to indicate actual length of ancillary data output
|
||||
* \return as for socket_recvfrom
|
||||
*/
|
||||
int16_t socket_recv(int8_t socket, void *buffer, uint16_t length, int flags);
|
||||
|
||||
/**
|
||||
* \brief A function to read received data buffer from a socket
|
||||
*
|
||||
* Used by the application to get data from a socket.
|
||||
*
|
||||
* This has two modes of operation.
|
||||
*
|
||||
* 1) For non-stream sockets, if the receive queue is disabled (set to 0 via
|
||||
* SOCKET_SO_RCVBUF), which is the non-stream default and original Nanostack
|
||||
* behaviour, then applications receive exactly one SOCKET_DATA callback per
|
||||
* datagram, indicating that datagram's length. They must make 1 read call
|
||||
* in that callback, and they will be given the data. If not read, the
|
||||
* datagram is discarded on return from the callback.
|
||||
*
|
||||
* 2) Otherwise - stream sockets or SOCKET_SO_RCVBUF non-zero - behaviour is
|
||||
* akin to traditional BSD. SOCKET_DATA callbacks occur when new data arrives,
|
||||
* and read calls can be made any time. Data will be queued to an extent
|
||||
* determined by the receive buffer size. The length in the data callback
|
||||
* is the total amount of data in the receive queue - possibly multiple
|
||||
* datagrams.
|
||||
*
|
||||
* \param socket The socket ID.
|
||||
* \param buffer A pointer to an array where the read data is written to.
|
||||
* \param length The maximum length of the allocated buffer.
|
||||
* \param flags Flags for read call
|
||||
* \param src_addr A pointer to a structure where the sender's address is stored.
|
||||
* May be NULL if not required.
|
||||
*
|
||||
* The returned length is normally the length of data actually written to the buffer; if
|
||||
* NS_MSG_TRUNC is set in flags, then for non-stream sockets, the actual datagram length is
|
||||
* returned instead, which may be larger than the buffer size.
|
||||
*
|
||||
* Return values assume flag NS_MSG_LEGACY0 is not set - if it is set, they are
|
||||
* as per socket_read().
|
||||
*
|
||||
* \return >0 indicates the length of the data copied to buffer (or original datagram size)
|
||||
* \return 0 if end of stream or zero-length datagram
|
||||
* \return -1 invalid input parameters.
|
||||
* \return NS_EWOULDBLOCK if no data is currently available
|
||||
*/
|
||||
int16_t socket_recvfrom(int8_t socket, void *buffer, uint16_t length, int flags, ns_address_t *src_addr);
|
||||
|
||||
/**
|
||||
* \brief A function to read received message with ancillary data from a socket.
|
||||
*
|
||||
* Used by the application to get data from a socket. See socket_recvfrom for
|
||||
* details of the two delivery mechanisms.
|
||||
*
|
||||
* Ancillary data must request by socket_setsockopt().
|
||||
*
|
||||
* msg->msg_controllen is updated to indicate actual length of ancillary data output
|
||||
*
|
||||
* \param socket The socket ID.
|
||||
* \param msg A pointer to a structure where messages is stored with or without ancillary data
|
||||
* \param flags A flags for message read.
|
||||
*
|
||||
* \return greater than 0 indicates the length of the data.
|
||||
* \return 0 if no data is available to read.
|
||||
* \return -1 invalid input parameters.
|
||||
* \return as for socket_recvfrom
|
||||
*/
|
||||
int16_t socket_recvmsg(int8_t socket, ns_msghdr_t *msg, int flags);
|
||||
|
||||
|
@ -489,20 +564,28 @@ int16_t socket_recvmsg(int8_t socket, ns_msghdr_t *msg, int flags);
|
|||
*
|
||||
* Used by the application to send data.
|
||||
*
|
||||
* The return of 0 on success is unconventional, and obtained by passing
|
||||
* NS_MSG_LEGACY0 to socket_sendmsg internally - to get conventional
|
||||
* return values, you can use socket_sendmsg() instead.
|
||||
*
|
||||
* \param socket The socket ID.
|
||||
* \param address A pointer to the destination address information.
|
||||
* \param buffer A pointer to data to be sent.
|
||||
* \param length Length of the data to be sent.
|
||||
*
|
||||
* \return 0 on success.
|
||||
* \return 0 On success (whole packet queued)
|
||||
* \return NS_EWOULDBLOCK if nothing written due to lack of queue space.
|
||||
*
|
||||
* Error returns:
|
||||
*
|
||||
* \return -1 Invalid socket ID.
|
||||
* \return -2 Socket memory allocation fail.
|
||||
* \return -3 TCP state not established or address scope not defined .
|
||||
* \return -4 Socket TX process busy or unknown interface.
|
||||
* \return -4 Unknown interface.
|
||||
* \return -5 Socket not connected
|
||||
* \return -6 Packet too short (ICMP raw socket error).
|
||||
*/
|
||||
int8_t socket_sendto(int8_t socket, ns_address_t *address, uint8_t *buffer, uint16_t length);
|
||||
int16_t socket_sendto(int8_t socket, const ns_address_t *address, const void *buffer, uint16_t length);
|
||||
|
||||
/**
|
||||
* \brief A function to send UDP, TCP or raw ICMP data via the socket with or without ancillary data or destination address.
|
||||
|
@ -511,7 +594,7 @@ int8_t socket_sendto(int8_t socket, ns_address_t *address, uint8_t *buffer, uint
|
|||
*
|
||||
* \param socket The socket ID.
|
||||
* \param msg A pointer to the Message header which include address, payload and ancillary data.
|
||||
* \param flags A flags for message send for future usage (not supported yet)
|
||||
* \param flags A flags for message send (eg NS_MSG_LEGACY0)
|
||||
*
|
||||
* Messages destination address is defined by msg->msg_name which must be ns_address_t. If msg->msg_nme is NULL socket select connected address
|
||||
*
|
||||
|
@ -519,34 +602,56 @@ int8_t socket_sendto(int8_t socket, ns_address_t *address, uint8_t *buffer, uint
|
|||
*
|
||||
* Supported ancillary data for send defined by msg->msg_control and msg->msg_controllen.
|
||||
*
|
||||
* msg->flags and flags is ignored
|
||||
* msg->msg_flags is unused, and need not be initialised.
|
||||
*
|
||||
* \return 0 on success.
|
||||
* \return -1 Invalid socket ID or message structure.
|
||||
* The following main return values assume flag NS_MSG_LEGACY0 is not set -
|
||||
* if it is set, they are as per socket_sendto().
|
||||
*
|
||||
* \return length if entire amount written (which could be 0)
|
||||
* \return value >0 and <length if partial amount written (stream only)
|
||||
* \return NS_EWOULDBLOCK if nothing written due to lack of queue space.
|
||||
|
||||
* Error returns:
|
||||
*
|
||||
* \return -1 Invalid socket ID.
|
||||
* \return -2 Socket memory allocation fail.
|
||||
* \return -3 TCP state not established or address scope not defined .
|
||||
* \return -4 Socket TX process busy or unknown interface.
|
||||
* \return -4 Unknown interface.
|
||||
* \return -5 Socket not connected
|
||||
* \return -6 Packet too short (ICMP raw socket error).
|
||||
*/
|
||||
int8_t socket_sendmsg(int8_t socket, const ns_msghdr_t *msg, int flags);
|
||||
int16_t socket_sendmsg(int8_t socket, const ns_msghdr_t *msg, int flags);
|
||||
|
||||
/**
|
||||
* \brief A function to read session info for TCP event.
|
||||
* \brief A function to read local address and port for a bound socket.
|
||||
*
|
||||
* This call writes ns_in6addr_any if address is not bound and 0 if the port is not bound.
|
||||
*
|
||||
* \param socket The socket ID.
|
||||
* \param address A pointer to the address structure where the session address information is read to.
|
||||
* \param address A pointer to the address structure where the local address information is written to.
|
||||
*
|
||||
* \return 0 on success.
|
||||
* \return -1 if no socket is found or TCP is not compiled into this project.
|
||||
* \return -2 if no session information is found.
|
||||
*
|
||||
* Note: This function should be called only at socket callback when the socket event is SOCKET_BIND_DONE or SOCKET_TX_DONE.
|
||||
* The following sections introduce those functions.
|
||||
* \return -1 if no socket is found.
|
||||
*/
|
||||
int8_t socket_read_session_address(int8_t socket, ns_address_t *address);
|
||||
int8_t socket_getsockname(int8_t socket, ns_address_t *address);
|
||||
|
||||
/**
|
||||
* \brief A function to read remote address and port for a connected socket.
|
||||
*
|
||||
* \param socket The socket ID.
|
||||
* \param address A pointer to the address structure where the remote address information is written to.
|
||||
*
|
||||
* \return 0 on success.
|
||||
* \return -1 if no socket is found.
|
||||
* \return -2 if no socket is not connected.
|
||||
*/
|
||||
int8_t socket_getpeername(int8_t socket, ns_address_t *address);
|
||||
|
||||
/* Backwards compatibility */
|
||||
static inline int8_t socket_read_session_address(int8_t socket, ns_address_t *address)
|
||||
{
|
||||
return socket_getpeername(socket, address);
|
||||
}
|
||||
|
||||
/** \name Flags for SOCKET_IPV6_ADDR_PREFERENCES - opposites 16 bits apart. */
|
||||
///@{
|
||||
|
@ -564,9 +669,24 @@ int8_t socket_read_session_address(int8_t socket, ns_address_t *address);
|
|||
|
||||
/** \name Protocol levels used for socket_setsockopt. */
|
||||
///@{
|
||||
#define SOCKET_SOL_SOCKET 0 /**< Socket level */
|
||||
#define SOCKET_IPPROTO_IPV6 41 /**< IPv6. */
|
||||
///@}
|
||||
|
||||
/** \name Option names for protocol level SOCKET_SOL_SOCKET.
|
||||
* \anchor OPTNAMES_SOCKET
|
||||
*/
|
||||
///@{
|
||||
/** Specify receive buffer size in payload bytes, as int32_t. 0 means traditional Nanostack behaviour - unread data dropped unless read in data callback */
|
||||
#define SOCKET_SO_RCVBUF 1
|
||||
/** Specify send buffer size in payload bytes, as int32_t. Only currently used for stream sockets. */
|
||||
#define SOCKET_SO_SNDBUF 2
|
||||
/** Specify receive low water mark in payload bytes, as int32_t. Not yet implemented. */
|
||||
#define SOCKET_SO_RCVLOWAT 3
|
||||
/** Specify send low water mark in payload bytes, as int32_t. Queued sends will only be accepted if this many bytes of send queue space are available, else NS_EWOULDBLOCK is returned. */
|
||||
#define SOCKET_SO_SNDLOWAT 4
|
||||
///@}
|
||||
|
||||
/** \name Option names for protocol level SOCKET_IPPROTO_IPV6.
|
||||
* \anchor OPTNAMES_IPV6
|
||||
*/
|
||||
|
@ -602,7 +722,7 @@ int8_t socket_read_session_address(int8_t socket, ns_address_t *address);
|
|||
#define SOCKET_INTERFACE_SELECT 0xfe /**< Not standard socket interface ID. */
|
||||
#define SOCKET_IPV6_ADDRESS_SELECT 0xff /**< Deprecated - use SOCKET_IPV6_ADDR_PREFERENCES instead. */
|
||||
|
||||
/** Socket options summary
|
||||
/** IPv6 socket options summary
|
||||
*
|
||||
* | opt_name / cmsg_type | Data type | set/getsockopt | sendmsg | recvmsg |
|
||||
* | :--------------------------: | :--------------: | :-------------: | :-----: | :-------------------------------: |
|
||||
|
@ -635,7 +755,8 @@ int8_t socket_read_session_address(int8_t socket, ns_address_t *address);
|
|||
*
|
||||
* \param socket The socket ID.
|
||||
* \param level The protocol level.
|
||||
* \param opt_name The option name (interpretation depends on level). See \ref OPTNAMES_IPV6.
|
||||
* \param opt_name The option name (interpretation depends on level).
|
||||
* See \ref OPTNAMES_SOCKET and \ref OPTNAMES_IPV6.
|
||||
* \param opt_value A pointer to value for the specified option.
|
||||
* \param opt_len Size of the data pointed to by the value.
|
||||
*
|
||||
|
|
|
@ -103,32 +103,34 @@ int thread_border_router_route_add(int8_t interface_id, uint8_t *prefix_ptr, uin
|
|||
int thread_border_router_route_delete(int8_t interface_id, uint8_t *prefix_ptr, uint8_t prefix_len);
|
||||
|
||||
/**
|
||||
* \brief Add local service.
|
||||
* \brief Add or modify a local service.
|
||||
*
|
||||
* \param interface_id Network interface ID.
|
||||
* \param service_ptr Pointer to service data.
|
||||
* \param service_len Length of service.
|
||||
* \param thread_enteprise True if Thread enterprise number is used.
|
||||
* \param sid Service identifier.
|
||||
* \param enterprise_number If thread_enteprise is false this must be given.
|
||||
* \param service_data Pointer to a byte string specifying the type of service.
|
||||
* \param service_len Length of service data.
|
||||
* \param sid Service Type ID, a value between 0 and 15, inclusive, assigned to this service data.
|
||||
* \param enterprise_number Enterprise number of the vendor that defined the type of the server.
|
||||
* \param server_data Pointer to a byte string containing server-specific information.
|
||||
* \param server_data_len Length of server data.
|
||||
* \param stable This data is stable and expected to be available at least 48h.
|
||||
*
|
||||
* \return 0, Set OK.
|
||||
* \return <0 Set not OK.
|
||||
* \return 0, Addition OK.
|
||||
* \return <0 Addition not OK.
|
||||
*/
|
||||
//TODO PUUTTUUU SERVER data
|
||||
int thread_border_router_service_add(int8_t interface_id, uint8_t *service_ptr, uint8_t service_len, bool thread_enteprise, uint8_t sid, uint32_t enterprise_number);
|
||||
int thread_border_router_service_add(int8_t interface_id, uint8_t *service_data, uint8_t service_len, uint8_t sid, uint32_t enterprise_number, uint8_t *server_data, uint8_t server_data_len, bool stable);
|
||||
|
||||
/**
|
||||
* \brief Delete local service.
|
||||
* \brief Delete local service by service data and enterprise number.
|
||||
*
|
||||
* \param interface_id Network interface ID.
|
||||
* \param service_ptr Pointer to service data.
|
||||
* \param service_data Pointer to a byte string specifying the type of service.
|
||||
* \param service_len Length of service.
|
||||
* \param enterprise_number Enterprise number of the vendor that defined the type of the server.
|
||||
*
|
||||
* \return 0, Set OK.
|
||||
* \return <0 Set not OK.
|
||||
* \return 0, Delete OK.
|
||||
* \return <0 Delete not OK.
|
||||
*/
|
||||
int thread_border_router_service_delete(int8_t interface_id, uint8_t *service_ptr, uint8_t service_len);
|
||||
int thread_border_router_service_delete(int8_t interface_id, uint8_t *service_data, uint8_t service_len, uint32_t enterprise_number);
|
||||
|
||||
/**
|
||||
* \brief Publish local services to Thread network.
|
||||
|
@ -180,4 +182,90 @@ int thread_border_router_recursive_dns_server_option_set(int8_t interface_id, ui
|
|||
*/
|
||||
int thread_border_router_dns_search_list_option_set(int8_t interface_id, uint8_t *dns_search_list_option, uint16_t search_list_option_len);
|
||||
|
||||
#endif /* THREAD_DHCPV6_SERVER_H_ */
|
||||
/**
|
||||
* \brief Callback type for Thread network data TLV registration
|
||||
*
|
||||
* \param interface_id Network interface ID.
|
||||
* \param network_data_tlv Thread Network data TLV as specified in Thread specification.
|
||||
* \param network_data_tlv_length length of the network data TLV.
|
||||
*/
|
||||
typedef void (thread_network_data_tlv_cb)(int8_t interface_id, uint8_t *network_data_tlv, uint16_t network_data_tlv_length);
|
||||
|
||||
/**
|
||||
* \brief Register callback function to receive thread network data TLV in byte array. For the first time the callback
|
||||
* will be called before returning from the function. Afterwards the callback will be called when there is a change
|
||||
* to the network data or when the network data is advertised. Application is not allowed to block the callback execution
|
||||
* and must make a copy of the network data if it is needed afterwards.
|
||||
*
|
||||
* Setting nwk_data_cb to NULL will prevent further calls to the callback function.
|
||||
*
|
||||
* \param interface_id Network interface ID.
|
||||
* \param nwk_data_cb callback function to receive network data TLV in byte array as specified in the Thread specification.
|
||||
*
|
||||
* \return 0, Callback function registered successfully.
|
||||
* \return <0 when error occurs during registering the callback function.
|
||||
*/
|
||||
int thread_border_router_network_data_callback_register(int8_t interface_id, thread_network_data_tlv_cb* nwk_data_cb);
|
||||
|
||||
/**
|
||||
* Find Prefix TLV from the Network Data TLV byte array.
|
||||
*
|
||||
* \param network_data_tlv [IN] Network data TLV in byte array.
|
||||
* \param network_data_tlv_length [IN] Length of the network data TLV byte array in bytes.
|
||||
* \param prefix_tlv [IN] pointer to the previous prefix_tlv, NULL if previous TLV not known.
|
||||
* [OUT] Pointer to the prefix TLV found.
|
||||
* \param stable [OUT] value set to true if found TLV is stable, false otherwise.
|
||||
*
|
||||
* \return Length of the found Prefix TLV
|
||||
* \return 0 if TLV is empty or no Prefix TLV found.
|
||||
* \return negative value indicates error in input parameters.
|
||||
*/
|
||||
int thread_border_router_prefix_tlv_find(uint8_t* network_data_tlv, uint16_t network_data_tlv_length, uint8_t** prefix_tlv, bool* stable);
|
||||
|
||||
/**
|
||||
* Find Border router TLV from the Network Data TLV (under Prefix TLV) byte array.
|
||||
*
|
||||
* \param prefix_tlv [IN] Network data TLV in byte array.
|
||||
* \param prefix_tlv_length [IN] Length of the Network data TLV byte array in bytes.
|
||||
* \param border_router_tlv [IN] pointer to the previous Border Router TLV, NULL if not known.
|
||||
* [OUT] Pointer to the Border Router TLV found.
|
||||
* \param stable [OUT] value set to true if found TLV is stable, false otherwise
|
||||
*
|
||||
* \return Length of the Prefix found
|
||||
* \return 0 if TLV is empty or no TLV found.
|
||||
* \return negative value indicates error in input parameters.
|
||||
*/
|
||||
int thread_border_router_tlv_find(uint8_t* prefix_tlv, uint16_t prefix_tlv_length, uint8_t** border_router_tlv, bool* stable);
|
||||
|
||||
/**
|
||||
* Find Service TLV from the Network Data TLV byte array.
|
||||
*
|
||||
* \param network_data_tlv [IN] Network data TLV in byte array.
|
||||
* \param network_data_tlv_length [IN] Length of the network data TLV byte array in bytes.
|
||||
* \param service_tlv [IN] pointer to the previous Service TLV, NULL if previous TLV not known.
|
||||
* [OUT] Pointer to the Service TLV found.
|
||||
* \param stable [OUT] value set to true if found TLV is stable, false otherwise.
|
||||
*
|
||||
* \return Length of the found Service TLV
|
||||
* \return 0 if TLV is empty or no Service TLV found.
|
||||
* \return negative value indicates error in input parameters.
|
||||
*/
|
||||
int thread_border_router_service_tlv_find(uint8_t* network_data_tlv, uint16_t network_data_tlv_length, uint8_t** service_tlv, bool* stable);
|
||||
|
||||
/**
|
||||
* Find Server TLV from the Network Data TLV (under Service TLV) byte array.
|
||||
*
|
||||
* \param service_tlv [IN] Network data TLV in byte array.
|
||||
* \param service_tlv_length [IN] Length of the Network data TLV byte array in bytes.
|
||||
* \param server_tlv [IN] pointer to the previous Server TLV, NULL if not known.
|
||||
* [OUT] Pointer to the Server TLV found.
|
||||
* \param stable [OUT] value set to true if found TLV is stable, false otherwise
|
||||
*
|
||||
* \return Length of the Prefix found
|
||||
* \return 0 if TLV is empty or no TLV found.
|
||||
* \return negative value indicates error in input parameters.
|
||||
*/
|
||||
int thread_border_router_server_tlv_find(uint8_t* service_tlv, uint16_t service_tlv_length, uint8_t** server_tlv, bool* stable);
|
||||
|
||||
|
||||
#endif /* THREAD_BORDER_ROUTER_API_H_ */
|
||||
|
|
|
@ -106,7 +106,7 @@ int thread_management_set_security_policy(int8_t instance_id, uint8_t options, u
|
|||
* filter indicates whether to use 0 == EUI-64 or 1 == bottom 24 bits of EUI-64.
|
||||
*
|
||||
* \param instance_id The ID of the management session.
|
||||
* \param session_id The commissioning session id that needs to be added
|
||||
* \param session_id The commissioning session ID that needs to be added.
|
||||
* \param steering_data_ptr A pointer to new steering data.
|
||||
* \param steering_data_len The length of the new steering data.
|
||||
* \param cb_ptr A callback function indicating the result of the operation. Can be NULL if no result code needed.
|
||||
|
@ -118,7 +118,7 @@ int thread_management_set_steering_data(int8_t instance_id, uint16_t session_id,
|
|||
|
||||
/** \brief Set the Thread commissioning data timestamp
|
||||
*
|
||||
* \param instance_id the ID of the management session.
|
||||
* \param instance_id The ID of the management session.
|
||||
* \param time Upper 48 bits is the timestamp in seconds since the start of unix time, lower 16 bits are fractional portion of time. If the last bit is set to 1, the commissioner has accurate time.
|
||||
* \param cb_ptr A callback function indicating the result of the operation. Can be NULL if no result code needed.
|
||||
*
|
||||
|
@ -143,15 +143,14 @@ int thread_management_set_commissioning_data_timestamp(int8_t instance_id, uint6
|
|||
typedef int (management_get_response_cb)(int8_t instance_id, management_state_e status, uint8_t *response_message_ptr, uint16_t response_message_len);
|
||||
|
||||
/** \brief Get Thread management fields.
|
||||
* Comments from PEKKA: please rewrite the parameter descriptions below.
|
||||
* Read Thread management field values from the leader of the Thread network.
|
||||
* Fetching Thread management field values from any device in the Thread network.
|
||||
*
|
||||
* \param interface_id The interface ID where the request was made.
|
||||
* \param dst_addr Destination address for remote if address is not given sent to leader of network or if native commissioner sent to Border router.
|
||||
* \param uri_ptr The ASCII string for the URI. Can be Active (default if NULL)/Pending/Commissioner URI.
|
||||
* \param fields_ptr The fields to be read from the leader from the network. Array of MESHCOP TLV defines from thread_meshcop_lib.h
|
||||
* \param fields_len count of fields in the fields_ptr array.
|
||||
* \param cb_ptr callback function to inform the result of the operation. Can be NULL if no result code needed.
|
||||
* \param instance_id Instance ID of the management session.
|
||||
* \param dst_addr Destination address; the address of a remote device from whome it is desirable to fetch management information. If however, the address is not provided, a request is sent to the leader of the network for this purpose. If a native commissioner is used, the request for management information is sent to the border router.
|
||||
* \param uri_ptr The ASCII string for the URI. This string identifies the CoAP URI for the desired resource. For example, /c/mg identifies the management get information resource.
|
||||
* \param fields_ptr A pointer that points to an array of desirable MESHCOP TLVs. A list of such TLVs can be found in thread_meshcop_lib.h
|
||||
* \param fields_count Number of fields in the field pointer array (set of TLVs).
|
||||
* \param cb_ptr A callback function carrying the result of the operation.
|
||||
*
|
||||
* \return 0, Success.
|
||||
* \return <0 Fail.
|
||||
|
@ -160,14 +159,14 @@ int thread_management_get(int8_t instance_id, uint8_t dst_addr[static 16], char
|
|||
|
||||
/** \brief Set Thread management fields
|
||||
*
|
||||
* Set Thread management field values to the leader of the Thread network.
|
||||
* Set Thread management field values to a device in Thread network.
|
||||
*
|
||||
* \param interface_id Interface id where the request was made.
|
||||
* \param dst_addr Destination address for remote if address is not given sent to leader of network or if native commissioner sent to Border router.
|
||||
* \param uri_ptr Ascii string for the URI. Can be Active(default if NULL)/Pending/Commissioner URI.
|
||||
* \param data_ptr fields wanted to set to the leader. Array of MESHCOP TLV defines from thread_meshcop_lib.h
|
||||
* \param data_len length of data in the data_ptr.
|
||||
* \param cb_ptr callback function to inform the result of the operation. Can be NULL if no result code needed.
|
||||
* \param instance_id Instance ID of the management session.
|
||||
* \param dst_addr Destination address, the address of a remote device where it is desired to setup management information. If however, the address is not provided, a request is sent to leader of the network for this purpose. If a native commissioner is being used, the rquest for setting up management information is sent to the Border router.
|
||||
* \param uri_ptr The ASCII string for the URI. This string identifies the CoAP URI for the desired resource, for example, /c/ms identifies the the management set information resource.
|
||||
* \param data_ptr A pointer to the desired set of TLVs.
|
||||
* \param data_len count of the members (no. of TLVs) in the TLV set.
|
||||
* \param cb_ptr A callback function carrying the result of the operation.
|
||||
*
|
||||
*/
|
||||
int thread_management_set(int8_t instance_id, uint8_t dst_addr[static 16], char *uri_ptr, uint8_t *data_ptr, uint8_t data_len, management_set_response_cb *cb_ptr);
|
||||
|
|
|
@ -189,6 +189,19 @@ bool thread_meshcop_tlv_exist(const uint8_t *ptr, const uint16_t length, const u
|
|||
*/
|
||||
uint16_t thread_meshcop_tlv_find(const uint8_t *ptr, const uint16_t length, const uint8_t type, uint8_t **result_ptr);
|
||||
|
||||
/**
|
||||
* Find next TLV from message.
|
||||
*
|
||||
* \param tlv_ba TLV message buffer.
|
||||
* \param tlv_ba_length Length of the TLV message buffer.
|
||||
* \param tlv_id ID of the TLV to be searched.
|
||||
* \param found_tlv [IN] Pointer value is given as result if length is > 0. Can be NULL which only searches for the length.
|
||||
* \ [OUT] Pointer to previous TLV found
|
||||
*
|
||||
* \return The length of the TLV data found and found_tlv updated to point beginning of value field. 0 if TLV is not found.
|
||||
*/
|
||||
uint16_t thread_meshcop_tlv_find_next(uint8_t* tlv_ba, uint16_t tlv_ba_length, uint8_t tlv_id, uint8_t** found_tlv);
|
||||
|
||||
/**
|
||||
* Read 1 byte length TLV.
|
||||
*
|
||||
|
|
|
@ -43,6 +43,15 @@ typedef struct whiteboard_entry_t {
|
|||
* \return A pointer to whiteboard_entry_t structure.
|
||||
*/
|
||||
extern whiteboard_entry_t *whiteboard_get(whiteboard_entry_t *cur);
|
||||
|
||||
/**
|
||||
* @brief Whiteboard_set_device_hard_limit Sets the absolut limit of child devices this device can handle.
|
||||
* This is very useful in situations, where 1 GW drops from network and causes it's children
|
||||
* to join other GW networks. This might cause other GWs to run out of memory.
|
||||
* @param limit Absolute maximum amount of devices allowed to join. Default value=0 means unlimited (as long as there is memory)
|
||||
*/
|
||||
extern void whiteboard_set_device_hard_limit(uint16_t limit);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
|
BIN
features/nanostack/FEATURE_NANOSTACK_FULL/TOOLCHAIN_ARM/TARGET_LIKE_CORTEX_M0/libnanostack_armcc_Cortex-M0_nanostack_full.ar
Executable file → Normal file
BIN
features/nanostack/FEATURE_NANOSTACK_FULL/TOOLCHAIN_ARM/TARGET_LIKE_CORTEX_M0/libnanostack_armcc_Cortex-M0_nanostack_full.ar
Executable file → Normal file
Binary file not shown.
BIN
features/nanostack/FEATURE_NANOSTACK_FULL/TOOLCHAIN_ARM/TARGET_M3/libnanostack_armcc_Cortex-M3_nanostack_full.ar
Executable file → Normal file
BIN
features/nanostack/FEATURE_NANOSTACK_FULL/TOOLCHAIN_ARM/TARGET_M3/libnanostack_armcc_Cortex-M3_nanostack_full.ar
Executable file → Normal file
Binary file not shown.
BIN
features/nanostack/FEATURE_NANOSTACK_FULL/TOOLCHAIN_ARM/TARGET_RTOS_M4_M7/libnanostack_armcc_Cortex-M3_nanostack_full.ar
Executable file → Normal file
BIN
features/nanostack/FEATURE_NANOSTACK_FULL/TOOLCHAIN_ARM/TARGET_RTOS_M4_M7/libnanostack_armcc_Cortex-M3_nanostack_full.ar
Executable file → Normal file
Binary file not shown.
BIN
features/nanostack/FEATURE_NANOSTACK_FULL/TOOLCHAIN_GCC/TARGET_LIKE_CORTEX_M0/libnanostack_arm-none-eabi-gcc_Cortex-M0_nanostack_full.a
Executable file → Normal file
BIN
features/nanostack/FEATURE_NANOSTACK_FULL/TOOLCHAIN_GCC/TARGET_LIKE_CORTEX_M0/libnanostack_arm-none-eabi-gcc_Cortex-M0_nanostack_full.a
Executable file → Normal file
Binary file not shown.
BIN
features/nanostack/FEATURE_NANOSTACK_FULL/TOOLCHAIN_GCC/TARGET_M3/libnanostack_arm-none-eabi-gcc_Cortex-M3_nanostack_full.a
Executable file → Normal file
BIN
features/nanostack/FEATURE_NANOSTACK_FULL/TOOLCHAIN_GCC/TARGET_M3/libnanostack_arm-none-eabi-gcc_Cortex-M3_nanostack_full.a
Executable file → Normal file
Binary file not shown.
BIN
features/nanostack/FEATURE_NANOSTACK_FULL/TOOLCHAIN_GCC/TARGET_RTOS_M4_M7/libnanostack_arm-none-eabi-gcc_Cortex-M3_nanostack_full.a
Executable file → Normal file
BIN
features/nanostack/FEATURE_NANOSTACK_FULL/TOOLCHAIN_GCC/TARGET_RTOS_M4_M7/libnanostack_arm-none-eabi-gcc_Cortex-M3_nanostack_full.a
Executable file → Normal file
Binary file not shown.
BIN
features/nanostack/FEATURE_NANOSTACK_FULL/TOOLCHAIN_IAR/TARGET_LIKE_CORTEX_M0/libnanostack_iccarm_Cortex-M0_nanostack_full.a
Executable file → Normal file
BIN
features/nanostack/FEATURE_NANOSTACK_FULL/TOOLCHAIN_IAR/TARGET_LIKE_CORTEX_M0/libnanostack_iccarm_Cortex-M0_nanostack_full.a
Executable file → Normal file
Binary file not shown.
BIN
features/nanostack/FEATURE_NANOSTACK_FULL/TOOLCHAIN_IAR/TARGET_M3/libnanostack_iccarm_Cortex-M3_nanostack_full.a
Executable file → Normal file
BIN
features/nanostack/FEATURE_NANOSTACK_FULL/TOOLCHAIN_IAR/TARGET_M3/libnanostack_iccarm_Cortex-M3_nanostack_full.a
Executable file → Normal file
Binary file not shown.
BIN
features/nanostack/FEATURE_NANOSTACK_FULL/TOOLCHAIN_IAR/TARGET_RTOS_M4_M7/libnanostack_iccarm_Cortex-M3_nanostack_full.a
Executable file → Normal file
BIN
features/nanostack/FEATURE_NANOSTACK_FULL/TOOLCHAIN_IAR/TARGET_RTOS_M4_M7/libnanostack_iccarm_Cortex-M3_nanostack_full.a
Executable file → Normal file
Binary file not shown.
BIN
features/nanostack/FEATURE_THREAD_BORDER_ROUTER/TOOLCHAIN_ARM/TARGET_LIKE_CORTEX_M0/libnanostack_armcc_Cortex-M0_thread_border_router.ar
Executable file → Normal file
BIN
features/nanostack/FEATURE_THREAD_BORDER_ROUTER/TOOLCHAIN_ARM/TARGET_LIKE_CORTEX_M0/libnanostack_armcc_Cortex-M0_thread_border_router.ar
Executable file → Normal file
Binary file not shown.
BIN
features/nanostack/FEATURE_THREAD_BORDER_ROUTER/TOOLCHAIN_ARM/TARGET_M3/libnanostack_armcc_Cortex-M3_thread_border_router.ar
Executable file → Normal file
BIN
features/nanostack/FEATURE_THREAD_BORDER_ROUTER/TOOLCHAIN_ARM/TARGET_M3/libnanostack_armcc_Cortex-M3_thread_border_router.ar
Executable file → Normal file
Binary file not shown.
BIN
features/nanostack/FEATURE_THREAD_BORDER_ROUTER/TOOLCHAIN_ARM/TARGET_RTOS_M4_M7/libnanostack_armcc_Cortex-M3_thread_border_router.ar
Executable file → Normal file
BIN
features/nanostack/FEATURE_THREAD_BORDER_ROUTER/TOOLCHAIN_ARM/TARGET_RTOS_M4_M7/libnanostack_armcc_Cortex-M3_thread_border_router.ar
Executable file → Normal file
Binary file not shown.
Binary file not shown.
BIN
features/nanostack/FEATURE_THREAD_BORDER_ROUTER/TOOLCHAIN_GCC/TARGET_M3/libnanostack_arm-none-eabi-gcc_Cortex-M3_thread_border_router.a
Executable file → Normal file
BIN
features/nanostack/FEATURE_THREAD_BORDER_ROUTER/TOOLCHAIN_GCC/TARGET_M3/libnanostack_arm-none-eabi-gcc_Cortex-M3_thread_border_router.a
Executable file → Normal file
Binary file not shown.
Binary file not shown.
BIN
features/nanostack/FEATURE_THREAD_BORDER_ROUTER/TOOLCHAIN_IAR/TARGET_LIKE_CORTEX_M0/libnanostack_iccarm_Cortex-M0_thread_border_router.a
Executable file → Normal file
BIN
features/nanostack/FEATURE_THREAD_BORDER_ROUTER/TOOLCHAIN_IAR/TARGET_LIKE_CORTEX_M0/libnanostack_iccarm_Cortex-M0_thread_border_router.a
Executable file → Normal file
Binary file not shown.
BIN
features/nanostack/FEATURE_THREAD_BORDER_ROUTER/TOOLCHAIN_IAR/TARGET_M3/libnanostack_iccarm_Cortex-M3_thread_border_router.a
Executable file → Normal file
BIN
features/nanostack/FEATURE_THREAD_BORDER_ROUTER/TOOLCHAIN_IAR/TARGET_M3/libnanostack_iccarm_Cortex-M3_thread_border_router.a
Executable file → Normal file
Binary file not shown.
BIN
features/nanostack/FEATURE_THREAD_BORDER_ROUTER/TOOLCHAIN_IAR/TARGET_RTOS_M4_M7/libnanostack_iccarm_Cortex-M3_thread_border_router.a
Executable file → Normal file
BIN
features/nanostack/FEATURE_THREAD_BORDER_ROUTER/TOOLCHAIN_IAR/TARGET_RTOS_M4_M7/libnanostack_iccarm_Cortex-M3_thread_border_router.a
Executable file → Normal file
Binary file not shown.
BIN
features/nanostack/FEATURE_THREAD_END_DEVICE/TOOLCHAIN_ARM/TARGET_LIKE_CORTEX_M0/libnanostack_armcc_Cortex-M0_thread_end_device.ar
Executable file → Normal file
BIN
features/nanostack/FEATURE_THREAD_END_DEVICE/TOOLCHAIN_ARM/TARGET_LIKE_CORTEX_M0/libnanostack_armcc_Cortex-M0_thread_end_device.ar
Executable file → Normal file
Binary file not shown.
BIN
features/nanostack/FEATURE_THREAD_END_DEVICE/TOOLCHAIN_ARM/TARGET_M3/libnanostack_armcc_Cortex-M3_thread_end_device.ar
Executable file → Normal file
BIN
features/nanostack/FEATURE_THREAD_END_DEVICE/TOOLCHAIN_ARM/TARGET_M3/libnanostack_armcc_Cortex-M3_thread_end_device.ar
Executable file → Normal file
Binary file not shown.
BIN
features/nanostack/FEATURE_THREAD_END_DEVICE/TOOLCHAIN_ARM/TARGET_RTOS_M4_M7/libnanostack_armcc_Cortex-M3_thread_end_device.ar
Executable file → Normal file
BIN
features/nanostack/FEATURE_THREAD_END_DEVICE/TOOLCHAIN_ARM/TARGET_RTOS_M4_M7/libnanostack_armcc_Cortex-M3_thread_end_device.ar
Executable file → Normal file
Binary file not shown.
Binary file not shown.
BIN
features/nanostack/FEATURE_THREAD_END_DEVICE/TOOLCHAIN_GCC/TARGET_M3/libnanostack_arm-none-eabi-gcc_Cortex-M3_thread_end_device.a
Executable file → Normal file
BIN
features/nanostack/FEATURE_THREAD_END_DEVICE/TOOLCHAIN_GCC/TARGET_M3/libnanostack_arm-none-eabi-gcc_Cortex-M3_thread_end_device.a
Executable file → Normal file
Binary file not shown.
Binary file not shown.
BIN
features/nanostack/FEATURE_THREAD_END_DEVICE/TOOLCHAIN_IAR/TARGET_LIKE_CORTEX_M0/libnanostack_iccarm_Cortex-M0_thread_end_device.a
Executable file → Normal file
BIN
features/nanostack/FEATURE_THREAD_END_DEVICE/TOOLCHAIN_IAR/TARGET_LIKE_CORTEX_M0/libnanostack_iccarm_Cortex-M0_thread_end_device.a
Executable file → Normal file
Binary file not shown.
BIN
features/nanostack/FEATURE_THREAD_END_DEVICE/TOOLCHAIN_IAR/TARGET_M3/libnanostack_iccarm_Cortex-M3_thread_end_device.a
Executable file → Normal file
BIN
features/nanostack/FEATURE_THREAD_END_DEVICE/TOOLCHAIN_IAR/TARGET_M3/libnanostack_iccarm_Cortex-M3_thread_end_device.a
Executable file → Normal file
Binary file not shown.
BIN
features/nanostack/FEATURE_THREAD_END_DEVICE/TOOLCHAIN_IAR/TARGET_RTOS_M4_M7/libnanostack_iccarm_Cortex-M3_thread_end_device.a
Executable file → Normal file
BIN
features/nanostack/FEATURE_THREAD_END_DEVICE/TOOLCHAIN_IAR/TARGET_RTOS_M4_M7/libnanostack_iccarm_Cortex-M3_thread_end_device.a
Executable file → Normal file
Binary file not shown.
BIN
features/nanostack/FEATURE_THREAD_ROUTER/TOOLCHAIN_ARM/TARGET_LIKE_CORTEX_M0/libnanostack_armcc_Cortex-M0_thread_router.ar
Executable file → Normal file
BIN
features/nanostack/FEATURE_THREAD_ROUTER/TOOLCHAIN_ARM/TARGET_LIKE_CORTEX_M0/libnanostack_armcc_Cortex-M0_thread_router.ar
Executable file → Normal file
Binary file not shown.
BIN
features/nanostack/FEATURE_THREAD_ROUTER/TOOLCHAIN_ARM/TARGET_M3/libnanostack_armcc_Cortex-M3_thread_router.ar
Executable file → Normal file
BIN
features/nanostack/FEATURE_THREAD_ROUTER/TOOLCHAIN_ARM/TARGET_M3/libnanostack_armcc_Cortex-M3_thread_router.ar
Executable file → Normal file
Binary file not shown.
BIN
features/nanostack/FEATURE_THREAD_ROUTER/TOOLCHAIN_ARM/TARGET_RTOS_M4_M7/libnanostack_armcc_Cortex-M3_thread_router.ar
Executable file → Normal file
BIN
features/nanostack/FEATURE_THREAD_ROUTER/TOOLCHAIN_ARM/TARGET_RTOS_M4_M7/libnanostack_armcc_Cortex-M3_thread_router.ar
Executable file → Normal file
Binary file not shown.
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue