| /Zephyr-latest/include/zephyr/net/ | 
| D | net_pkt.h | 356 static inline struct net_linkaddr *net_pkt_lladdr_if(struct net_pkt *pkt)  in net_pkt_lladdr_if()  argument 358 	return net_if_get_link_addr(pkt->iface);  in net_pkt_lladdr_if() 361 static inline struct net_context *net_pkt_context(struct net_pkt *pkt)  in net_pkt_context()  argument 363 	return pkt->context;  in net_pkt_context() 366 static inline void net_pkt_set_context(struct net_pkt *pkt,  in net_pkt_set_context()  argument 369 	pkt->context = ctx;  in net_pkt_set_context() 372 static inline struct net_if *net_pkt_iface(struct net_pkt *pkt)  in net_pkt_iface()  argument 374 	return pkt->iface;  in net_pkt_iface() 377 static inline void net_pkt_set_iface(struct net_pkt *pkt, struct net_if *iface)  in net_pkt_set_iface()  argument 379 	pkt->iface = iface;  in net_pkt_set_iface() [all …] 
 | 
| D | ieee802154_pkt.h | 91 static inline void *net_pkt_cb(struct net_pkt *pkt); 93 static inline struct net_pkt_cb_ieee802154 *net_pkt_cb_ieee802154(struct net_pkt *pkt)  in net_pkt_cb_ieee802154()  argument 95 	return (struct net_pkt_cb_ieee802154 *)net_pkt_cb(pkt);  in net_pkt_cb_ieee802154() 98 static inline uint8_t net_pkt_ieee802154_lqi(struct net_pkt *pkt)  in net_pkt_ieee802154_lqi()  argument 100 	return net_pkt_cb_ieee802154(pkt)->lqi;  in net_pkt_ieee802154_lqi() 103 static inline void net_pkt_set_ieee802154_lqi(struct net_pkt *pkt, uint8_t lqi)  in net_pkt_set_ieee802154_lqi()  argument 105 	net_pkt_cb_ieee802154(pkt)->lqi = lqi;  in net_pkt_set_ieee802154_lqi() 120 static inline uint8_t net_pkt_ieee802154_rssi(struct net_pkt *pkt)  in net_pkt_ieee802154_rssi()  argument 122 	return net_pkt_cb_ieee802154(pkt)->rssi;  in net_pkt_ieee802154_rssi() 137 static inline void net_pkt_set_ieee802154_rssi(struct net_pkt *pkt, uint8_t rssi)  in net_pkt_set_ieee802154_rssi()  argument [all …] 
 | 
| /Zephyr-latest/subsys/net/ip/ | 
| D | net_core.c | 66 static inline enum net_verdict process_data(struct net_pkt *pkt,  in process_data()  argument 72 	net_pkt_set_l2_processed(pkt, false);  in process_data() 75 	ret = net_packet_socket_input(pkt, ETH_P_ALL);  in process_data() 83 	if (net_pkt_is_ip_reassembled(pkt)) {  in process_data() 88 	if (!pkt->frags) {  in process_data() 89 		NET_DBG("Corrupted packet (frags %p)", pkt->frags);  in process_data() 90 		net_stats_update_processing_error(net_pkt_iface(pkt));  in process_data() 96 		ret = net_if_recv_data(net_pkt_iface(pkt), pkt);  in process_data() 99 				NET_DBG("Packet %p discarded by L2", pkt);  in process_data() 101 							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 | 97 			if (!reassembly[i].pkt[j]) {  in reassembly_cancel() 102 				reassembly[i].pkt[j], net_pkt_get_len(reassembly[i].pkt[j]));  in reassembly_cancel() 104 			net_pkt_unref(reassembly[i].pkt[j]);  in reassembly_cancel() 105 			reassembly[i].pkt[j] = NULL;  in reassembly_cancel() 132 	if (reass->pkt[0] && net_pkt_ipv4_fragment_offset(reass->pkt[0]) == 0) {  in reassembly_timeout() 133 		net_icmpv4_send_error(reass->pkt[0], NET_ICMPV4_TIME_EXCEEDED,  in reassembly_timeout() 144 	struct net_pkt *pkt;  in reassemble_packet()  local 150 	NET_ASSERT(reass->pkt[0]);  in reassemble_packet() 152 	last = net_buf_frag_last(reass->pkt[0]->buffer);  in reassemble_packet() 156 		pkt = reass->pkt[i];  in reassemble_packet() [all …] 
 | 
| D | ipv4.c | 36 int net_ipv4_create_full(struct net_pkt *pkt,  in net_ipv4_create_full()  argument 47 	ipv4_hdr = (struct net_ipv4_hdr *)net_pkt_get_data(pkt, &ipv4_access);  in net_ipv4_create_full() 60 	ipv4_hdr->ttl = net_pkt_ipv4_ttl(pkt);  in net_ipv4_create_full() 63 			if (net_pkt_context(pkt) != NULL) {  in net_ipv4_create_full() 65 					net_context_get_ipv4_mcast_ttl(net_pkt_context(pkt));  in net_ipv4_create_full() 67 				ipv4_hdr->ttl = net_if_ipv4_get_mcast_ttl(net_pkt_iface(pkt));  in net_ipv4_create_full() 70 			if (net_pkt_context(pkt) != NULL) {  in net_ipv4_create_full() 72 					net_context_get_ipv4_ttl(net_pkt_context(pkt));  in net_ipv4_create_full() 74 				ipv4_hdr->ttl = net_if_ipv4_get_ttl(net_pkt_iface(pkt));  in net_ipv4_create_full() 85 	net_pkt_set_ip_hdr_len(pkt, sizeof(struct net_ipv4_hdr));  in net_ipv4_create_full() [all …] 
 | 
| D | net_pkt.c | 154 		struct net_pkt *pkt;  member 236 			   net_pkt_allocs[i].pkt : NULL,  in net_pkt_allocs_foreach() 251 			   net_pkt_allocs[i].pkt : NULL,  in net_pkt_allocs_foreach() 310 void net_pkt_print_frags(struct net_pkt *pkt)  in net_pkt_print_frags()  argument 316 	if (!pkt) {  in net_pkt_print_frags() 317 		NET_INFO("pkt %p", pkt);  in net_pkt_print_frags() 321 	NET_INFO("pkt %p frags %p", pkt, pkt->frags);  in net_pkt_print_frags() 323 	NET_ASSERT(pkt->frags);  in net_pkt_print_frags() 325 	frag = pkt->frags;  in net_pkt_print_frags() 427 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 | 45 	struct net_pkt *pkt;  member 50 static int mld_create(struct net_pkt *pkt,  in mld_create()  argument 59 				net_pkt_get_data(pkt, &mld_access);  in mld_create() 70 	if (net_pkt_set_data(pkt, &mld_access)) {  in mld_create() 77 static int mld_create_packet(struct net_pkt *pkt, uint16_t count)  in mld_create_packet()  argument 84 	net_pkt_set_ipv6_hop_limit(pkt, 1); /* RFC 3810 ch 7.4 */  in mld_create_packet() 86 	if (net_ipv6_create(pkt, net_if_ipv6_select_src_addr(  in mld_create_packet() 87 				    net_pkt_iface(pkt), &dst),  in mld_create_packet() 93 	if (net_pkt_write_u8(pkt, IPPROTO_ICMPV6) ||  in mld_create_packet() 94 	    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 | 56 static int igmp_v2_create(struct net_pkt *pkt, const struct in_addr *addr,  in igmp_v2_create()  argument 64 				net_pkt_get_data(pkt, &igmp_access);  in igmp_v2_create() 74 	if (net_pkt_set_data(pkt, &igmp_access)) {  in igmp_v2_create() 78 	igmp->chksum = net_calc_chksum_igmp(pkt);  in igmp_v2_create() 80 	net_pkt_set_overwrite(pkt, true);  in igmp_v2_create() 81 	net_pkt_cursor_init(pkt);  in igmp_v2_create() 83 	net_pkt_skip(pkt, offsetof(struct net_ipv4_igmp_v2_report, chksum));  in igmp_v2_create() 84 	if (net_pkt_write(pkt, &igmp->chksum, sizeof(igmp->chksum))) {  in igmp_v2_create() 92 static int igmp_v3_create(struct net_pkt *pkt, uint8_t type, struct net_if_mcast_addr mcast[],  in igmp_v3_create()  argument 102 	igmp = (struct net_ipv4_igmp_v3_report *)net_pkt_get_data(pkt, &igmp_access);  in igmp_v3_create() [all …] 
 | 
| D | ipv6.c | 60 int net_ipv6_create(struct net_pkt *pkt,  in net_ipv6_create()  argument 68 	ipv6_hdr = (struct net_ipv6_hdr *)net_pkt_get_data(pkt, &ipv6_access);  in net_ipv6_create() 74 		net_ipv6_set_dscp(&tc, net_pkt_ip_dscp(pkt));  in net_ipv6_create() 75 		net_ipv6_set_ecn(&tc, net_pkt_ip_ecn(pkt));  in net_ipv6_create() 88 	ipv6_hdr->hop_limit = net_pkt_ipv6_hop_limit(pkt);  in net_ipv6_create() 91 			if (net_pkt_context(pkt) != NULL) {  in net_ipv6_create() 93 					net_context_get_ipv6_mcast_hop_limit(net_pkt_context(pkt));  in net_ipv6_create() 96 					net_if_ipv6_get_mcast_hop_limit(net_pkt_iface(pkt));  in net_ipv6_create() 99 			if (net_pkt_context(pkt) != NULL) {  in net_ipv6_create() 101 					net_context_get_ipv6_hop_limit(net_pkt_context(pkt));  in net_ipv6_create() [all …] 
 | 
| /Zephyr-latest/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-latest/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-latest/tests/net/ipv6_fragment/src/ | 
| D | main.c | 957 static void test_pkt_loopback(struct net_pkt *pkt)  in test_pkt_loopback()  argument 969 	recv_pkt = net_pkt_rx_clone(pkt, K_NO_WAIT);  in test_pkt_loopback() 1000 	net_pkt_set_iface(recv_pkt, net_pkt_iface(pkt));  in test_pkt_loopback() 1006 static int verify_fragment(struct net_pkt *pkt)  in verify_fragment()  argument 1039 		size_t total_len = net_pkt_get_len(pkt);  in verify_fragment() 1047 		if ((total_len / 256) != pkt->buffer->data[4]) {  in verify_fragment() 1052 		if ((total_len - pkt->buffer->data[4] * 256U) !=  in verify_fragment() 1053 		    pkt->buffer->data[5]) {  in verify_fragment() 1058 		offset = pkt->buffer->data[6 * 8 + 2] * 256U +  in verify_fragment() 1059 			(pkt->buffer->data[6 * 8 + 3] & 0xfe);  in verify_fragment() [all …] 
 | 
| /Zephyr-latest/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-latest/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-latest/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 127 		NET_ETH_MINIMAL_FRAME_SIZE - (net_pkt_vlan_tag(pkt) != NET_VLAN_TAG_UNSPEC  in ethernet_update_length() 140 	if (net_pkt_family(pkt) == AF_INET) {  in ethernet_update_length() 141 		len = ntohs(NET_IPV4_HDR(pkt)->len);  in ethernet_update_length() [all …] 
 | 
| /Zephyr-latest/subsys/net/l2/canbus/ | 
| D | canbus_raw.c | 17 					   struct net_pkt *pkt)  in canbus_recv()  argument 19 	memset(net_pkt_lladdr_src(pkt)->addr, 0, sizeof(net_pkt_lladdr_src(pkt)->addr));  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 	memset(net_pkt_lladdr_dst(pkt)->addr, 0, sizeof(net_pkt_lladdr_dst(pkt)->addr));  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-latest/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-latest/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-latest/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 …] 
 | 
| /Zephyr-latest/tests/net/arp/src/ | 
| D | main.c | 86 static int tester_send(const struct device *dev, struct net_pkt *pkt)  in tester_send()  argument 90 	if (!pkt->buffer) {  in tester_send() 95 	hdr = (struct net_eth_hdr *)net_pkt_data(pkt);  in tester_send() 100 			(struct net_arp_hdr *)pkt->frags->frags;  in tester_send() 103 			if (!req_test && pkt != pending_pkt) {  in tester_send() 106 				       pending_pkt, pkt);  in tester_send() 157 	struct net_pkt *pkt;  in prepare_arp_reply()  local 161 	pkt = net_pkt_alloc_with_buffer(iface, sizeof(struct net_eth_hdr) +  in prepare_arp_reply() 165 	zassert_not_null(pkt, "out of mem reply");  in prepare_arp_reply() 167 	eth = NET_ETH_HDR(pkt);  in prepare_arp_reply() [all …] 
 | 
| /Zephyr-latest/tests/net/icmpv6/src/ | 
| D | main.c | 107 static int tester_send(const struct device *dev, struct net_pkt *pkt)  in tester_send()  argument 109 	net_pkt_unref(pkt);  in tester_send() 126 			   struct net_pkt *pkt,  in handle_test_msg()  argument 136 	struct net_buf *last = net_buf_frag_last(pkt->buffer);  in handle_test_msg() 155 	struct net_pkt *pkt;  in create_pkt()  local 157 	pkt = net_pkt_alloc_with_buffer(NULL, ICMPV6_MSG_SIZE,  in create_pkt() 159 	zassert_not_null(pkt, "Allocation failed");  in create_pkt() 161 	net_pkt_set_iface(pkt, test_iface);  in create_pkt() 162 	net_pkt_set_family(pkt, AF_INET6);  in create_pkt() 163 	net_pkt_set_ip_hdr_len(pkt, sizeof(struct net_ipv6_hdr));  in create_pkt() [all …] 
 |