/Zephyr-latest/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-latest/subsys/debug/gdbstub/ |
D | gdbstub.c | 660 size_t data_len, pkt_len; in z_gdb_main_loop() local 665 ret = gdb_get_packet(buf, sizeof(buf), &pkt_len); in z_gdb_main_loop() 677 if (pkt_len == 0) { in z_gdb_main_loop() 732 pkt_len = gdb_mem_write(ptr, addr, data_len); in z_gdb_main_loop() 733 CHECK_ERROR(pkt_len == -1); in z_gdb_main_loop() 760 pkt_len = arch_gdb_reg_readall(ctx, buf, sizeof(buf)); in z_gdb_main_loop() 761 CHECK_ERROR(pkt_len == 0); in z_gdb_main_loop() 762 gdb_send_packet(buf, pkt_len); in z_gdb_main_loop() 770 pkt_len = arch_gdb_reg_writeall(ctx, ptr, pkt_len - 1); in z_gdb_main_loop() 771 CHECK_ERROR(pkt_len == 0); in z_gdb_main_loop() [all …]
|
/Zephyr-latest/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-latest/subsys/net/l2/virtual/ |
D | virtual.c | 55 size_t pkt_len; in virtual_recv() local 57 pkt_len = net_pkt_get_len(pkt); in virtual_recv() 59 NET_DBG("Received pkt %p len %zu", pkt, pkt_len); in virtual_recv() 62 pkt_len); in virtual_recv() 80 size_t pkt_len; in virtual_send() local 94 pkt_len = net_pkt_get_len(pkt); in virtual_send() 102 NET_DBG("Sent pkt %p len %zu", pkt, pkt_len); in virtual_send() 103 net_stats_update_bytes_sent(iface, pkt_len); in virtual_send()
|
/Zephyr-latest/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-latest/drivers/ieee802154/ |
D | ieee802154_cc1200.c | 401 uint8_t pkt_len) in verify_rxfifo_validity() argument 404 if (pkt_len < 3 || in verify_rxfifo_validity() 405 read_reg_num_rxbytes(dev) > (pkt_len + CC1200_FCS_LEN)) { in verify_rxfifo_validity() 455 uint8_t pkt_len; in cc1200_rx() local 467 pkt_len = get_packet_length(dev); in cc1200_rx() 468 if (!verify_rxfifo_validity(dev, pkt_len)) { in cc1200_rx() 473 pkt = net_pkt_rx_alloc_with_buffer(cc1200->iface, pkt_len, in cc1200_rx() 480 if (!read_rxfifo_content(dev, pkt->buffer, pkt_len)) { in cc1200_rx() 495 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 | 583 uint8_t pkt_len) in verify_rxfifo_validity() argument 585 if (pkt_len < 2 || read_reg_rxfifocnt(dev) != pkt_len) { in verify_rxfifo_validity() 600 uint8_t pkt_len; in cc2520_rx() local 614 pkt_len = read_rxfifo_length(dev) & 0x7f; in cc2520_rx() 615 if (!verify_rxfifo_validity(dev, pkt_len)) { in cc2520_rx() 620 pkt = net_pkt_rx_alloc_with_buffer(cc2520->iface, pkt_len, in cc2520_rx() 628 pkt_len -= 2U; in cc2520_rx() 631 if (!read_rxfifo_content(dev, pkt->buffer, pkt_len)) { in cc2520_rx() 646 LOG_DBG("Caught a packet (%u)", pkt_len); in cc2520_rx()
|
D | ieee802154_nrf5.c | 155 uint8_t pkt_len; in nrf5_rx_thread() local 176 pkt_len = rx_frame->psdu[0]; in nrf5_rx_thread() 178 pkt_len = rx_frame->psdu[0] - IEEE802154_FCS_LENGTH; in nrf5_rx_thread() 182 __ASSERT_NO_MSG(pkt_len <= CONFIG_NET_BUF_DATA_SIZE); in nrf5_rx_thread() 193 pkt = net_pkt_rx_alloc_with_buffer(nrf5_radio->iface, pkt_len, in nrf5_rx_thread() 196 if (net_pkt_write(pkt, rx_frame->psdu + 1, pkt_len)) { in nrf5_rx_thread() 213 pkt_len, rx_frame->lqi); in nrf5_rx_thread()
|
/Zephyr-latest/drivers/ethernet/ |
D | eth_lan9250.c | 458 uint16_t pkt_len; in lan9250_rx() local 468 pkt_len = (tmp & LAN9250_RX_STS_PACKET_LEN) >> 16; in lan9250_rx() 470 if (pktcnt == 0 || pkt_len == 0) { in lan9250_rx() 476 pkt_len -= 4; in lan9250_rx() 478 if (pkt_len > NET_ETH_MAX_FRAME_SIZE) { in lan9250_rx() 484 pkt = net_pkt_rx_alloc_with_buffer(ctx->iface, pkt_len, AF_UNSPEC, 0, in lan9250_rx() 498 if (pkt_len > buf_rx_size) { in lan9250_rx() 501 data_len = pkt_len; in lan9250_rx() 503 pkt_len -= data_len; in lan9250_rx() 508 } while (pkt_len > 0); in lan9250_rx()
|
D | eth_nxp_s32_netc.c | 127 size_t pkt_len = net_pkt_get_len(pkt); in nxp_s32_eth_tx() local 136 buf.length = (uint16_t)pkt_len; in nxp_s32_eth_tx() 149 buf.length = (uint16_t)pkt_len; in nxp_s32_eth_tx() 151 res = net_pkt_read(pkt, buf.data, pkt_len); in nxp_s32_eth_tx()
|
D | eth_nxp_imx_netc.c | 231 size_t pkt_len = net_pkt_get_len(pkt); in netc_eth_tx() local 240 buff.length = (uint16_t)pkt_len; in netc_eth_tx() 241 ret = net_pkt_read(pkt, buff.buffer, pkt_len); in netc_eth_tx()
|
/Zephyr-latest/subsys/net/ip/ |
D | ipv6.c | 203 uint16_t pkt_len) in ipv6_handle_ext_hdr_options() argument 217 if (exthdr_len > pkt_len) { in ipv6_handle_ext_hdr_options() 219 "(max %d bytes)", exthdr_len, pkt_len); in ipv6_handle_ext_hdr_options() 489 int pkt_len; in net_ipv6_input() local 505 pkt_len = ntohs(hdr->len) + sizeof(struct net_ipv6_hdr); in net_ipv6_input() 506 if (real_len < pkt_len) { in net_ipv6_input() 508 pkt_len, real_len); in net_ipv6_input() 510 } else if (real_len > pkt_len) { in net_ipv6_input() 511 net_pkt_update_length(pkt, pkt_len); in net_ipv6_input() 514 NET_DBG("IPv6 packet len %d received from %s to %s", pkt_len, in net_ipv6_input() [all …]
|
D | ipv4_fragment.c | 519 uint16_t pkt_len, uint16_t mtu) in net_ipv4_send_fragmented_pkt() argument 561 pkt_len -= net_pkt_ip_hdr_len(pkt); in net_ipv4_send_fragmented_pkt() 592 while (frag_offset < pkt_len) { in net_ipv4_send_fragmented_pkt() 595 if ((frag_offset + fit_len) >= pkt_len) { in net_ipv4_send_fragmented_pkt() 597 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_fragment() local 649 if (pkt_len > mtu) { in net_ipv4_prepare_for_send_fragment() 650 ret = net_ipv4_send_fragmented_pkt(net_pkt_iface(pkt), pkt, pkt_len, mtu); in net_ipv4_prepare_for_send_fragment()
|
D | ipv4.c | 253 int pkt_len; in net_ipv4_input() local 293 pkt_len = ntohs(hdr->len); in net_ipv4_input() 294 if (real_len < pkt_len) { in net_ipv4_input() 296 pkt_len, real_len); in net_ipv4_input() 298 } else if (real_len > pkt_len) { in net_ipv4_input() 299 net_pkt_update_length(pkt, pkt_len); in net_ipv4_input()
|
D | ipv6_mld.c | 410 uint16_t pkt_len; in handle_mld_query() local 434 pkt_len = sizeof(struct net_ipv6_hdr) + net_pkt_ipv6_ext_len(pkt) + in handle_mld_query() 439 if (length < pkt_len || pkt_len > NET_IPV6_MTU || in handle_mld_query()
|
D | net_core.c | 437 size_t pkt_len; in net_rx() local 439 pkt_len = net_pkt_get_len(pkt); in net_rx() 441 NET_DBG("Received pkt %p len %zu", pkt, pkt_len); in net_rx() 443 net_stats_update_bytes_recv(iface, pkt_len); in net_rx()
|
/Zephyr-latest/include/zephyr/mgmt/mcumgr/transport/ |
D | serial.h | 35 uint16_t pkt_len; member
|
/Zephyr-latest/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-latest/drivers/wifi/esp_at/ |
D | esp_offload.c | 268 int ret, write_len, pkt_len; in _sock_send() local 281 pkt_len = net_pkt_get_len(pkt); in _sock_send() 283 LOG_DBG("link %d, len %d", sock->link_id, pkt_len); in _sock_send() 287 "AT+CIPSEND=%d,%d", sock->link_id, pkt_len); in _sock_send() 298 sock->link_id, pkt_len, addr_str, in _sock_send() 325 while (frag && pkt_len) { in _sock_send() 326 write_len = MIN(pkt_len, frag->len); in _sock_send() 328 pkt_len -= write_len; in _sock_send()
|
/Zephyr-latest/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-latest/include/zephyr/drivers/wifi/nrf_wifi/off_raw_tx/ |
D | off_raw_tx_api.h | 164 unsigned int pkt_len; member
|
/Zephyr-latest/soc/nuvoton/npcx/common/ |
D | soc_espi_taf.h | 146 uint8_t pkt_len; member
|