xref: /kernel/linux/linux-5.10/net/6lowpan/nhc_fragment.c
  • Home
  • History
  • Annotate Annotate
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
  • only in /kernel/linux/linux-5.10/net/6lowpan/
18c2ecf20Sopenharmony_ci// SPDX-License-Identifier: GPL-2.0-or-later
28c2ecf20Sopenharmony_ci/*
38c2ecf20Sopenharmony_ci *	6LoWPAN IPv6 Fragment Header compression according to RFC6282
48c2ecf20Sopenharmony_ci */
58c2ecf20Sopenharmony_ci
68c2ecf20Sopenharmony_ci#include "nhc.h"
78c2ecf20Sopenharmony_ci
88c2ecf20Sopenharmony_ci#define LOWPAN_NHC_FRAGMENT_IDLEN	1
98c2ecf20Sopenharmony_ci#define LOWPAN_NHC_FRAGMENT_ID_0	0xe4
108c2ecf20Sopenharmony_ci#define LOWPAN_NHC_FRAGMENT_MASK_0	0xfe
118c2ecf20Sopenharmony_ci
128c2ecf20Sopenharmony_cistatic void fragment_nhid_setup(struct lowpan_nhc *nhc)
138c2ecf20Sopenharmony_ci{
148c2ecf20Sopenharmony_ci	nhc->id[0] = LOWPAN_NHC_FRAGMENT_ID_0;
158c2ecf20Sopenharmony_ci	nhc->idmask[0] = LOWPAN_NHC_FRAGMENT_MASK_0;
168c2ecf20Sopenharmony_ci}
178c2ecf20Sopenharmony_ci
188c2ecf20Sopenharmony_ciLOWPAN_NHC(nhc_fragment, "RFC6282 Fragment", NEXTHDR_FRAGMENT, 0,
198c2ecf20Sopenharmony_ci	   fragment_nhid_setup, LOWPAN_NHC_FRAGMENT_IDLEN, NULL, NULL);
208c2ecf20Sopenharmony_ci
218c2ecf20Sopenharmony_cimodule_lowpan_nhc(nhc_fragment);
228c2ecf20Sopenharmony_ciMODULE_DESCRIPTION("6LoWPAN next header RFC6282 Fragment compression");
238c2ecf20Sopenharmony_ciMODULE_LICENSE("GPL");
24

Indexes created Thu Nov 07 10:32:03 CST 2024