/Zephyr-Core-3.7.0/include/zephyr/net/ |
D | net_pkt.h | 324 static inline struct net_linkaddr *net_pkt_lladdr_if(struct net_pkt *pkt) in net_pkt_lladdr_if() argument 326 return net_if_get_link_addr(pkt->iface); in net_pkt_lladdr_if() 329 static inline struct net_context *net_pkt_context(struct net_pkt *pkt) in net_pkt_context() argument 331 return pkt->context; in net_pkt_context() 334 static inline void net_pkt_set_context(struct net_pkt *pkt, in net_pkt_set_context() argument 337 pkt->context = ctx; in net_pkt_set_context() 340 static inline struct net_if *net_pkt_iface(struct net_pkt *pkt) in net_pkt_iface() argument 342 return pkt->iface; in net_pkt_iface() 345 static inline void net_pkt_set_iface(struct net_pkt *pkt, struct net_if *iface) in net_pkt_set_iface() argument 347 pkt->iface = iface; in net_pkt_set_iface() [all …]
|
D | ieee802154_pkt.h | 81 static inline void *net_pkt_cb(struct net_pkt *pkt); 83 static inline struct net_pkt_cb_ieee802154 *net_pkt_cb_ieee802154(struct net_pkt *pkt) in net_pkt_cb_ieee802154() argument 85 return (struct net_pkt_cb_ieee802154 *)net_pkt_cb(pkt); in net_pkt_cb_ieee802154() 88 static inline uint8_t net_pkt_ieee802154_lqi(struct net_pkt *pkt) in net_pkt_ieee802154_lqi() argument 90 return net_pkt_cb_ieee802154(pkt)->lqi; in net_pkt_ieee802154_lqi() 93 static inline void net_pkt_set_ieee802154_lqi(struct net_pkt *pkt, uint8_t lqi) in net_pkt_set_ieee802154_lqi() argument 95 net_pkt_cb_ieee802154(pkt)->lqi = lqi; in net_pkt_set_ieee802154_lqi() 110 static inline uint8_t net_pkt_ieee802154_rssi(struct net_pkt *pkt) in net_pkt_ieee802154_rssi() argument 112 return net_pkt_cb_ieee802154(pkt)->rssi; in net_pkt_ieee802154_rssi() 127 static inline void net_pkt_set_ieee802154_rssi(struct net_pkt *pkt, uint8_t rssi) in net_pkt_set_ieee802154_rssi() argument [all …]
|
/Zephyr-Core-3.7.0/subsys/net/ip/ |
D | net_core.c | 62 static inline enum net_verdict process_data(struct net_pkt *pkt, in process_data() argument 68 net_pkt_set_l2_processed(pkt, false); in process_data() 71 ret = net_packet_socket_input(pkt, ETH_P_ALL); in process_data() 79 if (net_pkt_is_ip_reassembled(pkt)) { in process_data() 84 if (!pkt->frags) { in process_data() 85 NET_DBG("Corrupted packet (frags %p)", pkt->frags); in process_data() 86 net_stats_update_processing_error(net_pkt_iface(pkt)); in process_data() 92 ret = net_if_recv_data(net_pkt_iface(pkt), pkt); in process_data() 95 NET_DBG("Packet %p discarded by L2", pkt); in process_data() 97 net_pkt_iface(pkt)); in process_data() [all …]
|
D | udp.c | 20 int net_udp_create(struct net_pkt *pkt, uint16_t src_port, uint16_t dst_port) in net_udp_create() argument 25 udp_hdr = (struct net_udp_hdr *)net_pkt_get_data(pkt, &udp_access); in net_udp_create() 35 return net_pkt_set_data(pkt, &udp_access); in net_udp_create() 38 int net_udp_finalize(struct net_pkt *pkt, bool force_chksum) in net_udp_finalize() argument 43 enum net_if_checksum_type type = net_pkt_family(pkt) == AF_INET6 ? in net_udp_finalize() 46 udp_hdr = (struct net_udp_hdr *)net_pkt_get_data(pkt, &udp_access); in net_udp_finalize() 51 length = net_pkt_get_len(pkt) - net_pkt_ip_hdr_len(pkt) - in net_udp_finalize() 52 net_pkt_ip_opts_len(pkt); in net_udp_finalize() 56 if (net_if_need_calc_tx_checksum(net_pkt_iface(pkt), type) || force_chksum) { in net_udp_finalize() 57 udp_hdr->chksum = net_calc_chksum_udp(pkt); in net_udp_finalize() [all …]
|
D | ipv6_fragment.c | 49 int net_ipv6_find_last_ext_hdr(struct net_pkt *pkt, uint16_t *next_hdr_off, in net_ipv6_find_last_ext_hdr() argument 57 if (!pkt || !pkt->frags || !next_hdr_off || !last_hdr_off) { in net_ipv6_find_last_ext_hdr() 61 net_pkt_cursor_init(pkt); in net_ipv6_find_last_ext_hdr() 63 hdr = (struct net_ipv6_hdr *)net_pkt_get_data(pkt, &ipv6_access); in net_ipv6_find_last_ext_hdr() 68 net_pkt_acknowledge_data(pkt, &ipv6_access); in net_ipv6_find_last_ext_hdr() 77 if (net_pkt_read_u8(pkt, &next_nexthdr)) { in net_ipv6_find_last_ext_hdr() 88 if (net_pkt_read_u8(pkt, &val)) { in net_ipv6_find_last_ext_hdr() 94 if (net_pkt_skip(pkt, length)) { in net_ipv6_find_last_ext_hdr() 100 if (net_pkt_skip(pkt, 7)) { in net_ipv6_find_last_ext_hdr() 113 *last_hdr_off = net_pkt_get_current_offset(pkt); in net_ipv6_find_last_ext_hdr() [all …]
|
D | ipv4_fragment.c | 96 if (!reassembly[i].pkt[j]) { in reassembly_cancel() 101 reassembly[i].pkt[j], net_pkt_get_len(reassembly[i].pkt[j])); in reassembly_cancel() 103 net_pkt_unref(reassembly[i].pkt[j]); in reassembly_cancel() 104 reassembly[i].pkt[j] = NULL; in reassembly_cancel() 131 if (reass->pkt[0] && net_pkt_ipv4_fragment_offset(reass->pkt[0]) == 0) { in reassembly_timeout() 132 net_icmpv4_send_error(reass->pkt[0], NET_ICMPV4_TIME_EXCEEDED, in reassembly_timeout() 143 struct net_pkt *pkt; in reassemble_packet() local 149 NET_ASSERT(reass->pkt[0]); in reassemble_packet() 151 last = net_buf_frag_last(reass->pkt[0]->buffer); in reassemble_packet() 155 pkt = reass->pkt[i]; in reassemble_packet() [all …]
|
D | ipv4.c | 34 int net_ipv4_create_full(struct net_pkt *pkt, in net_ipv4_create_full() argument 45 ipv4_hdr = (struct net_ipv4_hdr *)net_pkt_get_data(pkt, &ipv4_access); in net_ipv4_create_full() 58 ipv4_hdr->ttl = net_pkt_ipv4_ttl(pkt); in net_ipv4_create_full() 61 if (net_pkt_context(pkt) != NULL) { in net_ipv4_create_full() 63 net_context_get_ipv4_mcast_ttl(net_pkt_context(pkt)); in net_ipv4_create_full() 65 ipv4_hdr->ttl = net_if_ipv4_get_mcast_ttl(net_pkt_iface(pkt)); in net_ipv4_create_full() 68 if (net_pkt_context(pkt) != NULL) { in net_ipv4_create_full() 70 net_context_get_ipv4_ttl(net_pkt_context(pkt)); in net_ipv4_create_full() 72 ipv4_hdr->ttl = net_if_ipv4_get_ttl(net_pkt_iface(pkt)); in net_ipv4_create_full() 83 net_pkt_set_ip_hdr_len(pkt, sizeof(struct net_ipv4_hdr)); in net_ipv4_create_full() [all …]
|
D | ipv6.c | 53 int net_ipv6_create(struct net_pkt *pkt, in net_ipv6_create() argument 61 ipv6_hdr = (struct net_ipv6_hdr *)net_pkt_get_data(pkt, &ipv6_access); in net_ipv6_create() 67 net_ipv6_set_dscp(&tc, net_pkt_ip_dscp(pkt)); in net_ipv6_create() 68 net_ipv6_set_ecn(&tc, net_pkt_ip_ecn(pkt)); in net_ipv6_create() 81 ipv6_hdr->hop_limit = net_pkt_ipv6_hop_limit(pkt); in net_ipv6_create() 84 if (net_pkt_context(pkt) != NULL) { in net_ipv6_create() 86 net_context_get_ipv6_mcast_hop_limit(net_pkt_context(pkt)); in net_ipv6_create() 89 net_if_ipv6_get_mcast_hop_limit(net_pkt_iface(pkt)); in net_ipv6_create() 92 if (net_pkt_context(pkt) != NULL) { in net_ipv6_create() 94 net_context_get_ipv6_hop_limit(net_pkt_context(pkt)); in net_ipv6_create() [all …]
|
D | net_pkt.c | 143 struct net_pkt *pkt; member 225 net_pkt_allocs[i].pkt : NULL, in net_pkt_allocs_foreach() 240 net_pkt_allocs[i].pkt : NULL, in net_pkt_allocs_foreach() 299 void net_pkt_print_frags(struct net_pkt *pkt) in net_pkt_print_frags() argument 305 if (!pkt) { in net_pkt_print_frags() 306 NET_INFO("pkt %p", pkt); in net_pkt_print_frags() 310 NET_INFO("pkt %p frags %p", pkt, pkt->frags); in net_pkt_print_frags() 312 NET_ASSERT(pkt->frags); in net_pkt_print_frags() 314 frag = pkt->frags; in net_pkt_print_frags() 416 struct net_buf *net_pkt_get_frag_debug(struct net_pkt *pkt, size_t min_len, in net_pkt_get_frag_debug() argument [all …]
|
D | ipv6_mld.c | 44 struct net_pkt *pkt; member 49 static int mld_create(struct net_pkt *pkt, in mld_create() argument 58 net_pkt_get_data(pkt, &mld_access); in mld_create() 69 if (net_pkt_set_data(pkt, &mld_access)) { in mld_create() 76 static int mld_create_packet(struct net_pkt *pkt, uint16_t count) in mld_create_packet() argument 83 net_pkt_set_ipv6_hop_limit(pkt, 1); /* RFC 3810 ch 7.4 */ in mld_create_packet() 85 if (net_ipv6_create(pkt, net_if_ipv6_select_src_addr( in mld_create_packet() 86 net_pkt_iface(pkt), &dst), in mld_create_packet() 92 if (net_pkt_write_u8(pkt, IPPROTO_ICMPV6) || in mld_create_packet() 93 net_pkt_write_u8(pkt, 0)) { in mld_create_packet() [all …]
|
D | icmpv6.c | 60 int net_icmpv6_finalize(struct net_pkt *pkt, bool force_chksum) in net_icmpv6_finalize() argument 66 icmp_hdr = (struct net_icmp_hdr *)net_pkt_get_data(pkt, &icmp_access); in net_icmpv6_finalize() 72 if (net_if_need_calc_tx_checksum(net_pkt_iface(pkt), NET_IF_CHECKSUM_IPV6_ICMP) || in net_icmpv6_finalize() 74 icmp_hdr->chksum = net_calc_chksum_icmpv6(pkt); in net_icmpv6_finalize() 75 net_pkt_set_chksum_done(pkt, true); in net_icmpv6_finalize() 78 return net_pkt_set_data(pkt, &icmp_access); in net_icmpv6_finalize() 81 int net_icmpv6_create(struct net_pkt *pkt, uint8_t icmp_type, uint8_t icmp_code) in net_icmpv6_create() argument 87 icmp_hdr = (struct net_icmp_hdr *)net_pkt_get_data(pkt, &icmp_access); in net_icmpv6_create() 96 return net_pkt_set_data(pkt, &icmp_access); in net_icmpv6_create() 100 struct net_pkt *pkt, in icmpv6_handle_echo_request() argument [all …]
|
D | igmp.c | 59 static int igmp_v2_create(struct net_pkt *pkt, const struct in_addr *addr, in igmp_v2_create() argument 67 net_pkt_get_data(pkt, &igmp_access); in igmp_v2_create() 77 if (net_pkt_set_data(pkt, &igmp_access)) { in igmp_v2_create() 81 igmp->chksum = net_calc_chksum_igmp(pkt); in igmp_v2_create() 83 net_pkt_set_overwrite(pkt, true); in igmp_v2_create() 84 net_pkt_cursor_init(pkt); in igmp_v2_create() 86 net_pkt_skip(pkt, offsetof(struct net_ipv4_igmp_v2_report, chksum)); in igmp_v2_create() 87 if (net_pkt_write(pkt, &igmp->chksum, sizeof(igmp->chksum))) { in igmp_v2_create() 95 static int igmp_v3_create(struct net_pkt *pkt, uint8_t type, struct net_if_mcast_addr mcast[], in igmp_v3_create() argument 105 igmp = (struct net_ipv4_igmp_v3_report *)net_pkt_get_data(pkt, &igmp_access); in igmp_v3_create() [all …]
|
D | net_private.h | 62 extern void net_process_rx_packet(struct net_pkt *pkt); 63 extern void net_process_tx_packet(struct net_pkt *pkt); 65 extern int net_icmp_call_ipv4_handlers(struct net_pkt *pkt, 68 extern int net_icmp_call_ipv6_handlers(struct net_pkt *pkt, 144 enum net_verdict net_ipv4_input(struct net_pkt *pkt, bool is_loopback); 145 enum net_verdict net_ipv6_input(struct net_pkt *pkt, bool is_loopback); 147 static inline enum net_verdict net_ipv4_input(struct net_pkt *pkt, in net_ipv4_input() argument 150 ARG_UNUSED(pkt); in net_ipv4_input() 156 static inline enum net_verdict net_ipv6_input(struct net_pkt *pkt, in net_ipv6_input() argument 159 ARG_UNUSED(pkt); in net_ipv6_input() [all …]
|
/Zephyr-Core-3.7.0/tests/net/net_pkt/src/ |
D | main.c | 46 static int fake_dev_send(const struct device *dev, struct net_pkt *pkt) in fake_dev_send() argument 88 static bool pkt_is_of_size(struct net_pkt *pkt, size_t size) in pkt_is_of_size() argument 90 return (net_pkt_available_buffer(pkt) == size); in pkt_is_of_size() 93 static void pkt_print_cursor(struct net_pkt *pkt) in pkt_print_cursor() argument 95 if (!pkt || !pkt->cursor.buf || !pkt->cursor.pos) { in pkt_print_cursor() 99 pkt->cursor.pos - pkt->cursor.buf->data, in pkt_print_cursor() 100 pkt->cursor.pos, pkt->cursor.buf, in pkt_print_cursor() 101 pkt->cursor.buf->data); in pkt_print_cursor() 111 struct net_pkt *pkt; in ZTEST() local 114 pkt = net_pkt_alloc(K_NO_WAIT); in ZTEST() [all …]
|
/Zephyr-Core-3.7.0/tests/net/icmpv4/src/ |
D | main.c | 120 struct net_pkt *pkt, in handle_reply_msg() argument 130 if (net_pkt_get_len(pkt) != sizeof(icmpv4_echo_rep)) { in handle_reply_msg() 175 static int verify_echo_reply(struct net_pkt *pkt) in verify_echo_reply() argument 182 net_pkt_set_overwrite(pkt, true); in verify_echo_reply() 183 net_pkt_cursor_init(pkt); in verify_echo_reply() 185 ret = net_pkt_skip(pkt, NET_IPV4H_LEN); in verify_echo_reply() 191 ret = net_pkt_read(pkt, &icmp_hdr, sizeof(struct net_icmp_hdr)); in verify_echo_reply() 203 if (payload_len != net_pkt_remaining_data(pkt)) { in verify_echo_reply() 207 ret = net_pkt_read(pkt, buf, payload_len); in verify_echo_reply() 219 if (net_pkt_ipv4_opts_len(pkt)) { in verify_echo_reply() [all …]
|
/Zephyr-Core-3.7.0/tests/net/ipv6_fragment/src/ |
D | main.c | 958 static void test_pkt_loopback(struct net_pkt *pkt) in test_pkt_loopback() argument 970 recv_pkt = net_pkt_rx_clone(pkt, K_NO_WAIT); in test_pkt_loopback() 1001 net_pkt_set_iface(recv_pkt, net_pkt_iface(pkt)); in test_pkt_loopback() 1007 static int verify_fragment(struct net_pkt *pkt) in verify_fragment() argument 1040 size_t total_len = net_pkt_get_len(pkt); in verify_fragment() 1048 if ((total_len / 256) != pkt->buffer->data[4]) { in verify_fragment() 1053 if ((total_len - pkt->buffer->data[4] * 256U) != in verify_fragment() 1054 pkt->buffer->data[5]) { in verify_fragment() 1059 offset = pkt->buffer->data[6 * 8 + 2] * 256U + in verify_fragment() 1060 (pkt->buffer->data[6 * 8 + 3] & 0xfe); in verify_fragment() [all …]
|
/Zephyr-Core-3.7.0/subsys/net/l2/ethernet/gptp/ |
D | gptp_messages.h | 26 #define GPTP_HDR(pkt) gptp_get_hdr(pkt) argument 27 #define GPTP_ANNOUNCE(pkt) ((struct gptp_announce *)gptp_data(pkt)) argument 28 #define GPTP_SIGNALING(pkt) ((struct gptp_signaling *)gptp_data(pkt)) argument 29 #define GPTP_SYNC(pkt) ((struct gptp_sync *)gptp_data(pkt)) argument 30 #define GPTP_FOLLOW_UP(pkt) ((struct gptp_follow_up *)gptp_data(pkt)) argument 31 #define GPTP_DELAY_REQ(pkt) \ argument 32 ((struct gptp_delay_req *)gptp_data(pkt)) 33 #define GPTP_PDELAY_REQ(pkt) \ argument 34 ((struct gptp_pdelay_req *)gptp_data(pkt)) 35 #define GPTP_PDELAY_RESP(pkt) \ argument [all …]
|
D | gptp_messages.c | 27 #define NET_GPTP_INFO(msg, pkt) \ argument 29 struct gptp_hdr *one_hdr = GPTP_HDR(pkt); \ 32 struct gptp_announce *ann = GPTP_ANNOUNCE(pkt); \ 42 ntohs(one_hdr->sequence_id), pkt); \ 53 ntohs(one_hdr->sequence_id), pkt); \ 57 struct gptp_hdr *gptp_get_hdr(struct net_pkt *pkt) in gptp_get_hdr() argument 59 struct net_buf *buf = pkt->frags; in gptp_get_hdr() 75 return (struct gptp_hdr *)pkt->frags->data; in gptp_get_hdr() 81 static void gptp_sync_timestamp_callback(struct net_pkt *pkt) in gptp_sync_timestamp_callback() argument 87 port = gptp_get_port_number(net_pkt_iface(pkt)); in gptp_sync_timestamp_callback() [all …]
|
/Zephyr-Core-3.7.0/subsys/net/l2/ethernet/ |
D | ethernet.c | 82 #define print_ll_addrs(pkt, type, len, src, dst) \ argument 91 net_if_get_by_iface(net_pkt_iface(pkt)), \ 92 net_pkt_iface(pkt), out, \ 99 #define print_vlan_ll_addrs(pkt, type, tci, len, src, dst, tagstrip) \ argument 109 net_if_get_by_iface(net_pkt_iface(pkt)), \ 110 net_pkt_iface(pkt), out, \ 122 struct net_pkt *pkt) in ethernet_update_length() argument 132 if (net_pkt_family(pkt) == AF_INET) { in ethernet_update_length() 133 len = ntohs(NET_IPV4_HDR(pkt)->len); in ethernet_update_length() 135 len = ntohs(NET_IPV6_HDR(pkt)->len) + NET_IPV6H_LEN; in ethernet_update_length() [all …]
|
/Zephyr-Core-3.7.0/tests/net/ipv4_fragment/src/ |
D | main.c | 154 static int sender_iface(const struct device *dev, struct net_pkt *pkt); 201 static void check_ipv4_fragment_header(struct net_pkt *pkt, const uint8_t *orig_hdr, uint16_t id, in check_ipv4_fragment_header() argument 207 const struct net_ipv4_hdr *hdr = NET_IPV4_HDR(pkt); in check_ipv4_fragment_header() 235 zassert_equal(net_pkt_get_len(pkt), pkt_len, "IPv4 header length mismatch"); in check_ipv4_fragment_header() 237 zassert_equal(net_calc_chksum_ipv4(pkt), 0, "IPv4 header checksum mismatch"); in check_ipv4_fragment_header() 240 static int sender_iface(const struct device *dev, struct net_pkt *pkt) in sender_iface() argument 250 if (!pkt->buffer) { in sender_iface() 255 if (net_pkt_get_len(pkt) > NET_IPV4_MTU) { in sender_iface() 257 pkt_recv_size = net_pkt_get_len(pkt); in sender_iface() 263 lower_layer_total_size += net_pkt_get_len(pkt); in sender_iface() [all …]
|
/Zephyr-Core-3.7.0/subsys/mgmt/osdp/src/ |
D | osdp_phy.c | 70 struct osdp_packet_header *pkt; in osdp_phy_packet_get_data_offset() local 77 pkt = (struct osdp_packet_header *)buf; in osdp_phy_packet_get_data_offset() 78 if (pkt->control & PKT_CONTROL_SCB) { in osdp_phy_packet_get_data_offset() 79 sb_len = pkt->data[0]; in osdp_phy_packet_get_data_offset() 86 struct osdp_packet_header *pkt; in osdp_phy_packet_get_smb() local 92 pkt = (struct osdp_packet_header *)buf; in osdp_phy_packet_get_smb() 93 if (pkt->control & PKT_CONTROL_SCB) { in osdp_phy_packet_get_smb() 94 return pkt->data; in osdp_phy_packet_get_smb() 111 struct osdp_packet_header *pkt; in osdp_phy_packet_init() local 132 pkt = (struct osdp_packet_header *)buf; in osdp_phy_packet_init() [all …]
|
/Zephyr-Core-3.7.0/subsys/net/lib/sntp/ |
D | sntp.c | 22 static void sntp_pkt_dump(struct sntp_pkt *pkt) in sntp_pkt_dump() argument 24 if (!pkt) { in sntp_pkt_dump() 28 NET_DBG("li %x", pkt->li); in sntp_pkt_dump() 29 NET_DBG("vn %x", pkt->vn); in sntp_pkt_dump() 30 NET_DBG("mode %x", pkt->mode); in sntp_pkt_dump() 31 NET_DBG("stratum: %x", pkt->stratum); in sntp_pkt_dump() 32 NET_DBG("poll: %x", pkt->poll); in sntp_pkt_dump() 33 NET_DBG("precision: %x", pkt->precision); in sntp_pkt_dump() 34 NET_DBG("root_delay: %x", ntohl(pkt->root_delay)); in sntp_pkt_dump() 35 NET_DBG("root_dispersion: %x", ntohl(pkt->root_dispersion)); in sntp_pkt_dump() [all …]
|
/Zephyr-Core-3.7.0/subsys/net/l2/canbus/ |
D | canbus_raw.c | 17 struct net_pkt *pkt) in canbus_recv() argument 19 net_pkt_lladdr_src(pkt)->addr = NULL; in canbus_recv() 20 net_pkt_lladdr_src(pkt)->len = 0U; in canbus_recv() 21 net_pkt_lladdr_src(pkt)->type = NET_LINK_CANBUS_RAW; in canbus_recv() 22 net_pkt_lladdr_dst(pkt)->addr = NULL; in canbus_recv() 23 net_pkt_lladdr_dst(pkt)->len = 0U; in canbus_recv() 24 net_pkt_lladdr_dst(pkt)->type = NET_LINK_CANBUS_RAW; in canbus_recv() 26 net_pkt_set_family(pkt, AF_CAN); in canbus_recv() 31 static inline int canbus_send(struct net_if *iface, struct net_pkt *pkt) in canbus_send() argument 40 ret = net_l2_send(api->send, net_if_get_device(iface), iface, pkt); in canbus_send() [all …]
|
/Zephyr-Core-3.7.0/samples/net/promiscuous_mode/src/ |
D | main.c | 19 static void net_pkt_hexdump(struct net_pkt *pkt, const char *str) in net_pkt_hexdump() argument 21 struct net_buf *buf = pkt->buffer; in net_pkt_hexdump() 43 static int get_ports(struct net_pkt *pkt, uint16_t *src, uint16_t *dst) in get_ports() argument 47 udp_hdr = net_udp_get_hdr(pkt, &hdr); in get_ports() 58 static void print_info(struct net_pkt *pkt) in print_info() argument 71 net_pkt_hexdump(pkt, "Network packet"); in print_info() 73 switch (NET_IPV6_HDR(pkt)->vtc & 0xf0) { in print_info() 76 net_pkt_set_family(pkt, AF_INET6); in print_info() 77 dst = &NET_IPV6_HDR(pkt)->dst; in print_info() 78 src = &NET_IPV6_HDR(pkt)->src; in print_info() [all …]
|
/Zephyr-Core-3.7.0/subsys/net/l2/ieee802154/ |
D | ieee802154_6lo_fragment.c | 42 struct net_pkt *pkt; /* Reassemble packet */ member 229 static void update_protocol_header_lengths(struct net_pkt *pkt, uint16_t size) in update_protocol_header_lengths() argument 234 ipv6 = (struct net_ipv6_hdr *)net_pkt_get_data(pkt, &ipv6_access); in update_protocol_header_lengths() 240 net_pkt_set_ip_hdr_len(pkt, NET_IPV6H_LEN); in update_protocol_header_lengths() 243 net_pkt_set_data(pkt, &ipv6_access); in update_protocol_header_lengths() 249 udp = (struct net_udp_hdr *)net_pkt_get_data(pkt, &udp_access); in update_protocol_header_lengths() 252 net_pkt_set_data(pkt, &udp_access); in update_protocol_header_lengths() 268 if (cache[i].pkt) { in clear_reass_cache() 269 net_pkt_unref(cache[i].pkt); in clear_reass_cache() 272 cache[i].pkt = NULL; in clear_reass_cache() [all …]
|