/AliOS-Things-master/components/uagent/src/ |
A D | uagent_send.c | 81 int msg_len = 0; in delay_send() local 98 if (msg_len > 0 && msg_len < UAGENT_INFO_PAYLOAD_SIZE) { in delay_send() 146 if(msg_len>0){ in uagent_send() 152 … strncpy(&msg_pub[msg_len], UAGENT_FORMAT_OBJ_SUFFIX, UAGENT_INFO_PAYLOAD_SIZE-msg_len-1); in uagent_send() 154 if (msg_len < UAGENT_INFO_PAYLOAD_SIZE) { in uagent_send() 160 msg_pub[msg_len++] = '"'; in uagent_send() 177 … strncpy(&msg_pub[msg_len], UAGENT_FORMAT_STR_SUFFIX, UAGENT_INFO_PAYLOAD_SIZE-msg_len-1); in uagent_send() 180 if (msg_len < UAGENT_INFO_PAYLOAD_SIZE) { in uagent_send() 206 int msg_len = 0; in uagent_ack() local 219 if (msg_len > 0 && msg_len < UAGENT_INFO_PAYLOAD_SIZE) { in uagent_ack() [all …]
|
/AliOS-Things-master/components/ble_host/bt_host/host/ |
A D | aes_ccm.c | 40 size_t mic_size, u8_t msg_len, u8_t b[16], in ccm_calculate_X0() argument 48 sys_put_be16(msg_len, b + 14); in ccm_calculate_X0() 105 last_blk = msg_len % 16; in ccm_auth() 106 blk_cnt = (msg_len + 15) / 16; in ccm_auth() 158 last_blk = msg_len % 16; in ccm_crypt() 159 blk_cnt = (msg_len + 15) / 16; in ccm_crypt() 199 ccm_crypt(key, nonce, enc_msg, out_msg, msg_len); in bt_ccm_decrypt() 203 if (memcmp(mic, enc_msg + msg_len, mic_size)) { in bt_ccm_decrypt() 214 u8_t *mic = out_msg + msg_len; in bt_ccm_encrypt() 218 BT_DBG("msg (len %zu) %s", msg_len, bt_hex(msg, msg_len)); in bt_ccm_encrypt() [all …]
|
/AliOS-Things-master/components/posix/src/ |
A D | mqueue.c | 28 ssize_t mq_receive(mqd_t mqdes, char *msg_ptr, size_t msg_len, unsigned *msg_prio) in mq_receive() argument 42 int mq_send(mqd_t mqdes, const char *msg_ptr, size_t msg_len, unsigned msg_prio) in mq_send() argument 46 ret = krhino_buf_queue_send((kbuf_queue_t *)mqdes, (void *)msg_ptr, msg_len); in mq_send() 51 return msg_len; in mq_send() 64 ssize_t mq_timedreceive(mqd_t mqdes, char *msg_ptr, size_t msg_len, in mq_timedreceive() argument 84 int mq_timedsend(mqd_t mqdes, const char *msg_ptr, size_t msg_len, in mq_timedsend() argument 91 ret = krhino_buf_queue_send((kbuf_queue_t *)mqdes, (void *)msg_ptr, msg_len); in mq_timedsend() 96 return msg_len; in mq_timedsend()
|
/AliOS-Things-master/components/amp/engine/quickjs_engine/addons/advanced/aiot/ |
A D | module_aiot_activeinfo.c | 49 int32_t msg_len = 0; in amp_app_devinfo_report() local 71 msg_len = strlen(DEVICE_INFO_UPDATE_FMT) + 32; in amp_app_devinfo_report() 72 msg = (char *)amp_malloc(msg_len); in amp_app_devinfo_report() 77 memset(msg, 0, msg_len); in amp_app_devinfo_report() 81 msg_len, in amp_app_devinfo_report() 112 devinfo->data.update.params = amp_malloc(msg_len); in amp_app_devinfo_report() 117 memset(devinfo->data.update.params, 0, msg_len); in amp_app_devinfo_report() 122 memcpy(devinfo->data.update.params, msg, msg_len); in amp_app_devinfo_report()
|
/AliOS-Things-master/components/py_engine/modules/aliyunIoT/ |
A D | module_aiot_activeinfo.c | 24 int32_t msg_len = 0; in pyamp_amp_app_devinfo_report() local 47 msg_len = strlen(DEVICE_INFO_UPDATE_FMT) + 32; in pyamp_amp_app_devinfo_report() 48 msg = (char *)aos_malloc(msg_len); in pyamp_amp_app_devinfo_report() 53 memset(msg, 0, msg_len); in pyamp_amp_app_devinfo_report() 56 res = snprintf(msg, msg_len, DEVICE_INFO_UPDATE_FMT, APPLICATION, in pyamp_amp_app_devinfo_report() 90 devinfo->data.update.params = aos_malloc(msg_len); in pyamp_amp_app_devinfo_report() 97 memset(devinfo->data.update.params, 0, msg_len); in pyamp_amp_app_devinfo_report() 102 memcpy(devinfo->data.update.params, msg, msg_len); in pyamp_amp_app_devinfo_report()
|
/AliOS-Things-master/components/amp/engine/duktape_engine/addons/advanced/aiot/ |
A D | module_aiot_activeinfo.c | 24 int32_t msg_len = 0; in amp_app_devinfo_report() local 46 msg_len = strlen(DEVICE_INFO_UPDATE_FMT) + 32; in amp_app_devinfo_report() 47 msg = (char *)aos_malloc(msg_len); in amp_app_devinfo_report() 52 memset(msg, 0, msg_len); in amp_app_devinfo_report() 56 msg_len, in amp_app_devinfo_report() 93 devinfo->data.update.params = aos_malloc(msg_len); in amp_app_devinfo_report() 100 memset(devinfo->data.update.params, 0, msg_len); in amp_app_devinfo_report() 105 memcpy(devinfo->data.update.params, msg, msg_len); in amp_app_devinfo_report()
|
/AliOS-Things-master/components/posix/include/ |
A D | mqueue.h | 29 ssize_t mq_receive(mqd_t mqdes, char *msg_ptr, size_t msg_len, unsigned *msg_prio); 30 int mq_send(mqd_t mqdes, const char *msg_ptr, size_t msg_len, unsigned msg_prio); 33 ssize_t mq_timedreceive(mqd_t mqdes, char *msg_ptr, size_t msg_len, unsigned *msg_prio, const struc… 34 int mq_timedsend(mqd_t mqdes, const char *msg_ptr, size_t msg_len, unsigned msg_prio, const str…
|
/AliOS-Things-master/components/amp/engine/quickjs_engine/addons/repl/ |
A D | module_repl.c | 56 size_t msg_len = 0; in native_repl_puts() local 68 msg_len = strlen(buf); in native_repl_puts() 71 buf = JS_GetArrayBuffer(ctx, &msg_len, argv[0]); in native_repl_puts() 73 amp_warn(MOD_STR, "parameter buffer is invalid, size: %d", msg_len); in native_repl_puts() 78 msg = (char *)aos_malloc(msg_len + 1); in native_repl_puts() 84 memcpy(msg, buf, msg_len); in native_repl_puts() 86 msg[msg_len] = 0; in native_repl_puts()
|
/AliOS-Things-master/components/amp/engine/quickjs_engine/addons/network/udp/ |
A D | module_udp.c | 32 int msg_len; member 169 ret = aos_udp_sendto(sock_id, &(send_param->options), send_param->msg, send_param->msg_len, 0); in udp_send_routine() 206 int msg_len; in native_udp_sendto() local 257 msg_len = strlen(buf); in native_udp_sendto() 259 buf = JS_GetArrayBuffer(ctx, &msg_len, j_message); in native_udp_sendto() 261 amp_warn(MOD_STR, "parameter buffer is invalid, size: %d", msg_len); in native_udp_sendto() 266 msg = (char *)amp_malloc(msg_len + 1); in native_udp_sendto() 271 memcpy(msg, buf, msg_len); in native_udp_sendto() 272 msg[msg_len] = 0; in native_udp_sendto() 280 amp_debug(MOD_STR, "msg is:%s, length is: %d", msg, msg_len); in native_udp_sendto() [all …]
|
/AliOS-Things-master/components/py_engine/modules/network/udp/ |
A D | module_udp.c | 31 int msg_len; member 165 send_param->msg_len, 0); in udp_send_routine() 202 int msg_len; in native_udp_sendto() local 246 msg_len = duk_get_length(ctx, -1); in native_udp_sendto() 247 msg = (char *)aos_calloc(1, msg_len + 1); in native_udp_sendto() 252 for (i = 0; i < msg_len; i++) { in native_udp_sendto() 257 msg[msg_len] = 0; in native_udp_sendto() 269 amp_debug(MOD_STR, "msg is:%s, length is: %d", msg, msg_len); in native_udp_sendto() 281 send_param->msg_len = msg_len; in native_udp_sendto() 285 options.ip, options.port, msg, msg_len); in native_udp_sendto()
|
/AliOS-Things-master/components/amp/engine/duktape_engine/addons/network/udp/ |
A D | module_udp.c | 31 int msg_len; member 164 ret = aos_udp_sendto(sock_id, &udp_options, send_param->msg, send_param->msg_len, 0); in udp_send_routine() 201 int msg_len; in native_udp_sendto() local 244 msg_len = duk_get_length(ctx, -1); in native_udp_sendto() 245 msg = (char *)aos_calloc(1, msg_len + 1); in native_udp_sendto() 250 for (i = 0; i < msg_len; i++) { in native_udp_sendto() 255 msg[msg_len] = 0; in native_udp_sendto() 267 amp_debug(MOD_STR, "msg is:%s, length is: %d", msg, msg_len); in native_udp_sendto() 279 send_param->msg_len = msg_len; in native_udp_sendto() 282 …STR, "sockid:%d ip:%s port:%d msg:%s msg_len:%d", sock_id, options.ip, options.port, msg, msg_len); in native_udp_sendto()
|
/AliOS-Things-master/components/py_engine/modules/network/tcp/ |
A D | module_tcp.c | 20 int msg_len; member 193 ret = aos_tcp_write(sock_id, send_param->msg, send_param->msg_len, 0); in tcp_send_routine() 229 int msg_len; in native_tcp_send() local 244 msg_len = duk_get_length(ctx, 1); in native_tcp_send() 245 msg = (char *)aos_malloc(msg_len + 1); in native_tcp_send() 250 for (i = 0; i < msg_len; i++) { in native_tcp_send() 255 msg[msg_len] = 0; in native_tcp_send() 266 amp_debug(MOD_STR, "msg is:%s, length is: %d", msg, msg_len); in native_tcp_send() 276 send_param->msg_len = msg_len; in native_tcp_send()
|
/AliOS-Things-master/components/amp/engine/duktape_engine/addons/network/tcp/ |
A D | module_tcp.c | 20 int msg_len; member 195 ret = aos_tcp_write(sock_id, send_param->msg, send_param->msg_len, 0); in tcp_send_routine() 231 int msg_len; in native_tcp_send() local 246 msg_len = duk_get_length(ctx, 1); in native_tcp_send() 247 msg = (char *)aos_malloc(msg_len + 1); in native_tcp_send() 252 for (i = 0; i < msg_len; i++) { in native_tcp_send() 257 msg[msg_len] = 0; in native_tcp_send() 268 amp_debug(MOD_STR, "msg is:%s, length is: %d", msg, msg_len); in native_tcp_send() 278 send_param->msg_len = msg_len; in native_tcp_send()
|
/AliOS-Things-master/components/linkkit/wrappers/platform/ssl/ |
A D | iotx_hmac.c | 40 void iotx_hmac_md5(const char *msg, int msg_len, char *digest, const char *key, in iotx_hmac_md5() argument 62 mbedtls_md5_update(&ctx, (unsigned char *)msg, msg_len); in iotx_hmac_md5() 77 void iotx_hmac_sha1(const char *msg, int msg_len, char *digest, const char *key, in iotx_hmac_sha1() argument 98 mbedtls_sha1_update(&ctx, (unsigned char *)msg, msg_len); in iotx_hmac_sha1()
|
/AliOS-Things-master/components/linkkit/infra/ |
A D | infra_report.c | 111 int msg_len = 0; in iotx_report_devinfo() local 132 msg_len = in iotx_report_devinfo() 134 msg = (char *)SYS_REPORT_MALLOC(msg_len); in iotx_report_devinfo() 139 memset(msg, 0, msg_len); in iotx_report_devinfo() 142 ret = HAL_Snprintf(msg, msg_len, DEVICE_INFO_UPDATE_FMT, iotx_report_id(), in iotx_report_devinfo()
|
/AliOS-Things-master/components/mbedtls/library/ |
A D | ccm.c | 450 static const size_t msg_len[NB_TESTS] = { 4, 16, 24 }; variable 494 memcpy( plaintext, msg, msg_len[i] ); in mbedtls_ccm_self_test() 496 ret = mbedtls_ccm_encrypt_and_tag( &ctx, msg_len[i], in mbedtls_ccm_self_test() 499 ciphertext + msg_len[i], tag_len[i] ); in mbedtls_ccm_self_test() 502 memcmp( ciphertext, res[i], msg_len[i] + tag_len[i] ) != 0 ) in mbedtls_ccm_self_test() 511 ret = mbedtls_ccm_auth_decrypt( &ctx, msg_len[i], in mbedtls_ccm_self_test() 514 ciphertext + msg_len[i], tag_len[i] ); in mbedtls_ccm_self_test() 517 memcmp( plaintext, msg, msg_len[i] ) != 0 ) in mbedtls_ccm_self_test()
|
/AliOS-Things-master/components/linkkit/include/linkkit/infra/ |
A D | infra_sha1.h | 81 void utils_hmac_sha1(const char *msg, int msg_len, char *digest, 83 void utils_hmac_sha1_hex(const char *msg, int msg_len, char *digest,
|
/AliOS-Things-master/components/linkkit/dev_model/alcs/ |
A D | alcs_mqtt.c | 37 uint16_t msg_len = 0; in __alcs_mqtt_send_response() local 44 msg_len = in __alcs_mqtt_send_response() 47 msg_pub = ALCS_ADAPTER_malloc(msg_len); in __alcs_mqtt_send_response() 52 HAL_Snprintf(msg_pub, msg_len, ALCS_MQTT_THING_LAN_PREFIX_RESPONSE_FMT, id, in __alcs_mqtt_send_response() 618 uint16_t msg_len = 0; in alcs_prefixkey_get() local 632 msg_len = strlen(ALCS_MQTT_THING_ALCS_REQUEST) + 10 + 1; in alcs_prefixkey_get() 633 msg_pub = ALCS_ADAPTER_malloc(msg_len); in alcs_prefixkey_get() 638 HAL_Snprintf(msg_pub, msg_len, ALCS_MQTT_THING_ALCS_REQUEST, id); in alcs_prefixkey_get() 653 uint16_t msg_len = 0; in alcs_mqtt_subdev_prefix_get() local 669 msg_len = strlen(ALCS_MQTT_THING_ALCS_SUBDEV_REQUEST) + 10 + in alcs_mqtt_subdev_prefix_get() [all …]
|
/AliOS-Things-master/components/ble_mesh/bt_mesh/core/src/ |
A D | crypto.c | 192 const u8_t *enc_msg, size_t msg_len, in bt_mesh_ccm_decrypt() argument 201 if (msg_len < 1 || aad_len >= 0xff00) { in bt_mesh_ccm_decrypt() 223 sys_put_be16(msg_len, pmsg + 14); in bt_mesh_ccm_decrypt() 269 last_blk = msg_len % 16; in bt_mesh_ccm_decrypt() 270 blk_cnt = (msg_len + 15) / 16; in bt_mesh_ccm_decrypt() 350 const u8_t *msg, size_t msg_len, in bt_mesh_ccm_encrypt() argument 361 BT_DBG("msg (len %zu) %s", msg_len, bt_hex(msg, msg_len)); in bt_mesh_ccm_encrypt() 387 sys_put_be16(msg_len, pmsg + 14); in bt_mesh_ccm_encrypt() 433 last_blk = msg_len % 16; in bt_mesh_ccm_encrypt() 434 blk_cnt = (msg_len + 15) / 16; in bt_mesh_ccm_encrypt() [all …]
|
/AliOS-Things-master/components/amp/engine/quickjs_engine/addons/network/tcp/ |
A D | module_tcp.c | 27 int msg_len; member 185 int ret = aos_tcp_write(sock_id, send_param->msg, send_param->msg_len, 0); in tcp_send_routine() 226 int msg_len; in native_tcp_send() local 242 msg_len = strlen(msg); in native_tcp_send() 243 amp_debug(MOD_STR, "msg is:%s, length is: %d", msg, msg_len); in native_tcp_send() 253 send_param->msg_len = msg_len; in native_tcp_send()
|
/AliOS-Things-master/components/amp/engine/quickjs_engine/addons/hardware/uart/ |
A D | module_uart.c | 263 size_t msg_len = 0; in native_uart_write() local 276 msg_len = strlen(buf); in native_uart_write() 278 buf = JS_GetArrayBuffer(ctx, &msg_len, argv[0]); in native_uart_write() 280 amp_warn(MOD_STR, "parameter buffer is invalid, size: %d", msg_len); in native_uart_write() 297 msg = (char *)aos_malloc(msg_len + 1); in native_uart_write() 303 memcpy(msg, buf, msg_len); in native_uart_write() 305 msg[msg_len] = 0; in native_uart_write() 308 ret = aos_hal_uart_send(uart_device, msg, msg_len, osWaitForever); in native_uart_write()
|
/AliOS-Things-master/components/py_engine/external/app_mgr/ |
A D | app_message.c | 465 int32_t msg_len = 0; in pyamp_devinfo_report_service() local 487 msg_len = strlen(DEVICE_INFO_UPDATE_FMT) + 32; in pyamp_devinfo_report_service() 488 msg = (char *)aos_malloc(msg_len); in pyamp_devinfo_report_service() 493 memset(msg, 0, msg_len); in pyamp_devinfo_report_service() 496 res = snprintf(msg, msg_len, DEVICE_INFO_UPDATE_FMT, APPLICATION, MODULE_NAME); in pyamp_devinfo_report_service() 529 devinfo->data.update.params = aos_malloc(msg_len); in pyamp_devinfo_report_service() 536 memset(devinfo->data.update.params, 0, msg_len); in pyamp_devinfo_report_service() 541 memcpy(devinfo->data.update.params, msg, msg_len); in pyamp_devinfo_report_service()
|
/AliOS-Things-master/components/amp/engine/duktape_engine/addons/hardware/uart/ |
A D | module_uart.c | 224 uint32_t msg_len = 0; in native_uart_write() local 239 msg_len = duk_get_length(ctx, 1); in native_uart_write() 240 msg = (char *)aos_malloc(msg_len + 1); in native_uart_write() 245 for (i = 0; i < msg_len; i++) { in native_uart_write() 250 msg[msg_len] = 0; in native_uart_write() 252 ret = aos_hal_uart_send(uart_device, msg, msg_len, osWaitForever); in native_uart_write()
|
/AliOS-Things-master/components/linkkit/include/linkkit/wrappers/ |
A D | wrappers_atm.h | 151 uint32_t msg_len; member 164 unsigned int msg_len);
|
/AliOS-Things-master/components/genie_service/core/src/ |
A D | genie_time.c | 373 uint16_t msg_len = msg_length; in genie_time_timing_settting_event() local 377 msg_len -= 2; in genie_time_timing_settting_event() 391 while (msg_len > 0) in genie_time_timing_settting_event() 485 uint16_t msg_len = msg_length; in genie_time_priordic_timing_settting_event() local 489 msg_len -= 2; in genie_time_priordic_timing_settting_event() 503 while (msg_len > 0) in genie_time_priordic_timing_settting_event() 505 if (msg_len < 7) in genie_time_priordic_timing_settting_event() 661 uint16_t msg_len = msg_length; in genie_time_timing_remove_event() local 665 msg_len -= 2; in genie_time_timing_remove_event() 679 while (msg_len > 0) in genie_time_timing_remove_event() [all …]
|