Lines Matching refs:orig
190 int net_icmpv6_send_error(struct net_pkt *orig, uint8_t type, uint8_t code, in net_icmpv6_send_error() argument
201 net_pkt_cursor_init(orig); in net_icmpv6_send_error()
203 ip_hdr = (struct net_ipv6_hdr *)net_pkt_get_data(orig, &ipv6_access); in net_icmpv6_send_error()
213 net_pkt_acknowledge_data(orig, &ipv6_access); in net_icmpv6_send_error()
216 orig, &icmpv6_access); in net_icmpv6_send_error()
223 net_pkt_cursor_init(orig); in net_icmpv6_send_error()
233 copy_len = net_pkt_get_len(orig); in net_icmpv6_send_error()
236 pkt = net_pkt_alloc_with_buffer(net_pkt_iface(orig), in net_icmpv6_send_error()
237 net_pkt_lladdr_src(orig)->len * 2 + in net_icmpv6_send_error()
260 ret = net_pkt_write(pkt, net_pkt_lladdr_src(orig)->addr, in net_icmpv6_send_error()
261 net_pkt_lladdr_src(orig)->len); in net_icmpv6_send_error()
269 ret = net_pkt_write(pkt, net_pkt_lladdr_dst(orig)->addr, in net_icmpv6_send_error()
270 net_pkt_lladdr_dst(orig)->len); in net_icmpv6_send_error()
276 net_buf_pull_mem(pkt->buffer, net_pkt_lladdr_dst(orig)->len); in net_icmpv6_send_error()
280 net_buf_pull_mem(pkt->buffer, net_pkt_lladdr_src(orig)->len); in net_icmpv6_send_error()
282 net_pkt_lladdr_src(pkt)->len = net_pkt_lladdr_dst(orig)->len; in net_icmpv6_send_error()
283 net_pkt_lladdr_dst(pkt)->len = net_pkt_lladdr_src(orig)->len; in net_icmpv6_send_error()
310 if (err || net_pkt_copy(pkt, orig, copy_len)) { in net_icmpv6_send_error()
331 net_stats_update_icmp_drop(net_pkt_iface(orig)); in net_icmpv6_send_error()