Lines Matching refs:udp
593 static inline uint8_t *compress_nh_udp(struct net_udp_hdr *udp, uint8_t *inline_ptr, in compress_nh_udp() argument
620 inline_ptr_udp -= sizeof(udp->chksum); in compress_nh_udp()
621 memmove(inline_ptr_udp, &udp->chksum, sizeof(udp->chksum)); in compress_nh_udp()
624 if ((((htons(udp->src_port) >> 4) & 0xFFF) == in compress_nh_udp()
626 (((htons(udp->dst_port) >> 4) & 0xFFF) == in compress_nh_udp()
635 tmp = (uint8_t)(htons(udp->src_port)); in compress_nh_udp()
638 tmp |= (((uint8_t)(htons(udp->dst_port))) & 0x0F); in compress_nh_udp()
642 } else if (((htons(udp->dst_port) >> 8) & 0xFF) == in compress_nh_udp()
652 *inline_ptr_udp = (uint8_t)(htons(udp->dst_port)); in compress_nh_udp()
654 inline_ptr_udp -= sizeof(udp->src_port); in compress_nh_udp()
655 memmove(inline_ptr_udp, &udp->src_port, sizeof(udp->src_port)); in compress_nh_udp()
657 } else if (((htons(udp->src_port) >> 8) & 0xFF) == in compress_nh_udp()
666 inline_ptr_udp -= sizeof(udp->dst_port); in compress_nh_udp()
667 memmove(inline_ptr_udp, &udp->dst_port, sizeof(udp->dst_port)); in compress_nh_udp()
670 *inline_ptr_udp = (uint8_t)(htons(udp->src_port)); in compress_nh_udp()
676 inline_ptr_udp -= sizeof(udp->dst_port) + sizeof(udp->src_port); in compress_nh_udp()
677 memmove(inline_ptr_udp, &udp->src_port, in compress_nh_udp()
678 sizeof(udp->dst_port) + sizeof(udp->src_port)); in compress_nh_udp()
737 struct net_udp_hdr *udp; in compress_IPHC_header() local
756 udp = (struct net_udp_hdr *)inline_pos; in compress_IPHC_header()
759 inline_pos = compress_nh_udp(udp, inline_pos, false); in compress_IPHC_header()
1260 struct net_udp_hdr *udp) in uncompress_nh_udp() argument
1275 memmove(&udp->src_port, cursor, sizeof(udp->src_port)); in uncompress_nh_udp()
1276 cursor += sizeof(udp->src_port); in uncompress_nh_udp()
1277 memmove(&udp->dst_port, cursor, sizeof(udp->dst_port)); in uncompress_nh_udp()
1278 cursor += sizeof(udp->dst_port); in uncompress_nh_udp()
1284 memmove(&udp->src_port, cursor, sizeof(udp->src_port)); in uncompress_nh_udp()
1285 cursor += sizeof(udp->src_port); in uncompress_nh_udp()
1286 udp->dst_port = htons(((uint16_t)NET_6LO_NHC_UDP_8_BIT_PORT << 8) | in uncompress_nh_udp()
1294 udp->src_port = htons(((uint16_t)NET_6LO_NHC_UDP_8_BIT_PORT << 8) | in uncompress_nh_udp()
1297 memmove(&udp->dst_port, cursor, sizeof(udp->dst_port)); in uncompress_nh_udp()
1298 cursor += sizeof(udp->dst_port); in uncompress_nh_udp()
1304 udp->src_port = htons((NET_6LO_NHC_UDP_4_BIT_PORT << 4) | in uncompress_nh_udp()
1307 udp->dst_port = htons((NET_6LO_NHC_UDP_4_BIT_PORT << 4) | in uncompress_nh_udp()
1315 memmove(&udp->chksum, cursor, sizeof(udp->chksum)); in uncompress_nh_udp()
1316 cursor += sizeof(udp->chksum); in uncompress_nh_udp()
1349 struct net_udp_hdr *udp = NULL; in uncompress_IPHC_header() local
1497 udp = (struct net_udp_hdr *)(frag->data + NET_IPV6H_LEN); in uncompress_IPHC_header()
1500 cursor = uncompress_nh_udp(nhc, cursor, udp); in uncompress_IPHC_header()
1512 if (ipv6->nexthdr == IPPROTO_UDP && udp) { in uncompress_IPHC_header()
1513 udp->len = htons(len); in uncompress_IPHC_header()
1516 udp->chksum = net_calc_chksum_udp(pkt); in uncompress_IPHC_header()