xref: /linux/net/6lowpan/nhc_ghc_ext_frag.c (revision 2f4799478c94928802c79edd12711a0e9e8b6f1b)
1*2f479947SStefan Schmidt /*
2*2f479947SStefan Schmidt  *	6LoWPAN Extension Header compression according to RFC7400
3*2f479947SStefan Schmidt  *
4*2f479947SStefan Schmidt  *	This program is free software; you can redistribute it and/or
5*2f479947SStefan Schmidt  *	modify it under the terms of the GNU General Public License
6*2f479947SStefan Schmidt  *	as published by the Free Software Foundation; either version
7*2f479947SStefan Schmidt  *	2 of the License, or (at your option) any later version.
8*2f479947SStefan Schmidt  */
9*2f479947SStefan Schmidt 
10*2f479947SStefan Schmidt #include "nhc.h"
11*2f479947SStefan Schmidt 
12*2f479947SStefan Schmidt #define LOWPAN_GHC_EXT_FRAG_IDLEN	1
13*2f479947SStefan Schmidt #define LOWPAN_GHC_EXT_FRAG_ID_0	0xb4
14*2f479947SStefan Schmidt #define LOWPAN_GHC_EXT_FRAG_MASK_0	0xfe
15*2f479947SStefan Schmidt 
16*2f479947SStefan Schmidt static void frag_ghid_setup(struct lowpan_nhc *nhc)
17*2f479947SStefan Schmidt {
18*2f479947SStefan Schmidt 	nhc->id[0] = LOWPAN_GHC_EXT_FRAG_ID_0;
19*2f479947SStefan Schmidt 	nhc->idmask[0] = LOWPAN_GHC_EXT_FRAG_MASK_0;
20*2f479947SStefan Schmidt }
21*2f479947SStefan Schmidt 
22*2f479947SStefan Schmidt LOWPAN_NHC(ghc_ext_frag, "RFC7400 Fragmentation Extension Header",
23*2f479947SStefan Schmidt 	   NEXTHDR_FRAGMENT, 0, frag_ghid_setup,
24*2f479947SStefan Schmidt 	   LOWPAN_GHC_EXT_FRAG_IDLEN, NULL, NULL);
25*2f479947SStefan Schmidt 
26*2f479947SStefan Schmidt module_lowpan_nhc(ghc_ext_frag);
27*2f479947SStefan Schmidt MODULE_DESCRIPTION("6LoWPAN generic header fragmentation extension compression");
28*2f479947SStefan Schmidt MODULE_LICENSE("GPL");
29