Lines Matching refs:nhc
20 const struct lowpan_nhc *nhc; in lowpan_nhc_by_nhcid() local
30 nhc = lowpan_nexthdr_nhcs[i]; in lowpan_nhc_by_nhcid()
31 if (!nhc) in lowpan_nhc_by_nhcid()
34 if ((id & nhc->idmask) == nhc->id) in lowpan_nhc_by_nhcid()
35 return nhc; in lowpan_nhc_by_nhcid()
44 const struct lowpan_nhc *nhc; in lowpan_nhc_check_compression() local
49 nhc = lowpan_nexthdr_nhcs[hdr->nexthdr]; in lowpan_nhc_check_compression()
50 if (!(nhc && nhc->compress)) in lowpan_nhc_check_compression()
62 const struct lowpan_nhc *nhc; in lowpan_nhc_do_compression() local
66 nhc = lowpan_nexthdr_nhcs[hdr->nexthdr]; in lowpan_nhc_do_compression()
77 if (unlikely(!nhc || !nhc->compress)) { in lowpan_nhc_do_compression()
88 ret = nhc->compress(skb, hc_ptr); in lowpan_nhc_do_compression()
93 skb_pull(skb, nhc->nexthdrlen); in lowpan_nhc_do_compression()
105 const struct lowpan_nhc *nhc; in lowpan_nhc_do_uncompression() local
110 nhc = lowpan_nhc_by_nhcid(skb); in lowpan_nhc_do_uncompression()
111 if (nhc) { in lowpan_nhc_do_uncompression()
112 if (nhc->uncompress) { in lowpan_nhc_do_uncompression()
113 ret = nhc->uncompress(skb, sizeof(struct ipv6hdr) + in lowpan_nhc_do_uncompression()
114 nhc->nexthdrlen); in lowpan_nhc_do_uncompression()
122 nhc->name); in lowpan_nhc_do_uncompression()
131 hdr->nexthdr = nhc->nexthdr; in lowpan_nhc_do_uncompression()
134 skb_transport_header(skb), nhc->nexthdrlen); in lowpan_nhc_do_uncompression()
141 int lowpan_nhc_add(const struct lowpan_nhc *nhc) in lowpan_nhc_add() argument
147 if (lowpan_nexthdr_nhcs[nhc->nexthdr]) { in lowpan_nhc_add()
152 lowpan_nexthdr_nhcs[nhc->nexthdr] = nhc; in lowpan_nhc_add()
159 void lowpan_nhc_del(const struct lowpan_nhc *nhc) in lowpan_nhc_del() argument
163 lowpan_nexthdr_nhcs[nhc->nexthdr] = NULL; in lowpan_nhc_del()