Home
last modified time | relevance | path

Searched refs:pkt (Results 1 – 25 of 271) sorted by relevance

1234567891011

/Zephyr-Core-3.4.0/include/zephyr/net/
Dnet_pkt.h293 static inline struct net_linkaddr *net_pkt_lladdr_if(struct net_pkt *pkt) in net_pkt_lladdr_if() argument
295 return net_if_get_link_addr(pkt->iface); in net_pkt_lladdr_if()
298 static inline struct net_context *net_pkt_context(struct net_pkt *pkt) in net_pkt_context() argument
300 return pkt->context; in net_pkt_context()
303 static inline void net_pkt_set_context(struct net_pkt *pkt, in net_pkt_set_context() argument
306 pkt->context = ctx; in net_pkt_set_context()
309 static inline struct net_if *net_pkt_iface(struct net_pkt *pkt) in net_pkt_iface() argument
311 return pkt->iface; in net_pkt_iface()
314 static inline void net_pkt_set_iface(struct net_pkt *pkt, struct net_if *iface) in net_pkt_set_iface() argument
316 pkt->iface = iface; in net_pkt_set_iface()
[all …]
Dieee802154_pkt.h68 static inline void *net_pkt_cb(struct net_pkt *pkt);
70 static inline struct net_pkt_cb_ieee802154 *net_pkt_cb_ieee802154(struct net_pkt *pkt) in net_pkt_cb_ieee802154() argument
72 return net_pkt_cb(pkt); in net_pkt_cb_ieee802154()
75 static inline uint8_t net_pkt_ieee802154_lqi(struct net_pkt *pkt) in net_pkt_ieee802154_lqi() argument
77 return net_pkt_cb_ieee802154(pkt)->lqi; in net_pkt_ieee802154_lqi()
80 static inline void net_pkt_set_ieee802154_lqi(struct net_pkt *pkt, uint8_t lqi) in net_pkt_set_ieee802154_lqi() argument
82 net_pkt_cb_ieee802154(pkt)->lqi = lqi; in net_pkt_set_ieee802154_lqi()
85 static inline uint8_t net_pkt_ieee802154_rssi(struct net_pkt *pkt) in net_pkt_ieee802154_rssi() argument
87 return net_pkt_cb_ieee802154(pkt)->rssi; in net_pkt_ieee802154_rssi()
90 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.4.0/subsys/net/ip/
Dnet_core.c61 static inline enum net_verdict process_data(struct net_pkt *pkt, in process_data() argument
67 net_pkt_set_l2_processed(pkt, false); in process_data()
70 ret = net_packet_socket_input(pkt, ETH_P_ALL); in process_data()
78 if ((IS_ENABLED(CONFIG_NET_IPV4_FRAGMENT) && net_pkt_ipv4_fragment_more(pkt)) || in process_data()
79 (IS_ENABLED(CONFIG_NET_IPV6_FRAGMENT) && net_pkt_ipv6_fragment_start(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()
[all …]
Dudp.c20 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) in net_udp_finalize() argument
44 udp_hdr = (struct net_udp_hdr *)net_pkt_get_data(pkt, &udp_access); in net_udp_finalize()
49 length = net_pkt_get_len(pkt) - net_pkt_ip_hdr_len(pkt) - in net_udp_finalize()
50 net_pkt_ip_opts_len(pkt); in net_udp_finalize()
54 if (net_if_need_calc_tx_checksum(net_pkt_iface(pkt))) { in net_udp_finalize()
55 udp_hdr->chksum = net_calc_chksum_udp(pkt); in net_udp_finalize()
58 return net_pkt_set_data(pkt, &udp_access); in net_udp_finalize()
[all …]
Dipv6_fragment.c49 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 …]
Dipv4_fragment.c96 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()
130 if (reass->pkt[0] && net_pkt_ipv4_fragment_offset(reass->pkt[0]) == 0) { in reassembly_timeout()
131 net_icmpv4_send_error(reass->pkt[0], NET_ICMPV4_TIME_EXCEEDED, in reassembly_timeout()
142 struct net_pkt *pkt; in reassemble_packet() local
148 NET_ASSERT(reass->pkt[0]); in reassemble_packet()
150 last = net_buf_frag_last(reass->pkt[0]->buffer); in reassemble_packet()
154 pkt = reass->pkt[i]; in reassemble_packet()
[all …]
Dipv4.c33 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()
60 ipv4_hdr->ttl = net_if_ipv4_get_ttl(net_pkt_iface(pkt)); in net_ipv4_create_full()
69 net_pkt_set_ip_hdr_len(pkt, sizeof(struct net_ipv4_hdr)); in net_ipv4_create_full()
71 return net_pkt_set_data(pkt, &ipv4_access); in net_ipv4_create_full()
74 int net_ipv4_create(struct net_pkt *pkt, in net_ipv4_create() argument
81 net_ipv4_set_dscp(&tos, net_pkt_ip_dscp(pkt)); in net_ipv4_create()
82 net_ipv4_set_ecn(&tos, net_pkt_ip_ecn(pkt)); in net_ipv4_create()
85 return net_ipv4_create_full(pkt, src, dst, tos, 0U, 0U, 0U, in net_ipv4_create()
86 net_pkt_ipv4_ttl(pkt)); in net_ipv4_create()
[all …]
Dipv6.c53 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()
78 ipv6_hdr->hop_limit = net_pkt_ipv6_hop_limit(pkt); in net_ipv6_create()
81 net_if_ipv6_get_hop_limit(net_pkt_iface(pkt)); in net_ipv6_create()
87 net_pkt_set_ip_hdr_len(pkt, sizeof(struct net_ipv6_hdr)); in net_ipv6_create()
88 net_pkt_set_ipv6_ext_len(pkt, 0); in net_ipv6_create()
90 return net_pkt_set_data(pkt, &ipv6_access); in net_ipv6_create()
93 int net_ipv6_finalize(struct net_pkt *pkt, uint8_t next_header_proto) in net_ipv6_finalize() argument
[all …]
Dipv6_mld.c39 static int mld_create(struct net_pkt *pkt, in mld_create() argument
49 net_pkt_get_data(pkt, &mld_access); in mld_create()
60 if (net_pkt_set_data(pkt, &mld_access)) { in mld_create()
66 if (net_pkt_write(pkt, 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 …]
Dicmpv6.c71 int net_icmpv6_finalize(struct net_pkt *pkt) in net_icmpv6_finalize() argument
77 icmp_hdr = (struct net_icmp_hdr *)net_pkt_get_data(pkt, &icmp_access); in net_icmpv6_finalize()
83 if (net_if_need_calc_tx_checksum(net_pkt_iface(pkt))) { in net_icmpv6_finalize()
84 icmp_hdr->chksum = net_calc_chksum_icmpv6(pkt); in net_icmpv6_finalize()
87 return net_pkt_set_data(pkt, &icmp_access); in net_icmpv6_finalize()
90 int net_icmpv6_create(struct net_pkt *pkt, uint8_t icmp_type, uint8_t icmp_code) in net_icmpv6_create() argument
96 icmp_hdr = (struct net_icmp_hdr *)net_pkt_get_data(pkt, &icmp_access); in net_icmpv6_create()
105 return net_pkt_set_data(pkt, &icmp_access); in net_icmpv6_create()
109 enum net_verdict icmpv6_handle_echo_request(struct net_pkt *pkt, in icmpv6_handle_echo_request() argument
124 net_pkt_ipv6_ext_len(pkt) - NET_ICMPH_LEN; in icmpv6_handle_echo_request()
[all …]
Dnet_pkt.c143 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 …]
Dnet_private.h53 extern void net_process_rx_packet(struct net_pkt *pkt);
54 extern void net_process_tx_packet(struct net_pkt *pkt);
75 enum net_verdict net_ipv4_input(struct net_pkt *pkt);
76 enum net_verdict net_ipv6_input(struct net_pkt *pkt, bool is_loopback);
78 static inline enum net_verdict net_ipv4_input(struct net_pkt *pkt) in net_ipv4_input() argument
80 ARG_UNUSED(pkt); in net_ipv4_input()
85 static inline enum net_verdict net_ipv6_input(struct net_pkt *pkt, in net_ipv6_input() argument
88 ARG_UNUSED(pkt); in net_ipv6_input()
94 extern bool net_tc_submit_to_tx_queue(uint8_t tc, struct net_pkt *pkt);
95 extern void net_tc_submit_to_rx_queue(uint8_t tc, struct net_pkt *pkt);
[all …]
/Zephyr-Core-3.4.0/tests/net/net_pkt/src/
Dmain.c46 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.4.0/tests/net/icmpv4/src/
Dmain.c117 static enum net_verdict handle_reply_msg(struct net_pkt *pkt, in handle_reply_msg() argument
121 if (net_pkt_get_len(pkt) != sizeof(icmpv4_echo_rep)) { in handle_reply_msg()
125 net_pkt_unref(pkt); in handle_reply_msg()
173 static int verify_echo_reply(struct net_pkt *pkt) in verify_echo_reply() argument
180 net_pkt_set_overwrite(pkt, true); in verify_echo_reply()
181 net_pkt_cursor_init(pkt); in verify_echo_reply()
183 ret = net_pkt_skip(pkt, NET_IPV4H_LEN); in verify_echo_reply()
189 ret = net_pkt_read(pkt, &icmp_hdr, sizeof(struct net_icmp_hdr)); in verify_echo_reply()
201 if (payload_len != net_pkt_remaining_data(pkt)) { in verify_echo_reply()
205 ret = net_pkt_read(pkt, buf, payload_len); in verify_echo_reply()
[all …]
/Zephyr-Core-3.4.0/tests/net/ipv6_fragment/src/
Dmain.c958 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.4.0/tests/net/icmpv6/src/
Dmain.c60 static enum net_verdict handle_test_msg(struct net_pkt *pkt, in handle_test_msg() argument
64 struct net_buf *last = net_buf_frag_last(pkt->buffer); in handle_test_msg()
102 struct net_pkt *pkt; in ZTEST() local
108 pkt = net_pkt_alloc_with_buffer(NULL, ICMPV6_MSG_SIZE, in ZTEST()
110 zassert_not_null(pkt, "Allocation failed"); in ZTEST()
112 net_pkt_set_ip_hdr_len(pkt, sizeof(struct net_ipv6_hdr)); in ZTEST()
114 net_pkt_write(pkt, icmpv6_inval_chksum, ICMPV6_MSG_SIZE); in ZTEST()
116 hdr = (struct net_ipv6_hdr *)pkt->buffer->data; in ZTEST()
117 net_pkt_cursor_init(pkt); in ZTEST()
118 net_pkt_set_overwrite(pkt, true); in ZTEST()
[all …]
/Zephyr-Core-3.4.0/subsys/net/l2/ethernet/gptp/
Dgptp_messages.h26 #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 …]
Dgptp_messages.c27 #define NET_GPTP_INFO(msg, pkt) \ argument
29 struct gptp_hdr *hdr = GPTP_HDR(pkt); \
32 struct gptp_announce *ann = GPTP_ANNOUNCE(pkt); \
42 ntohs(hdr->sequence_id), pkt); \
53 ntohs(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.4.0/tests/net/ipv4_fragment/src/
Dmain.c154 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.4.0/tests/net/dhcpv4/src/
Dmain.c202 struct net_pkt *pkt; in prepare_dhcp_offer() local
204 pkt = net_pkt_alloc_with_buffer(iface, sizeof(offer), AF_INET, in prepare_dhcp_offer()
206 if (!pkt) { in prepare_dhcp_offer()
210 net_pkt_set_ipv4_ttl(pkt, 0xFF); in prepare_dhcp_offer()
212 if (net_ipv4_create(pkt, &server_addr, &client_addr) || in prepare_dhcp_offer()
213 net_udp_create(pkt, htons(SERVER_PORT), htons(CLIENT_PORT))) { in prepare_dhcp_offer()
217 if (net_pkt_write(pkt, offer, 4)) { in prepare_dhcp_offer()
222 if (net_pkt_write_be32(pkt, xid)) { in prepare_dhcp_offer()
226 if (net_pkt_write(pkt, offer + 8, sizeof(offer) - 8)) { in prepare_dhcp_offer()
230 net_pkt_cursor_init(pkt); in prepare_dhcp_offer()
[all …]
/Zephyr-Core-3.4.0/subsys/net/l2/ethernet/
Dethernet.c78 #define print_ll_addrs(pkt, type, len, src, dst) \ argument
87 net_pkt_iface(pkt), out, \
94 #define print_vlan_ll_addrs(pkt, type, tci, len, src, dst, tagstrip) \ argument
104 net_pkt_iface(pkt), out, \
116 struct net_pkt *pkt) in ethernet_update_length() argument
126 if (net_pkt_family(pkt) == AF_INET) { in ethernet_update_length()
127 len = ntohs(NET_IPV4_HDR(pkt)->len); in ethernet_update_length()
129 len = ntohs(NET_IPV6_HDR(pkt)->len) + NET_IPV6H_LEN; in ethernet_update_length()
135 for (frag = pkt->frags; frag; frag = frag->frags) { in ethernet_update_length()
173 enum net_verdict ethernet_check_ipv4_bcast_addr(struct net_pkt *pkt, in ethernet_check_ipv4_bcast_addr() argument
[all …]
/Zephyr-Core-3.4.0/subsys/mgmt/osdp/src/
Dosdp_phy.c70 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.4.0/samples/net/promiscuous_mode/src/
Dmain.c19 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.4.0/subsys/net/l2/canbus/
Dcanbus_raw.c17 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.4.0/subsys/net/l2/ieee802154/
Dieee802154_6lo_fragment.c42 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 …]

1234567891011