ROHC compression/decompression library
|
00001 /* 00002 * Copyright 2012,2013,2014 Didier Barvaux 00003 * Copyright 2013 Viveris Technologies 00004 * 00005 * This library is free software; you can redistribute it and/or 00006 * modify it under the terms of the GNU Lesser General Public 00007 * License as published by the Free Software Foundation; either 00008 * version 2.1 of the License, or (at your option) any later version. 00009 * 00010 * This library is distributed in the hope that it will be useful, 00011 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00012 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00013 * Lesser General Public License for more details. 00014 * 00015 * You should have received a copy of the GNU Lesser General Public 00016 * License along with this library; if not, write to the Free Software 00017 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 00018 */ 00019 00020 /** 00021 * @file ip_numbers.h 00022 * @brief Defines the IPv4 protocol numbers 00023 * @author Free Software Foundation, Inc 00024 * @author Didier Barvaux <didier@barvaux.org> 00025 * 00026 * This file contains some parts from the GNU C library. It is copied here to 00027 * be portable on all platforms, even the platforms that miss the 00028 * declarations or got different declarations, such as Microsoft Windows or 00029 * FreeBSD. 00030 * 00031 * The copyright statement of the GNU C library is: 00032 * Copyright (C) 1991-2001, 2003, 2004, 2006, 2007, 2008, 2011, 2012 00033 * Free Software Foundation, Inc. 00034 */ 00035 00036 #ifndef ROHC_PROTOCOLS_NUMBERS_H 00037 #define ROHC_PROTOCOLS_NUMBERS_H 00038 00039 #ifdef __KERNEL__ 00040 # include <linux/types.h> 00041 #else 00042 # include <stdbool.h> 00043 # include <stdint.h> 00044 #endif 00045 00046 #include "dllexport.h" 00047 00048 00049 /** 00050 * @brief The IP numbers defined by IANA 00051 * 00052 * Full list at: 00053 * http://www.iana.org/assignments/protocol-numbers/protocol-numbers.xml 00054 */ 00055 enum 00056 { 00057 /** The IP protocol number for Hop-by-Hop option */ 00058 ROHC_IPPROTO_HOPOPTS = 0, 00059 /** The IP protocol number for IPv4-in-IPv4 tunnels */ 00060 ROHC_IPPROTO_IPIP = 4, 00061 /** The IP protocol number for Transmission Control Protocol (TCP) */ 00062 ROHC_IPPROTO_TCP = 6, 00063 /** The IP protocol number for the User Datagram Protocol (UDP) */ 00064 ROHC_IPPROTO_UDP = 17, 00065 /** The IP protocol number for IPv6 */ 00066 ROHC_IPPROTO_IPV6 = 41, 00067 /** The IP protocol number for IPv6 routing header */ 00068 ROHC_IPPROTO_ROUTING = 43, 00069 /** The IP protocol number for IPv6 fragment header */ 00070 ROHC_IPPROTO_FRAGMENT = 44, 00071 /** The IP protocol number for Generic Routing Encapsulation (GRE) */ 00072 ROHC_IPPROTO_GRE = 47, 00073 /** The IP protocol number for the Encapsulating Security Payload (ESP) */ 00074 ROHC_IPPROTO_ESP = 50, 00075 /** The IP protocol number for Authentication Header */ 00076 ROHC_IPPROTO_AH = 51, 00077 /** The IP protocol number for Minimal Encapsulation within IP (RFC 2004) */ 00078 ROHC_IPPROTO_MINE = 55, 00079 /** The IP protocol number for IPv6 destination option */ 00080 ROHC_IPPROTO_DSTOPTS = 60, 00081 /** The IP protocol number for Mobility Header */ 00082 ROHC_IPPROTO_MOBILITY = 135, 00083 /** The IP protocol number for UDP-Lite */ 00084 ROHC_IPPROTO_UDPLITE = 136, 00085 /** The IP protocol number for the Host Identity Protocol (HIP) */ 00086 ROHC_IPPROTO_HIP = 139, 00087 /** The IP protocol number for the Shim6 Protocol */ 00088 ROHC_IPPROTO_SHIM = 140, 00089 /** The IP protocol number reserved for experimentation and testing */ 00090 ROHC_IPPROTO_RESERVED1 = 253, 00091 /** The IP protocol number reserved for experimentation and testing */ 00092 ROHC_IPPROTO_RESERVED2 = 254, 00093 }; 00094 00095 00096 bool ROHC_EXPORT rohc_is_tunneling(const uint8_t protocol) 00097 __attribute((warn_unused_result, pure)); 00098 00099 bool ROHC_EXPORT rohc_is_ipv6_opt(const uint8_t protocol) 00100 __attribute((warn_unused_result, pure)); 00101 00102 #endif