Lines Matching refs:reass

205 static void reassembly_info(char *str, struct net_ipv6_reassembly *reass)  in reassembly_info()  argument
207 NET_DBG("%s id 0x%x src %s dst %s remain %d ms", str, reass->id, in reassembly_info()
208 net_sprint_ipv6_addr(&reass->src), in reassembly_info()
209 net_sprint_ipv6_addr(&reass->dst), in reassembly_info()
211 k_work_delayable_remaining_get(&reass->timer))); in reassembly_info()
217 struct net_ipv6_reassembly *reass = in reassembly_timeout() local
220 reassembly_info("Reassembly cancelled", reass); in reassembly_timeout()
223 if (reass->pkt[0] && net_pkt_ipv6_fragment_offset(reass->pkt[0]) == 0) { in reassembly_timeout()
224 net_icmpv6_send_error(reass->pkt[0], NET_ICMPV6_TIME_EXCEEDED, 1, 0); in reassembly_timeout()
227 reassembly_cancel(reass->id, &reass->src, &reass->dst); in reassembly_timeout()
230 static void reassemble_packet(struct net_ipv6_reassembly *reass) in reassemble_packet() argument
244 k_work_cancel_delayable(&reass->timer); in reassemble_packet()
246 NET_ASSERT(reass->pkt[0]); in reassemble_packet()
248 last = net_buf_frag_last(reass->pkt[0]->buffer); in reassemble_packet()
256 pkt = reass->pkt[i]; in reassemble_packet()
274 reassembly_cancel(reass->id, &reass->src, &reass->dst); in reassemble_packet()
283 reass->pkt[i] = NULL; in reassemble_packet()
288 pkt = reass->pkt[0]; in reassemble_packet()
289 reass->pkt[0] = NULL; in reassemble_packet()
379 static int fragments_are_ready(struct net_ipv6_reassembly *reass) in fragments_are_ready() argument
395 struct net_pkt *pkt = reass->pkt[i]; in fragments_are_ready()
432 static int shift_packets(struct net_ipv6_reassembly *reass, int pos) in shift_packets() argument
437 if (!reass->pkt[i]) { in shift_packets()
439 pos, reass->pkt[pos], in shift_packets()
440 net_pkt_ipv6_fragment_offset(reass->pkt[pos]), in shift_packets()
446 memmove(&reass->pkt[pos + 1], &reass->pkt[pos], in shift_packets()
450 reass->pkt[pos] = NULL; in shift_packets()
464 struct net_ipv6_reassembly *reass = NULL; in net_ipv6_handle_fragment_hdr() local
495 reass = reassembly_get(id, (struct in6_addr *)hdr->src, in net_ipv6_handle_fragment_hdr()
497 if (!reass) { in net_ipv6_handle_fragment_hdr()
519 if (reass->pkt[i]) { in net_ipv6_handle_fragment_hdr()
520 if (net_pkt_ipv6_fragment_offset(reass->pkt[i]) < in net_ipv6_handle_fragment_hdr()
528 if (shift_packets(reass, i)) { in net_ipv6_handle_fragment_hdr()
535 reass->pkt[i] = pkt; in net_ipv6_handle_fragment_hdr()
545 NET_DBG("No slots available for 0x%x", reass->id); in net_ipv6_handle_fragment_hdr()
550 ret = fragments_are_ready(reass); in net_ipv6_handle_fragment_hdr()
553 reass->id); in net_ipv6_handle_fragment_hdr()
557 reass->pkt[i] = NULL; in net_ipv6_handle_fragment_hdr()
563 reassembly_info("Reassembly nth pkt", reass); in net_ipv6_handle_fragment_hdr()
569 reassembly_info("Reassembly last pkt", reass); in net_ipv6_handle_fragment_hdr()
572 reassemble_packet(reass); in net_ipv6_handle_fragment_hdr()
578 if (reass) { in net_ipv6_handle_fragment_hdr()
579 if (reassembly_cancel(reass->id, &reass->src, &reass->dst)) { in net_ipv6_handle_fragment_hdr()