ContentType.h 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. /* vim: set expandtab ts=4 sw=4: */
  2. /*
  3. * You may redistribute this program and/or modify it under the terms of
  4. * the GNU General Public License as published by the Free Software Foundation,
  5. * either version 3 of the License, or (at your option) any later version.
  6. *
  7. * This program is distributed in the hope that it will be useful,
  8. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  9. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  10. * GNU General Public License for more details.
  11. *
  12. * You should have received a copy of the GNU General Public License
  13. * along with this program. If not, see <http://www.gnu.org/licenses/>.
  14. */
  15. #ifndef ContentType_H
  16. #define ContentType_H
  17. enum ContentType
  18. {
  19. /**
  20. * The lowest 255 message types are reserved for cjdns/IPv6 packets.
  21. * AKA: packets where the IP address is within the FC00::/8 block.
  22. * Any packet sent in this way will have the IPv6 header deconstructed and this
  23. * field will come from the nextHeader field in the IPv6 header.
  24. */
  25. ContentType_IP6_IP = 0,
  26. ContentType_IP6_ICMP = 1,
  27. ContentType_IP6_IGMP = 2,
  28. ContentType_IP6_IPIP = 4,
  29. ContentType_IP6_TCP = 6,
  30. ContentType_IP6_EGP = 8,
  31. ContentType_IP6_PUP = 12,
  32. ContentType_IP6_UDP = 17,
  33. ContentType_IP6_IDP = 22,
  34. ContentType_IP6_TP = 29,
  35. ContentType_IP6_DCCP = 33,
  36. ContentType_IP6_IPV6 = 41,
  37. ContentType_IP6_RSVP = 46,
  38. ContentType_IP6_GRE = 47,
  39. ContentType_IP6_ESP = 50,
  40. ContentType_IP6_AH = 51,
  41. ContentType_IP6_MTP = 92,
  42. ContentType_IP6_BEETPH = 94,
  43. ContentType_IP6_ENCAP = 98,
  44. ContentType_IP6_PIM = 103,
  45. ContentType_IP6_COMP = 108,
  46. ContentType_IP6_SCTP = 132,
  47. ContentType_IP6_UDPLITE = 136,
  48. ContentType_IP6_RAW = 255,
  49. /** Bencoded inter-router DHT messages. */
  50. ContentType_CJDHT = 256,
  51. ContentType_IPTUN = 257,
  52. /** Reserved for future allocation. */
  53. ContentType_RESERVED = 258,
  54. ContentType_RESERVED_MAX = 0x7fff,
  55. /**
  56. * Content types in the AVAILABLE range are not defined and can be used
  57. * like port numbers for subsystems of cjdns to communicate with subsystems within
  58. * cjdns on other machines, providing they first agree on which numbers to use via
  59. * CTRL messages.
  60. */
  61. ContentType_AVAILABLE = 0x8000,
  62. ContentType_MAX = 0xffff
  63. };
  64. #endif