Lines Matching refs:uh
39 struct udphdr uh; in udp_uncompress() local
48 fail |= lowpan_fetch_skb(skb, &uh.source, sizeof(uh.source)); in udp_uncompress()
49 fail |= lowpan_fetch_skb(skb, &uh.dest, sizeof(uh.dest)); in udp_uncompress()
52 fail |= lowpan_fetch_skb(skb, &uh.source, sizeof(uh.source)); in udp_uncompress()
54 uh.dest = htons(val + LOWPAN_NHC_UDP_8BIT_PORT); in udp_uncompress()
58 uh.source = htons(val + LOWPAN_NHC_UDP_8BIT_PORT); in udp_uncompress()
59 fail |= lowpan_fetch_skb(skb, &uh.dest, sizeof(uh.dest)); in udp_uncompress()
63 uh.source = htons(LOWPAN_NHC_UDP_4BIT_PORT + (val >> 4)); in udp_uncompress()
64 uh.dest = htons(LOWPAN_NHC_UDP_4BIT_PORT + (val & 0x0f)); in udp_uncompress()
71 ntohs(uh.source), ntohs(uh.dest)); in udp_uncompress()
78 fail |= lowpan_fetch_skb(skb, &uh.check, sizeof(uh.check)); in udp_uncompress()
91 uh.len = htons(lowpan_802154_cb(skb)->d_size - in udp_uncompress()
94 uh.len = htons(skb->len + sizeof(struct udphdr)); in udp_uncompress()
97 uh.len = htons(skb->len + sizeof(struct udphdr)); in udp_uncompress()
100 pr_debug("uncompressed UDP length: src = %d", ntohs(uh.len)); in udp_uncompress()
110 skb_copy_to_linear_data(skb, &uh, sizeof(struct udphdr)); in udp_uncompress()
117 const struct udphdr *uh = udp_hdr(skb); in udp_compress() local
120 if (((ntohs(uh->source) & LOWPAN_NHC_UDP_4BIT_MASK) == in udp_compress()
122 ((ntohs(uh->dest) & LOWPAN_NHC_UDP_4BIT_MASK) == in udp_compress()
129 tmp = ntohs(uh->dest) - LOWPAN_NHC_UDP_4BIT_PORT + in udp_compress()
130 ((ntohs(uh->source) - LOWPAN_NHC_UDP_4BIT_PORT) << 4); in udp_compress()
132 } else if ((ntohs(uh->dest) & LOWPAN_NHC_UDP_8BIT_MASK) == in udp_compress()
139 lowpan_push_hc_data(hc_ptr, &uh->source, sizeof(uh->source)); in udp_compress()
141 tmp = ntohs(uh->dest) - LOWPAN_NHC_UDP_8BIT_PORT; in udp_compress()
143 } else if ((ntohs(uh->source) & LOWPAN_NHC_UDP_8BIT_MASK) == in udp_compress()
150 tmp = ntohs(uh->source) - LOWPAN_NHC_UDP_8BIT_PORT; in udp_compress()
153 lowpan_push_hc_data(hc_ptr, &uh->dest, sizeof(uh->dest)); in udp_compress()
160 lowpan_push_hc_data(hc_ptr, &uh->source, sizeof(uh->source)); in udp_compress()
162 lowpan_push_hc_data(hc_ptr, &uh->dest, sizeof(uh->dest)); in udp_compress()
166 lowpan_push_hc_data(hc_ptr, &uh->check, sizeof(uh->check)); in udp_compress()