Home
last modified time | relevance | path

Searched refs:buf (Results 1 - 25 of 28) sorted by relevance

12

/vendor/hisilicon/hispark_pegasus/demo/coap_demo/
H A Diot_main.c87 char *buf; in MsgRcvCallBack() local
96 buf = hi_malloc(0, bufSize); in MsgRcvCallBack()
97 if (buf != NULL) { in MsgRcvCallBack()
98 msg = (IoTMsgT *)buf; in MsgRcvCallBack()
99 buf += sizeof(IoTMsgT); in MsgRcvCallBack()
103 ret = memcpy_s(buf, bufSize, topic, topicLength); in MsgRcvCallBack()
107 buf[topicLength] = '\0'; in MsgRcvCallBack()
108 msg->topic = buf; in MsgRcvCallBack()
109 buf += topicLength + 1; in MsgRcvCallBack()
111 ret = memcpy_s(buf, bufSiz in MsgRcvCallBack()
318 char *buf; IotSendMsg() local
[all...]
H A Diot_hmac.c48 unsigned char *buf) in HmacGeneratePwd()
54 if (key == NULL || content == NULL || buf == NULL || keyLen == 0 || contentLen == 0 || in HmacGeneratePwd()
76 Byte2hexstr(hash, CN_HMAC256_LEN, (char *)buf); in HmacGeneratePwd()
47 HmacGeneratePwd(unsigned char *content, int contentLen, unsigned char *key, int keyLen, unsigned char *buf) HmacGeneratePwd() argument
H A Dcoap_service.c33 unsigned char buf[3]; in HelloHandler() local
43 coap_encode_var_safe(buf, 3, COAP_MEDIATYPE_TEXT_PLAIN), buf); /* 3个字节长度 */ in HelloHandler()
H A Diot_hmac.h31 * @param buf: used to storage the hmac code
32 * @param buf_len:the buf length
36 unsigned char *buf);
/vendor/hisilicon/hispark_pegasus/demo/iottencent_demo/
H A Diot_main.c88 char *buf; in MsgRcvCallBack() local
96 buf = hi_malloc(0, bufSize); in MsgRcvCallBack()
97 if (buf != NULL) { in MsgRcvCallBack()
98 msg = (IoTMsg_t *)buf; in MsgRcvCallBack()
99 buf += sizeof(IoTMsg_t); in MsgRcvCallBack()
103 (void)memcpy_s(buf, bufSize, topic, topiLen); in MsgRcvCallBack()
104 buf[topiLen] = '\0'; in MsgRcvCallBack()
105 msg->topic = buf; in MsgRcvCallBack()
106 buf += topiLen + 1; in MsgRcvCallBack()
108 (void)memcpy_s(buf, bufSiz in MsgRcvCallBack()
286 char *buf; IotSendMsg() local
[all...]
H A Diot_hmac.c59 int keyLen, unsigned char *buf) in HmacGeneratePwd()
66 if ((key == NULL)||(content == NULL)||(buf == NULL)|| in HmacGeneratePwd()
89 ret = byte2hexstr(hash, CN_HMAC256_LEN, (char *)buf); in HmacGeneratePwd()
58 HmacGeneratePwd(const unsigned char *content, int contentLen, const unsigned char *key, int keyLen, unsigned char *buf) HmacGeneratePwd() argument
H A Diot_hmac.h26 * @param buf: used to storage the hmac code
27 * @param buf_len:the buf length
31 int keyLen, unsigned char *buf);
/vendor/hisilicon/hispark_pegasus/demo/mqtt_demo/
H A Diot_main.c88 char *buf; in MsgRcvCallBack() local
96 buf = hi_malloc(0, bufSize); in MsgRcvCallBack()
97 if (buf != NULL) { in MsgRcvCallBack()
98 msg = (IoTMsg_t *)buf; in MsgRcvCallBack()
99 buf += sizeof(IoTMsg_t); in MsgRcvCallBack()
103 (void)memcpy_s(buf, bufSize, topic, topiLen); in MsgRcvCallBack()
104 buf[topiLen] = '\0'; in MsgRcvCallBack()
105 msg->topic = buf; in MsgRcvCallBack()
106 buf += topiLen + 1; in MsgRcvCallBack()
108 (void)memcpy_s(buf, bufSiz in MsgRcvCallBack()
286 char *buf; IotSendMsg() local
[all...]
H A Diot_hmac.c59 int keyLen, unsigned char *buf) in HmacGeneratePwd()
66 if ((key == NULL)||(content == NULL)||(buf == NULL)|| in HmacGeneratePwd()
89 ret = byte2hexstr(hash, CN_HMAC256_LEN, (char *)buf); in HmacGeneratePwd()
58 HmacGeneratePwd(const unsigned char *content, int contentLen, const unsigned char *key, int keyLen, unsigned char *buf) HmacGeneratePwd() argument
H A Diot_hmac.h26 * @param buf: used to storage the hmac code
27 * @param buf_len:the buf length
31 int keyLen, unsigned char *buf);
/vendor/hisilicon/hispark_pegasus/demo/oc_demo/
H A Diot_main.c88 char *buf; in MsgRcvCallBack() local
96 buf = hi_malloc(0, bufSize); in MsgRcvCallBack()
97 if (buf != NULL) { in MsgRcvCallBack()
98 msg = (IoTMsgT *)buf; in MsgRcvCallBack()
99 buf += sizeof(IoTMsgT); in MsgRcvCallBack()
103 (void)memcpy_s(buf, bufSize, topic, topicLength); in MsgRcvCallBack()
104 buf[topicLength] = '\0'; in MsgRcvCallBack()
105 msg->topic = buf; in MsgRcvCallBack()
106 buf += topicLength + 1; in MsgRcvCallBack()
108 (void)memcpy_s(buf, bufSiz in MsgRcvCallBack()
307 char *buf; IotSendMsg() local
[all...]
H A Diot_hmac.c62 unsigned char *buf) in HmacGeneratePwd()
68 if (key == NULL || content == NULL || buf == NULL || keyLen == 0 || contentLen == 0 || in HmacGeneratePwd()
90 Byte2HexStr(hash, CN_HMAC256_LEN, (char *)buf); in HmacGeneratePwd()
61 HmacGeneratePwd(unsigned char *content, int contentLen, unsigned char *key, int keyLen, unsigned char *buf) HmacGeneratePwd() argument
H A Diot_hmac.h31 * @param buf: used to storage the hmac code
32 * @param buf_len:the buf length
36 unsigned char *buf)
/vendor/hisilicon/hispark_pegasus/hals/utils/token/
H A Dhal_token.c128 char *buf = hi_malloc(MALLOC_PARA, buffLen); in ReadTokenWithFlag() local
129 if (buf == NULL) { in ReadTokenWithFlag()
133 (void)memset_s(buf, buffLen, 0, buffLen); in ReadTokenWithFlag()
134 if (FlashReadTokenRawData(start, buf, buffLen) != 0) { in ReadTokenWithFlag()
136 hi_free(MALLOC_PARA, buf); in ReadTokenWithFlag()
143 if (buf[i] != g_tokenMagicNum[i]) { in ReadTokenWithFlag()
151 hi_free(MALLOC_PARA, buf); in ReadTokenWithFlag()
154 if (memcpy_s(result, TOKEN_WITH_FLAG_SIZE, buf + TOKEN_MAGIC_NUM_SIZE, TOKEN_WITH_FLAG_SIZE) != 0) { in ReadTokenWithFlag()
157 hi_free(MALLOC_PARA, buf); in ReadTokenWithFlag()
165 char buf[buffLe in WriteTokenWithFlag() local
[all...]
/vendor/hisilicon/hispark_taurus/hals/utils/token/
H A Dhal_token.c213 char *buf = malloc(buffLen); in ReadTokenWithFlag() local
214 if (buf == NULL) { in ReadTokenWithFlag()
218 (void)memset_s(buf, buffLen, 0, buffLen); in ReadTokenWithFlag()
220 if (ReadTokenRawData(path, fileName, buf, buffLen) != 0) { in ReadTokenWithFlag()
221 free(buf); in ReadTokenWithFlag()
227 if (buf[i] != g_tokenMagicNum[i]) { in ReadTokenWithFlag()
233 free(buf); in ReadTokenWithFlag()
236 if (memcpy_s(TokenWithFlag, TOKEN_WITH_FLAG_SIZE, buf + TOKEN_MAGIC_NUM_SIZE, TOKEN_WITH_FLAG_SIZE) != 0) { in ReadTokenWithFlag()
239 free(buf); in ReadTokenWithFlag()
246 char buf[buffLe in WriteTokenWithFlag() local
[all...]
/vendor/hisilicon/hispark_taurus_linux/hals/utils/token/
H A Dhal_token.c213 char *buf = malloc(buffLen); in ReadTokenWithFlag() local
214 if (buf == NULL) { in ReadTokenWithFlag()
218 (void)memset_s(buf, buffLen, 0, buffLen); in ReadTokenWithFlag()
220 if (ReadTokenRawData(path, fileName, buf, buffLen) != 0) { in ReadTokenWithFlag()
221 free(buf); in ReadTokenWithFlag()
227 if (buf[i] != g_tokenMagicNum[i]) { in ReadTokenWithFlag()
233 free(buf); in ReadTokenWithFlag()
236 if (memcpy_s(TokenWithFlag, TOKEN_WITH_FLAG_SIZE, buf + TOKEN_MAGIC_NUM_SIZE, TOKEN_WITH_FLAG_SIZE) != 0) { in ReadTokenWithFlag()
239 free(buf); in ReadTokenWithFlag()
246 char buf[buffLe in WriteTokenWithFlag() local
[all...]
/vendor/hisilicon/hispark_taurus_mini_system/hals/utils/token/
H A Dhal_token.c213 char *buf = malloc(buffLen); in ReadTokenWithFlag() local
214 if (buf == NULL) { in ReadTokenWithFlag()
218 (void)memset_s(buf, buffLen, 0, buffLen); in ReadTokenWithFlag()
220 if (ReadTokenRawData(path, fileName, buf, buffLen) != 0) { in ReadTokenWithFlag()
221 free(buf); in ReadTokenWithFlag()
227 if (buf[i] != g_tokenMagicNum[i]) { in ReadTokenWithFlag()
233 free(buf); in ReadTokenWithFlag()
236 if (memcpy_s(TokenWithFlag, TOKEN_WITH_FLAG_SIZE, buf + TOKEN_MAGIC_NUM_SIZE, TOKEN_WITH_FLAG_SIZE) != 0) { in ReadTokenWithFlag()
239 free(buf); in ReadTokenWithFlag()
246 char buf[buffLe in WriteTokenWithFlag() local
[all...]
/vendor/hihope/dayu210/bluetooth/src/
H A Dupio.c140 char buf[16]; in init_rfkill() local
155 int sz = read(fd, &buf, sizeof(buf)); in init_rfkill()
158 if (sz >= (int)strlen("bluetooth") && memcmp(buf, "bluetooth", strlen("bluetooth")) == 0) { in init_rfkill()
/vendor/hihope/rk3568/bluetooth/src/
H A Dupio.c140 char buf[16]; in init_rfkill() local
155 sz = read(fd, &buf, sizeof(buf)); in init_rfkill()
158 if (sz >= (int)strlen("bluetooth") && memcmp(buf, "bluetooth", strlen("bluetooth")) == 0) { in init_rfkill()
/vendor/hisilicon/hispark_aries/hals/security/permission_lite/
H A Dhal_pms.c200 struct stat buf; in HalIsValidPath() local
201 stat(path, &buf); in HalIsValidPath()
202 if (S_IFDIR & buf.st_mode) { in HalIsValidPath()
/vendor/hisilicon/hispark_taurus/hals/security/permission_lite/
H A Dhal_pms.c200 struct stat buf; in HalIsValidPath() local
201 stat(path, &buf); in HalIsValidPath()
202 if (S_IFDIR & buf.st_mode) { in HalIsValidPath()
/vendor/hisilicon/hispark_taurus_linux/hals/security/permission_lite/
H A Dhal_pms.c200 struct stat buf; in HalIsValidPath() local
201 stat(path, &buf); in HalIsValidPath()
202 if (S_IFDIR & buf.st_mode) { in HalIsValidPath()
/vendor/hisilicon/hispark_taurus_mini_system/hals/security/permission_lite/
H A Dhal_pms.c200 struct stat buf; in HalIsValidPath() local
201 stat(path, &buf); in HalIsValidPath()
202 if (S_IFDIR & buf.st_mode) { in HalIsValidPath()
/vendor/ohemu/qemu_small_system_demo/hals/security/permission_lite/
H A Dhal_pms.c202 struct stat buf; in HalIsValidPath() local
203 stat(path, &buf); in HalIsValidPath()
204 if (S_IFDIR & buf.st_mode) { in HalIsValidPath()
/vendor/hihope/dayu210/bluetooth/include/
H A Dbt_vendor_lib.h104 * @param (void *)buf, struct of HC_BT_HDR.
115 * call the callback to malloc a size of buf.
120 * call the callback to free buf
122 typedef void (*free_callback)(void* buf);

Completed in 12 milliseconds

12