/nrf52832-nimble/packages/NimBLE-latest/nimble/host/src/ |
H A D | ble_att_cmd.c | 85 ble_att_init_parse(uint8_t op, const void *payload, in ble_att_init_parse() argument 92 u8ptr = payload; in ble_att_init_parse() 99 ble_att_init_write(uint8_t op, void *payload, int min_len, int actual_len) in ble_att_init_write() argument 105 u8ptr = payload; in ble_att_init_write() 112 ble_att_error_rsp_parse(const void *payload, int len, in ble_att_error_rsp_parse() argument 117 src = ble_att_init_parse(BLE_ATT_OP_ERROR_RSP, payload, in ble_att_error_rsp_parse() 126 ble_att_error_rsp_write(void *payload, int len, in ble_att_error_rsp_write() argument 131 dst = ble_att_init_write(BLE_ATT_OP_ERROR_RSP, payload, in ble_att_error_rsp_write() 147 ble_att_mtu_req_parse(const void *payload, int len, in ble_att_mtu_req_parse() argument 152 src = ble_att_init_parse(BLE_ATT_OP_MTU_REQ, payload, BLE_ATT_MTU_CMD_SZ, in ble_att_mtu_req_parse() [all …]
|
H A D | ble_att_cmd_priv.h | 356 void ble_att_error_rsp_parse(const void *payload, int len, 358 void ble_att_error_rsp_write(void *payload, int len, 361 void ble_att_mtu_req_parse(const void *payload, int len, 363 void ble_att_mtu_req_write(void *payload, int len, 365 void ble_att_mtu_rsp_parse(const void *payload, int len, 367 void ble_att_mtu_rsp_write(void *payload, int len, 370 void ble_att_find_info_req_parse(const void *payload, int len, 372 void ble_att_find_info_req_write(void *payload, int len, 375 void ble_att_find_info_rsp_parse(const void *payload, int len, 377 void ble_att_find_info_rsp_write(void *payload, int len, [all …]
|
/nrf52832-nimble/rt-thread/components/net/lwip-2.1.0/src/core/ |
H A D | pbuf.c | 179 pbuf_init_alloced_pbuf(struct pbuf *p, void *payload, u16_t tot_len, u16_t len, pbuf_type type, u8_… in pbuf_init_alloced_pbuf() argument 182 p->payload = payload; in pbuf_init_alloced_pbuf() 200 * @param length size of the pbuf's payload 256 LWIP_ASSERT("pbuf_alloc: pbuf q->payload properly aligned", in pbuf_alloc() 257 ((mem_ptr_t)q->payload % MEM_ALIGNMENT) == 0); in pbuf_alloc() 290 LWIP_ASSERT("pbuf_alloc: pbuf->payload properly aligned", in pbuf_alloc() 291 ((mem_ptr_t)p->payload % MEM_ALIGNMENT) == 0); in pbuf_alloc() 311 * @param payload referenced payload 312 * @param length size of the pbuf's payload 327 pbuf_alloc_reference(void *payload, u16_t length, pbuf_type type) in pbuf_alloc_reference() argument [all …]
|
/nrf52832-nimble/rt-thread/components/net/lwip-2.0.2/src/core/ |
H A D | pbuf.c | 224 * @param length size of the pbuf's payload 294 /* make the payload pointer point 'offset' bytes into pbuf data memory */ in pbuf_alloc() 295 p->payload = LWIP_MEM_ALIGN((void *)((u8_t *)p + (SIZEOF_STRUCT_PBUF + offset))); in pbuf_alloc() 296 LWIP_ASSERT("pbuf_alloc: pbuf p->payload properly aligned", in pbuf_alloc() 297 ((mem_ptr_t)p->payload % MEM_ALIGNMENT) == 0); in pbuf_alloc() 302 LWIP_ASSERT("check p->payload + p->len does not overflow pbuf", in pbuf_alloc() 303 ((u8_t*)p->payload + p->len <= in pbuf_alloc() 336 q->payload = (void *)((u8_t *)q + SIZEOF_STRUCT_PBUF); in pbuf_alloc() 337 LWIP_ASSERT("pbuf_alloc: pbuf q->payload properly aligned", in pbuf_alloc() 338 ((mem_ptr_t)q->payload % MEM_ALIGNMENT) == 0); in pbuf_alloc() [all …]
|
/nrf52832-nimble/rt-thread/components/net/lwip-1.4.1/src/core/ |
H A D | pbuf.c | 183 * @param length size of the pbuf's payload 248 /* make the payload pointer point 'offset' bytes into pbuf data memory */ in pbuf_alloc() 249 p->payload = LWIP_MEM_ALIGN((void *)((u8_t *)p + (SIZEOF_STRUCT_PBUF + offset))); in pbuf_alloc() 250 LWIP_ASSERT("pbuf_alloc: pbuf p->payload properly aligned", in pbuf_alloc() 251 ((mem_ptr_t)p->payload % MEM_ALIGNMENT) == 0); in pbuf_alloc() 256 LWIP_ASSERT("check p->payload + p->len does not overflow pbuf", in pbuf_alloc() 257 ((u8_t*)p->payload + p->len <= in pbuf_alloc() 290 q->payload = (void *)((u8_t *)q + SIZEOF_STRUCT_PBUF); in pbuf_alloc() 291 LWIP_ASSERT("pbuf_alloc: pbuf q->payload properly aligned", in pbuf_alloc() 292 ((mem_ptr_t)q->payload % MEM_ALIGNMENT) == 0); in pbuf_alloc() [all …]
|
/nrf52832-nimble/rt-thread/components/net/lwip-1.4.1/src/core/ipv4/ |
H A D | icmp.c | 73 * @param p the icmp echo request packet, p->payload pointing to the ip header 91 iphdr = (struct ip_hdr *)p->payload; in icmp_input() 98 type = *((u8_t *)p->payload); in icmp_input() 100 code = *(((u8_t *)p->payload)+1); in icmp_input() 150 /* switch p->payload to ip header */ in icmp_input() 152 LWIP_ASSERT("icmp_input: moving p->payload to ip header failed\n", 0); in icmp_input() 168 iphdr = (struct ip_hdr *)r->payload; in icmp_input() 169 /* switch r->payload back to icmp header */ in icmp_input() 171 LWIP_ASSERT("icmp_input: restoring original p->payload failed\n", 0); in icmp_input() 179 /* restore p->payload to point to icmp header */ in icmp_input() [all …]
|
H A D | ip_frag.c | 172 iprh = (struct ip_reass_helper *)ipr->p->payload; in ip_reass_free_complete_datagram() 179 SMEMCPY(p->payload, &ipr->iphdr, IP_HLEN); in ip_reass_free_complete_datagram() 193 iprh = (struct ip_reass_helper *)p->payload; in ip_reass_free_complete_datagram() 340 fraghdr = (struct ip_hdr*)new_p->payload; in ip_reass_chain_frag_into_datagram_and_validate() 349 iprh = (struct ip_reass_helper*)new_p->payload; in ip_reass_chain_frag_into_datagram_and_validate() 357 iprh_tmp = (struct ip_reass_helper*)q->payload; in ip_reass_chain_frag_into_datagram_and_validate() 426 if (((struct ip_reass_helper*)ipr->p->payload)->start != 0) { in ip_reass_chain_frag_into_datagram_and_validate() 433 iprh = (struct ip_reass_helper*)q->payload; in ip_reass_chain_frag_into_datagram_and_validate() 446 ((struct ip_reass_helper*)ipr->p->payload) != iprh); in ip_reass_chain_frag_into_datagram_and_validate() 489 fraghdr = (struct ip_hdr*)p->payload; in ip_reass() [all …]
|
/nrf52832-nimble/packages/NimBLE-latest/ext/tinycrypt/include/tinycrypt/ |
H A D | ccm_mode.h | 42 * 1) Both non-empty payload and associated data (it encrypts and 43 * authenticates the payload and also authenticates the associated 45 * 2) Non-empty payload and empty associated data (it encrypts and 46 * authenticates the payload); 47 * 3) Non-empty associated data and empty payload (it degenerates to 120 * ((plen > 0) and (payload == NULL)) or 130 * @param payload IN -- payload 131 * @param plen IN -- payload length in bytes 158 unsigned int alen, const uint8_t *payload, 167 * ((plen > 0) and (payload == NULL)) or [all …]
|
/nrf52832-nimble/rt-thread/components/net/lwip-2.1.0/src/apps/tftp/ |
H A D | tftp_server.c | 122 u16_t *payload; in send_error() local 129 payload = (u16_t *) p->payload; in send_error() 130 payload[0] = PP_HTONS(TFTP_ERROR); in send_error() 131 payload[1] = lwip_htons(code); in send_error() 132 MEMCPY(&payload[2], str, str_length + 1); in send_error() 142 u16_t *payload; in send_ack() local 148 payload = (u16_t *) p->payload; in send_ack() 150 payload[0] = PP_HTONS(TFTP_ACK); in send_ack() 151 payload[1] = lwip_htons(blknum); in send_ack() 176 u16_t *payload; in send_data() local [all …]
|
/nrf52832-nimble/rt-thread/components/net/lwip-2.0.2/src/apps/tftp/ |
H A D | tftp_server.c | 122 u16_t* payload; in send_error() local 129 payload = (u16_t*) p->payload; in send_error() 130 payload[0] = PP_HTONS(TFTP_ERROR); in send_error() 131 payload[1] = lwip_htons(code); in send_error() 132 MEMCPY(&payload[2], str, str_length + 1); in send_error() 142 u16_t* payload; in send_ack() local 148 payload = (u16_t*) p->payload; in send_ack() 150 payload[0] = PP_HTONS(TFTP_ACK); in send_ack() 151 payload[1] = lwip_htons(blknum); in send_ack() 176 u16_t *payload; in send_data() local [all …]
|
/nrf52832-nimble/rt-thread/components/net/lwip-1.4.1/src/core/ipv6/ |
H A D | icmp6.c | 56 /* TODO: check length before accessing payload! */ in icmp_input() 58 type = ((u8_t *)p->payload)[0]; in icmp_input() 71 iecho = p->payload; in icmp_input() 72 iphdr = (struct ip_hdr *)((u8_t *)p->payload - IP_HLEN); in icmp_input() 123 iphdr = p->payload; in icmp_dest_unreach() 125 idur = q->payload; in icmp_dest_unreach() 129 SMEMCPY((u8_t *)q->payload + 8, p->payload, IP_HLEN + 8); in icmp_dest_unreach() 161 iphdr = p->payload; in icmp_time_exceeded() 163 tehdr = q->payload; in icmp_time_exceeded() 168 SMEMCPY((u8_t *)q->payload + 8, (u8_t *)p->payload, IP_HLEN + 8); in icmp_time_exceeded()
|
/nrf52832-nimble/rt-thread/components/net/lwip-2.0.2/src/core/ipv6/ |
H A D | icmp6.c | 77 * @param p the mld packet, p->payload pointing to the icmpv6 header 89 /* Check that ICMPv6 header fits in payload */ in icmp6_input() 98 icmp6hdr = (struct icmp6_hdr *)p->payload; in icmp6_input() 183 ((struct icmp6_echo_hdr *)(r->payload))->type = ICMP6_TYPE_EREP; in icmp6_input() 184 ((struct icmp6_echo_hdr *)(r->payload))->chksum = 0; in icmp6_input() 187 ((struct icmp6_echo_hdr *)(r->payload))->chksum = ip6_chksum_pseudo(r, in icmp6_input() 213 * p->payload pointing to the IPv6 header 226 * p->payload pointing to the IPv6 header 239 * p->payload pointing to the IPv6 header 252 * p->payload pointing to the IP header [all …]
|
H A D | ip6_frag.c | 155 iprh = (struct ip6_reass_helper *)ipr->p->payload; in ip6_reass_free_complete_datagram() 163 if (pbuf_header_force(p, (s16_t)((u8_t*)p->payload - (u8_t*)IPV6_FRAG_HDRREF(ipr->iphdr)))) { in ip6_reass_free_complete_datagram() 164 LWIP_ASSERT("ip6_reass_free: moving p->payload to ip6 header failed\n", 0); in ip6_reass_free_complete_datagram() 181 iprh = (struct ip6_reass_helper *)p->payload; in ip6_reass_free_complete_datagram() 271 if ((const void*)ip6_current_header() != ((u8_t*)p->payload) - IP6_HLEN) { in ip6_reass() 278 frag_hdr = (struct ip6_frag_hdr *) p->payload; in ip6_reass() 284 /* Calculate fragment length from IPv6 payload length. in ip6_reass() 288 len -= (u16_t)(((u8_t*)p->payload - (const u8_t*)ip6_current_header()) - IP6_HLEN); in ip6_reass() 389 iprh = (struct ip6_reass_helper *)p->payload; in ip6_reass() 398 iprh_tmp = (struct ip6_reass_helper*)q->payload; in ip6_reass() [all …]
|
H A D | ip6.c | 284 * @param p the packet to forward (p->payload points to IP header) 385 * @param p the received IPv6 packet (p->payload points to IPv6 header) 406 ip6hdr = (struct ip6_hdr *)p->payload; in ip6_input() 579 /* Move to payload. */ in ip6_input() 589 nexth = *((u8_t *)p->payload); in ip6_input() 592 hlen = 8 * (1 + *((u8_t *)p->payload + 1)); in ip6_input() 612 nexth = *((u8_t *)p->payload); in ip6_input() 615 hlen = 8 * (1 + *((u8_t *)p->payload + 1)); in ip6_input() 635 nexth = *((u8_t *)p->payload); in ip6_input() 638 hlen = 8 * (1 + *((u8_t *)p->payload + 1)); in ip6_input() [all …]
|
/nrf52832-nimble/rt-thread/components/net/lwip-2.1.0/src/core/ipv6/ |
H A D | ip6_frag.c | 157 iprh = (struct ip6_reass_helper *)ipr->p->payload; in ip6_reass_free_complete_datagram() 165 MEMCPY(p->payload, ipr->orig_hdr, sizeof(iprh)); in ip6_reass_free_complete_datagram() 168 if (pbuf_header_force(p, (s16_t)((u8_t*)p->payload - (u8_t*)ipr->iphdr))) { in ip6_reass_free_complete_datagram() 169 LWIP_ASSERT("ip6_reass_free: moving p->payload to ip6 header failed\n", 0); in ip6_reass_free_complete_datagram() 194 iprh = (struct ip6_reass_helper *)p->payload; in ip6_reass_free_complete_datagram() 289 frag_hdr = (struct ip6_frag_hdr *) p->payload; in ip6_reass() 295 /* Calculate fragment length from IPv6 payload length. in ip6_reass() 299 hdrdiff = (u8_t*)p->payload - (const u8_t*)ip6_current_header(); in ip6_reass() 426 iprh = (struct ip6_reass_helper *)p->payload; in ip6_reass() 434 iprh_tmp = (struct ip6_reass_helper*)q->payload; in ip6_reass() [all …]
|
H A D | icmp6.c | 79 * @param p the mld packet, p->payload pointing to the icmpv6 header 91 /* Check that ICMPv6 header fits in payload */ in icmp6_input() 100 icmp6hdr = (struct icmp6_hdr *)p->payload; in icmp6_input() 183 ((struct icmp6_echo_hdr *)(r->payload))->type = ICMP6_TYPE_EREP; in icmp6_input() 184 ((struct icmp6_echo_hdr *)(r->payload))->chksum = 0; in icmp6_input() 187 ((struct icmp6_echo_hdr *)(r->payload))->chksum = ip6_chksum_pseudo(r, in icmp6_input() 216 * p->payload pointing to the IPv6 header 232 * p->payload pointing to the IPv6 header 248 * p->payload pointing to the IPv6 header 266 * p->payload pointing to the IPv6 header [all …]
|
/nrf52832-nimble/rt-thread/components/net/lwip-2.0.2/src/core/ipv4/ |
H A D | icmp.c | 76 * @param p the icmp echo request packet, p->payload pointing to the icmp header 105 type = *((u8_t *)p->payload); in icmp_input() 107 code = *(((u8_t *)p->payload)+1); in icmp_input() 172 MEMCPY(r->payload, iphdr_in, hlen); in icmp_input() 173 /* switch r->payload back to icmp header (cannot fail) */ in icmp_input() 175 LWIP_ASSERT("icmp_input: moving r->payload to icmp header failed\n", 0); in icmp_input() 190 /* restore p->payload to point to icmp header (cannot fail) */ in icmp_input() 192 LWIP_ASSERT("icmp_input: restoring original p->payload failed\n", 0); in icmp_input() 200 iecho = (struct icmp_echo_hdr *)p->payload; in icmp_input() 205 struct ip_hdr *iphdr = (struct ip_hdr*)p->payload; in icmp_input() [all …]
|
/nrf52832-nimble/rt-thread/components/net/lwip-2.1.0/src/core/ipv4/ |
H A D | icmp.c | 76 * @param p the icmp echo request packet, p->payload pointing to the icmp header 105 type = *((u8_t *)p->payload); in icmp_input() 107 code = *(((u8_t *)p->payload) + 1); in icmp_input() 179 MEMCPY(r->payload, iphdr_in, hlen); in icmp_input() 180 /* switch r->payload back to icmp header (cannot fail) */ in icmp_input() 182 LWIP_ASSERT("icmp_input: moving r->payload to icmp header failed\n", 0); in icmp_input() 197 /* restore p->payload to point to icmp header (cannot fail) */ in icmp_input() 199 LWIP_ASSERT("icmp_input: restoring original p->payload failed\n", 0); in icmp_input() 207 iecho = (struct icmp_echo_hdr *)p->payload; in icmp_input() 212 struct ip_hdr *iphdr = (struct ip_hdr *)p->payload; in icmp_input() [all …]
|
/nrf52832-nimble/rt-thread/components/net/lwip-2.0.2/src/netif/ |
H A D | lowpan6.c | 231 buffer = (u8_t*)p_frag->payload; in lowpan6_frag() 264 ip6hdr = (struct ip6_hdr *)p->payload; in lowpan6_frag() 356 MEMCPY(buffer + ieee_header_len + lowpan6_header_len, (u8_t*)p->payload + 16, 8); in lowpan6_frag() 359 MEMCPY(buffer + ieee_header_len + lowpan6_header_len, (u8_t*)p->payload + 22, 2); in lowpan6_frag() 367 MEMCPY(buffer + ieee_header_len + lowpan6_header_len, (u8_t*)p->payload + 8, 16); in lowpan6_frag() 380 MEMCPY(buffer + ieee_header_len + lowpan6_header_len, (u8_t*)p->payload + 24, 16); in lowpan6_frag() 383 buffer[ieee_header_len + lowpan6_header_len++] = ((u8_t *)p->payload)[25]; in lowpan6_frag() 384 MEMCPY(buffer + ieee_header_len + lowpan6_header_len, (u8_t*)p->payload + 35, 5); in lowpan6_frag() 387 buffer[ieee_header_len + lowpan6_header_len++] = ((u8_t *)p->payload)[25]; in lowpan6_frag() 388 MEMCPY(buffer + ieee_header_len + lowpan6_header_len, (u8_t*)p->payload + 37, 3); in lowpan6_frag() [all …]
|
/nrf52832-nimble/rt-thread/components/net/lwip-2.1.0/src/include/lwip/ |
H A D | pbuf.h | 117 /** Indicates that the payload directly follows the struct pbuf. 130 /** Indicates the application needs the pbuf payload to be in one piece */ 146 /** pbuf data is stored in RAM, used for TX mostly, struct pbuf and its payload 147 are allocated in one piece of contiguous memory (so the first payload byte 153 /** pbuf data is stored in ROM, i.e. struct pbuf and its payload are located in 154 totally different memory areas. Since it points to ROM, payload does not 157 /** pbuf comes from the pbuf pool. Much like PBUF_ROM but payload might change 161 /** pbuf payload refers to RAM. This one comes from a pool and should be used 162 for RX. Payload can be chained (scatter-gather RX) but like PBUF_RAM, struct 163 pbuf and its payload are allocated in one piece of contiguous memory (so [all …]
|
/nrf52832-nimble/packages/NimBLE-latest/ext/tinycrypt/src/ |
H A D | ccm_mode.c | 139 unsigned int alen, const uint8_t *payload, in tc_ccm_generation_encryption() argument 146 ((plen > 0) && (payload == (uint8_t *) 0)) || in tc_ccm_generation_encryption() 149 (plen >= TC_CCM_PAYLOAD_MAX_BYTES) || /* payload size unsupported */ in tc_ccm_generation_encryption() 174 ccm_cbc_mac(tag, payload, plen, 0, c->sched); in tc_ccm_generation_encryption() 183 /* encrypting payload using ctr mode: */ in tc_ccm_generation_encryption() 184 ccm_ctr_mode(out, plen, payload, plen, b, c->sched); in tc_ccm_generation_encryption() 200 unsigned int alen, const uint8_t *payload, in tc_ccm_decryption_verification() argument 207 ((plen > 0) && (payload == (uint8_t *) 0)) || in tc_ccm_decryption_verification() 210 (plen >= TC_CCM_PAYLOAD_MAX_BYTES) || /* payload size unsupported */ in tc_ccm_decryption_verification() 228 /* decrypting payload using ctr mode: */ in tc_ccm_decryption_verification() [all …]
|
/nrf52832-nimble/rt-thread/components/net/lwip-2.0.2/src/include/lwip/ |
H A D | pbuf.h | 102 /** pbuf data is stored in RAM, used for TX mostly, struct pbuf and its payload 103 are allocated in one piece of contiguous memory (so the first payload byte 109 /** pbuf data is stored in ROM, i.e. struct pbuf and its payload are located in 110 totally different memory areas. Since it points to ROM, payload does not 113 /** pbuf comes from the pbuf pool. Much like PBUF_ROM but payload might change 117 /** pbuf payload refers to RAM. This one comes from a pool and should be used 118 for RX. Payload can be chained (scatter-gather RX) but like PBUF_RAM, struct 119 pbuf and its payload are allocated in one piece of contiguous memory (so 120 the first payload byte can be calculated from struct pbuf). 147 void *payload; member [all …]
|
/nrf52832-nimble/rt-thread/components/net/lwip-1.4.1/src/core/snmp/ |
H A D | asn1_enc.c | 193 msg_ptr = (u8_t*)p->payload; in snmp_asn1_enc_type() 225 msg_ptr = (u8_t*)p->payload; in snmp_asn1_enc_length() 242 msg_ptr = (u8_t*)p->payload; in snmp_asn1_enc_length() 268 msg_ptr = (u8_t*)p->payload; in snmp_asn1_enc_length() 320 msg_ptr = (u8_t*)p->payload; in snmp_asn1_enc_u32t() 334 msg_ptr = (u8_t*)p->payload; in snmp_asn1_enc_u32t() 353 msg_ptr = (u8_t*)p->payload; in snmp_asn1_enc_u32t() 396 msg_ptr = (u8_t*)p->payload; in snmp_asn1_enc_s32t() 409 msg_ptr = (u8_t*)p->payload; in snmp_asn1_enc_s32t() 450 msg_ptr = (u8_t*)p->payload; in snmp_asn1_enc_oid() [all …]
|
H A D | asn1_dec.c | 64 msg_ptr = (u8_t*)p->payload; in snmp_asn1_dec_type() 97 msg_ptr = (u8_t*)p->payload; in snmp_asn1_dec_length() 128 msg_ptr = (u8_t*)p->payload; in snmp_asn1_dec_length() 163 msg_ptr = (u8_t*)p->payload; in snmp_asn1_dec_length() 189 msg_ptr = (u8_t*)p->payload; in snmp_asn1_dec_length() 252 msg_ptr = (u8_t*)p->payload; in snmp_asn1_dec_u32t() 276 msg_ptr = (u8_t*)p->payload; in snmp_asn1_dec_u32t() 298 msg_ptr = (u8_t*)p->payload; in snmp_asn1_dec_u32t() 352 msg_ptr = (u8_t*)p->payload; in snmp_asn1_dec_s32t() 389 msg_ptr = (u8_t*)p->payload; in snmp_asn1_dec_s32t() [all …]
|
/nrf52832-nimble/rt-thread/components/net/lwip-2.0.2/test/unit/core/ |
H A D | test_pbuf.c | 160 memset(p->payload, 0, p->len); in START_TEST() 161 memset(q->payload, 0, q->len); in START_TEST() 167 out = (u8_t*)p->payload; in START_TEST() 177 out = (u8_t*)p->payload; in START_TEST() 180 out = (u8_t*)q->payload; in START_TEST() 190 out = (u8_t*)p->payload; in START_TEST() 211 memset(p->payload, 0, p->len); in START_TEST() 212 memset(q->payload, 0, q->len); in START_TEST() 217 out = (u8_t*)q->payload; in START_TEST()
|