nhc_dest.c 860 B

12345678910111213141516171819202122232425262728
  1. /*
  2. * 6LoWPAN IPv6 Destination Options Header compression according to
  3. * RFC6282
  4. *
  5. * This program is free software; you can redistribute it and/or
  6. * modify it under the terms of the GNU General Public License
  7. * as published by the Free Software Foundation; either version
  8. * 2 of the License, or (at your option) any later version.
  9. */
  10. #include "nhc.h"
  11. #define LOWPAN_NHC_DEST_IDLEN 1
  12. #define LOWPAN_NHC_DEST_ID_0 0xe6
  13. #define LOWPAN_NHC_DEST_MASK_0 0xfe
  14. static void dest_nhid_setup(struct lowpan_nhc *nhc)
  15. {
  16. nhc->id[0] = LOWPAN_NHC_DEST_ID_0;
  17. nhc->idmask[0] = LOWPAN_NHC_DEST_MASK_0;
  18. }
  19. LOWPAN_NHC(nhc_dest, "RFC6282 Destination Options", NEXTHDR_DEST, 0,
  20. dest_nhid_setup, LOWPAN_NHC_DEST_IDLEN, NULL, NULL);
  21. module_lowpan_nhc(nhc_dest);
  22. MODULE_DESCRIPTION("6LoWPAN next header RFC6282 Destination Options compression");
  23. MODULE_LICENSE("GPL");