/Zephyr-Core-3.6.0/tests/subsys/modem/modem_ppp/src/ |
D | main.c | 304 size_t pkt_len; in ZTEST() local 316 pkt_len = net_pkt_get_len(pkt); in ZTEST() 319 zassert_true(pkt_len == sizeof(ppp_frame_unwrapped), "Received net pkt data len incorrect"); in ZTEST() 323 net_pkt_read(pkt, buffer, pkt_len); in ZTEST() 325 zassert_true(memcmp(buffer, ppp_frame_unwrapped, pkt_len) == 0, in ZTEST() 332 size_t pkt_len; in ZTEST() local 346 pkt_len = net_pkt_get_len(pkt); in ZTEST() 347 zassert_true(pkt_len == sizeof(ppp_frame_unwrapped), "Received net pkt data len incorrect"); in ZTEST() 351 net_pkt_read(pkt, buffer, pkt_len); in ZTEST() 352 zassert_true(memcmp(buffer, ppp_frame_unwrapped, pkt_len) == 0, in ZTEST() [all …]
|
/Zephyr-Core-3.6.0/subsys/debug/ |
D | gdbstub.c | 628 size_t data_len, pkt_len; in z_gdb_main_loop() local 633 ret = gdb_get_packet(buf, sizeof(buf), &pkt_len); in z_gdb_main_loop() 645 if (pkt_len == 0) { in z_gdb_main_loop() 700 pkt_len = gdb_mem_write(ptr, addr, data_len); in z_gdb_main_loop() 701 CHECK_ERROR(pkt_len == -1); in z_gdb_main_loop() 728 pkt_len = arch_gdb_reg_readall(ctx, buf, sizeof(buf)); in z_gdb_main_loop() 729 CHECK_ERROR(pkt_len == 0); in z_gdb_main_loop() 730 gdb_send_packet(buf, pkt_len); in z_gdb_main_loop() 738 pkt_len = arch_gdb_reg_writeall(ctx, ptr, pkt_len - 1); in z_gdb_main_loop() 739 CHECK_ERROR(pkt_len == 0); in z_gdb_main_loop() [all …]
|
/Zephyr-Core-3.6.0/subsys/mgmt/osdp/src/ |
D | osdp_phy.c | 262 int pd_addr, pkt_len; in osdp_phy_check_packet() local 292 pkt_len = (pkt->len_msb << 8) | pkt->len_lsb; in osdp_phy_check_packet() 293 if (len < pkt_len) { in osdp_phy_check_packet() 298 if (pkt_len > OSDP_PACKET_BUF_SIZE || in osdp_phy_check_packet() 299 (unsigned long)pkt_len < sizeof(struct osdp_packet_header)) { in osdp_phy_check_packet() 305 *one_pkt_len = pkt_len + (packet_has_mark(pd) ? 1 : 0); in osdp_phy_check_packet() 309 pkt_len -= 2; /* consume CRC */ in osdp_phy_check_packet() 310 cur = (buf[pkt_len + 1] << 8) | buf[pkt_len]; in osdp_phy_check_packet() 311 comp = osdp_compute_crc16(buf, pkt_len); in osdp_phy_check_packet() 319 pkt_len -= 1; /* consume checksum */ in osdp_phy_check_packet() [all …]
|
/Zephyr-Core-3.6.0/subsys/usb/device/class/ |
D | bluetooth.c | 243 static uint16_t pkt_len; in acl_read_cb() local 263 pkt_len = hci_pkt_get_len(buf, &data[1], size - 1); in acl_read_cb() 264 LOG_DBG("pkt_len %u, chunk %u", pkt_len, size); in acl_read_cb() 273 pkt_len = hci_pkt_get_len(buf, data, size); in acl_read_cb() 274 LOG_DBG("pkt_len %u, chunk %u", pkt_len, size); in acl_read_cb() 277 if (pkt_len == 0) { in acl_read_cb() 298 if (buf != NULL && pkt_len == buf->len) { in acl_read_cb() 302 pkt_len = 0; in acl_read_cb()
|
/Zephyr-Core-3.6.0/subsys/net/ip/ |
D | ipv6.c | 197 uint16_t pkt_len) in ipv6_handle_ext_hdr_options() argument 211 if (exthdr_len > pkt_len) { in ipv6_handle_ext_hdr_options() 213 "(max %d bytes)", exthdr_len, pkt_len); in ipv6_handle_ext_hdr_options() 467 int pkt_len; in net_ipv6_input() local 483 pkt_len = ntohs(hdr->len) + sizeof(struct net_ipv6_hdr); in net_ipv6_input() 484 if (real_len < pkt_len) { in net_ipv6_input() 486 pkt_len, real_len); in net_ipv6_input() 488 } else if (real_len > pkt_len) { in net_ipv6_input() 489 net_pkt_update_length(pkt, pkt_len); in net_ipv6_input() 492 NET_DBG("IPv6 packet len %d received from %s to %s", pkt_len, in net_ipv6_input() [all …]
|
D | ipv4.c | 247 int pkt_len; in net_ipv4_input() local 287 pkt_len = ntohs(hdr->len); in net_ipv4_input() 288 if (real_len < pkt_len) { in net_ipv4_input() 290 pkt_len, real_len); in net_ipv4_input() 292 } else if (real_len > pkt_len) { in net_ipv4_input() 293 net_pkt_update_length(pkt, pkt_len); in net_ipv4_input()
|
D | ipv4_fragment.c | 518 uint16_t pkt_len, uint16_t mtu) in net_ipv4_send_fragmented_pkt() argument 560 pkt_len -= net_pkt_ip_hdr_len(pkt); in net_ipv4_send_fragmented_pkt() 591 while (frag_offset < pkt_len) { in net_ipv4_send_fragmented_pkt() 594 if ((frag_offset + fit_len) >= pkt_len) { in net_ipv4_send_fragmented_pkt() 596 fit_len = (pkt_len - frag_offset); in net_ipv4_send_fragmented_pkt() 628 size_t pkt_len = net_pkt_get_len(pkt); in net_ipv4_prepare_for_send() local 632 if (pkt_len > mtu) { in net_ipv4_prepare_for_send() 633 ret = net_ipv4_send_fragmented_pkt(net_pkt_iface(pkt), pkt, pkt_len, mtu); in net_ipv4_prepare_for_send()
|
D | ipv6_mld.c | 323 uint16_t pkt_len; in handle_mld_query() local 347 pkt_len = sizeof(struct net_ipv6_hdr) + net_pkt_ipv6_ext_len(pkt) + in handle_mld_query() 352 if (length < pkt_len || pkt_len > NET_IPV6_MTU || in handle_mld_query()
|
D | net_core.c | 435 size_t pkt_len; in net_rx() local 437 pkt_len = net_pkt_get_len(pkt); in net_rx() 439 NET_DBG("Received pkt %p len %zu", pkt, pkt_len); in net_rx() 441 net_stats_update_bytes_recv(iface, pkt_len); in net_rx()
|
D | net_private.h | 196 uint16_t pkt_len, uint16_t mtu); 201 uint16_t pkt_len);
|
/Zephyr-Core-3.6.0/drivers/ieee802154/ |
D | ieee802154_cc1200.c | 403 uint8_t pkt_len) in verify_rxfifo_validity() argument 406 if (pkt_len < 3 || in verify_rxfifo_validity() 407 read_reg_num_rxbytes(dev) > (pkt_len + CC1200_FCS_LEN)) { in verify_rxfifo_validity() 457 uint8_t pkt_len; in cc1200_rx() local 469 pkt_len = get_packet_length(dev); in cc1200_rx() 470 if (!verify_rxfifo_validity(dev, pkt_len)) { in cc1200_rx() 475 pkt = net_pkt_rx_alloc_with_buffer(cc1200->iface, pkt_len, in cc1200_rx() 482 if (!read_rxfifo_content(dev, pkt->buffer, pkt_len)) { in cc1200_rx() 497 LOG_DBG("Caught a packet (%u)", pkt_len); in cc1200_rx()
|
D | ieee802154_rf2xx.c | 164 uint8_t pkt_len; in rf2xx_trx_rx() local 176 pkt_len = ctx->rx_phr; in rf2xx_trx_rx() 179 pkt_len = rx_buf[RX2XX_FRAME_PHR_INDEX]; in rf2xx_trx_rx() 182 if (!ctx->promiscuous && pkt_len < RX2XX_FRAME_MIN_PHR_SIZE) { in rf2xx_trx_rx() 187 frame_len = RX2XX_FRAME_HEADER_SIZE + pkt_len + in rf2xx_trx_rx() 193 trac = rx_buf[pkt_len + RX2XX_FRAME_TRAC_INDEX]; in rf2xx_trx_rx() 196 ctx->pkt_ed = rx_buf[pkt_len + RX2XX_FRAME_ED_INDEX]; in rf2xx_trx_rx() 204 ctx->pkt_lqi = rx_buf[pkt_len + RX2XX_FRAME_LQI_INDEX]; in rf2xx_trx_rx() 213 pkt_len >= RX2XX_FRAME_FCS_LENGTH) { in rf2xx_trx_rx() 214 pkt_len -= RX2XX_FRAME_FCS_LENGTH; in rf2xx_trx_rx() [all …]
|
D | ieee802154_kw41z.c | 501 uint8_t pkt_len, hw_lqi; in kw41z_rx() local 510 pkt_len = len; in kw41z_rx() 512 pkt_len = len - KW41Z_FCS_LENGTH; in kw41z_rx() 515 pkt = net_pkt_rx_alloc_with_buffer(kw41z->iface, pkt_len, in kw41z_rx() 526 for (uint16_t reg_val = 0, i = 0; i < pkt_len; i++) { in kw41z_rx() 536 for (uint32_t reg_val = 0, i = 0; i < pkt_len; i++) { in kw41z_rx() 554 net_buf_add(buf, pkt_len); in kw41z_rx()
|
D | ieee802154_cc2520.c | 585 uint8_t pkt_len) in verify_rxfifo_validity() argument 587 if (pkt_len < 2 || read_reg_rxfifocnt(dev) != pkt_len) { in verify_rxfifo_validity() 602 uint8_t pkt_len; in cc2520_rx() local 616 pkt_len = read_rxfifo_length(dev) & 0x7f; in cc2520_rx() 617 if (!verify_rxfifo_validity(dev, pkt_len)) { in cc2520_rx() 622 pkt = net_pkt_rx_alloc_with_buffer(cc2520->iface, pkt_len, in cc2520_rx() 630 pkt_len -= 2U; in cc2520_rx() 633 if (!read_rxfifo_content(dev, pkt->buffer, pkt_len)) { in cc2520_rx() 648 LOG_DBG("Caught a packet (%u)", pkt_len); in cc2520_rx()
|
D | ieee802154_nrf5.c | 140 uint8_t pkt_len; in nrf5_rx_thread() local 161 pkt_len = rx_frame->psdu[0]; in nrf5_rx_thread() 163 pkt_len = rx_frame->psdu[0] - IEEE802154_FCS_LENGTH; in nrf5_rx_thread() 167 __ASSERT_NO_MSG(pkt_len <= CONFIG_NET_BUF_DATA_SIZE); in nrf5_rx_thread() 178 pkt = net_pkt_rx_alloc_with_buffer(nrf5_radio->iface, pkt_len, in nrf5_rx_thread() 181 if (net_pkt_write(pkt, rx_frame->psdu + 1, pkt_len)) { in nrf5_rx_thread() 198 pkt_len, rx_frame->lqi); in nrf5_rx_thread()
|
/Zephyr-Core-3.6.0/include/zephyr/mgmt/mcumgr/transport/ |
D | serial.h | 35 uint16_t pkt_len; member
|
/Zephyr-Core-3.6.0/drivers/wifi/esp_at/ |
D | esp_offload.c | 198 int ret, write_len, pkt_len; in _sock_send() local 211 pkt_len = net_pkt_get_len(pkt); in _sock_send() 213 LOG_DBG("link %d, len %d", sock->link_id, pkt_len); in _sock_send() 217 "AT+CIPSEND=%d,%d", sock->link_id, pkt_len); in _sock_send() 228 sock->link_id, pkt_len, addr_str, in _sock_send() 255 while (frag && pkt_len) { in _sock_send() 256 write_len = MIN(pkt_len, frag->len); in _sock_send() 258 pkt_len -= write_len; in _sock_send()
|
/Zephyr-Core-3.6.0/subsys/mgmt/mcumgr/transport/src/ |
D | serial_util.c | 39 rx_ctxt->pkt_len = net_buf_pull_be16(rx_ctxt->nb); in mcumgr_serial_extract_len() 121 if (rx_ctxt->nb->len < rx_ctxt->pkt_len) { in mcumgr_serial_process_frag() 126 if (rx_ctxt->nb->len > rx_ctxt->pkt_len) { in mcumgr_serial_process_frag()
|
D | smp_dummy.c | 324 rx_ctxt->pkt_len = net_buf_pull_be16(rx_ctxt->nb); in mcumgr_dummy_extract_len() 406 if (rx_ctxt->nb->len < rx_ctxt->pkt_len) { in mcumgr_dummy_process_frag() 411 if (rx_ctxt->nb->len > rx_ctxt->pkt_len) { in mcumgr_dummy_process_frag() 491 if (tx_ctxt->nb->len < tx_ctxt->pkt_len) { in mcumgr_dummy_process_frag_outgoing() 496 if (tx_ctxt->nb->len > tx_ctxt->pkt_len) { in mcumgr_dummy_process_frag_outgoing()
|
/Zephyr-Core-3.6.0/tests/net/ipv4_fragment/src/ |
D | main.c | 204 uint16_t pkt_len; in check_ipv4_fragment_header() local 223 pkt_len = ntohs(hdr->len); in check_ipv4_fragment_header() 235 zassert_equal(net_pkt_get_len(pkt), pkt_len, "IPv4 header length mismatch"); in check_ipv4_fragment_header() 365 uint16_t pkt_len; in udp_data_received() local 395 pkt_len = ntohs(hdr->len); in udp_data_received() 402 zassert_equal(net_pkt_get_len(pkt), pkt_len, "IPv4 header length mismatch"); in udp_data_received() 442 uint16_t pkt_len; in tcp_data_received() local 476 pkt_len = ntohs(hdr->len); in tcp_data_received() 483 zassert_equal(net_pkt_get_len(pkt), pkt_len, "IPv4 header length mismatch"); in tcp_data_received()
|
/Zephyr-Core-3.6.0/drivers/ethernet/ |
D | eth_nxp_s32_netc.c | 150 size_t pkt_len = net_pkt_get_len(pkt); in nxp_s32_eth_tx() local 159 buf.length = (uint16_t)pkt_len; in nxp_s32_eth_tx() 172 buf.length = (uint16_t)pkt_len; in nxp_s32_eth_tx() 174 res = net_pkt_read(pkt, buf.data, pkt_len); in nxp_s32_eth_tx()
|
D | eth_adin2111.c | 412 size_t pkt_len = net_pkt_get_len(pkt); in adin2111_port_send() local 434 (pkt_len + ADIN2111_FRAME_HEADER_SIZE + ADIN2111_INTERNAL_HEADER_SIZE)) { in adin2111_port_send() 445 if ((pkt_len + ADIN2111_TX_FIFO_BUFFER_MARGIN) < 64) { in adin2111_port_send() 446 padded_size = pkt_len in adin2111_port_send() 447 + (64 - (pkt_len + ADIN2111_TX_FIFO_BUFFER_MARGIN)) in adin2111_port_send() 450 padded_size = pkt_len + ADIN2111_FRAME_HEADER_SIZE; in adin2111_port_send() 477 pkt_len); in adin2111_port_send() 508 eth_stats_update_bytes_tx(data->iface, pkt_len); in adin2111_port_send()
|
/Zephyr-Core-3.6.0/soc/arm/nuvoton_npcx/common/ |
D | soc_espi_taf.h | 141 uint8_t pkt_len; member
|
/Zephyr-Core-3.6.0/drivers/espi/ |
D | espi_taf_npcx.c | 302 taf_head.pkt_len = len + NPCX_TAF_CMP_HEADER_LEN; in espi_taf_npcx_flash_read() 353 taf_head.pkt_len = NPCX_TAF_CMP_HEADER_LEN; in espi_taf_npcx_flash_write() 388 taf_head.pkt_len = NPCX_TAF_CMP_HEADER_LEN; in espi_taf_npcx_flash_erase() 411 taf_head.pkt_len = NPCX_TAF_CMP_HEADER_LEN; in espi_taf_npcx_flash_unsuccess()
|
/Zephyr-Core-3.6.0/drivers/wifi/esp32/src/ |
D | esp_wifi_drv.c | 110 const int pkt_len = net_pkt_get_len(pkt); in esp32_wifi_send() local 115 if (net_pkt_read(pkt, data->frame_buf, pkt_len) < 0) { in esp32_wifi_send() 120 if (esp_wifi_internal_tx(ifx, (void *)data->frame_buf, pkt_len) != ESP_OK) { in esp32_wifi_send() 125 data->stats.bytes.sent += pkt_len; in esp32_wifi_send() 129 LOG_DBG("pkt sent %p len %d", pkt, pkt_len); in esp32_wifi_send()
|