00001 /* 00002 * Copyright 2010,2012,2013,2014 Didier Barvaux 00003 * Copyright 2010,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 rohc_packets.h 00022 * @brief Definition of ROHC packets and extensions 00023 * @author Didier Barvaux <didier.barvaux@toulouse.viveris.com> 00024 */ 00025 00026 #ifndef ROHC_PACKETS_H 00027 #define ROHC_PACKETS_H 00028 00029 #ifdef __cplusplus 00030 extern "C" 00031 { 00032 #endif 00033 00034 /** Macro that handles DLL export declarations gracefully */ 00035 #ifdef DLL_EXPORT /* passed by autotools on command line */ 00036 # define ROHC_EXPORT __declspec(dllexport) 00037 #else 00038 # define ROHC_EXPORT 00039 #endif 00040 00041 00042 00043 /** 00044 * @brief The different types of ROHC packets 00045 * 00046 * If you add a new packet type, please also add the corresponding textual 00047 * description in \ref rohc_get_packet_descr. 00048 */ 00049 typedef enum 00050 { 00051 /* IR and IR-DYN packets */ 00052 ROHC_PACKET_IR = 0, /**< ROHC IR packet */ 00053 ROHC_PACKET_IR_DYN = 1, /**< ROHC IR-DYN packet */ 00054 00055 /* UO-0 packets */ 00056 ROHC_PACKET_UO_0 = 2, /**< ROHC UO-0 packet */ 00057 00058 /* UO-1 packets */ 00059 ROHC_PACKET_UO_1 = 3, /**< ROHC UO-1 packet (for all non-RTP profiles) */ 00060 ROHC_PACKET_UO_1_ID = 4, /**< ROHC UO-1-ID packet (RTP profile only) */ 00061 ROHC_PACKET_UO_1_TS = 5, /**< ROHC UO-1-TS packet (RTP profile only) */ 00062 ROHC_PACKET_UO_1_RTP = 6, /**< ROHC UO-1-RTP packet (RTP profile only) */ 00063 00064 /* UOR-2 packets */ 00065 ROHC_PACKET_UOR_2 = 7, /**< ROHC UOR-2 packet (for all non-RTP profiles) */ 00066 ROHC_PACKET_UOR_2_RTP = 8, /**< ROHC UO-2 packet (RTP profile only) */ 00067 ROHC_PACKET_UOR_2_ID = 9, /**< ROHC UO-2-ID packet (RTP profile only) */ 00068 ROHC_PACKET_UOR_2_TS = 10, /**< ROHC UO-2-TS packet (RTP profile only) */ 00069 00070 /* values 11 and 12 were used by CCE packets of the UDP-Lite profile */ 00071 00072 /* Normal packet (Uncompressed profile only) */ 00073 ROHC_PACKET_NORMAL = 13, /**< ROHC Normal packet (Uncompressed profile only) */ 00074 00075 ROHC_PACKET_UNKNOWN = 14, /**< Unknown packet type */ 00076 00077 /* packets for TCP profile */ 00078 ROHC_PACKET_TCP_CO_COMMON = 15, /**< TCP co_common packet */ 00079 ROHC_PACKET_TCP_RND_1 = 16, /**< TCP rnd_1 packet */ 00080 ROHC_PACKET_TCP_RND_2 = 17, /**< TCP rnd_2 packet */ 00081 ROHC_PACKET_TCP_RND_3 = 18, /**< TCP rnd_3 packet */ 00082 ROHC_PACKET_TCP_RND_4 = 19, /**< TCP rnd_4 packet */ 00083 ROHC_PACKET_TCP_RND_5 = 20, /**< TCP rnd_5 packet */ 00084 ROHC_PACKET_TCP_RND_6 = 21, /**< TCP rnd_6 packet */ 00085 ROHC_PACKET_TCP_RND_7 = 22, /**< TCP rnd_7 packet */ 00086 ROHC_PACKET_TCP_RND_8 = 23, /**< TCP rnd_8 packet */ 00087 ROHC_PACKET_TCP_SEQ_1 = 24, /**< TCP seq_1 packet */ 00088 ROHC_PACKET_TCP_SEQ_2 = 25, /**< TCP seq_2 packet */ 00089 ROHC_PACKET_TCP_SEQ_3 = 26, /**< TCP seq_3 packet */ 00090 ROHC_PACKET_TCP_SEQ_4 = 27, /**< TCP seq_4 packet */ 00091 ROHC_PACKET_TCP_SEQ_5 = 28, /**< TCP seq_5 packet */ 00092 ROHC_PACKET_TCP_SEQ_6 = 29, /**< TCP seq_6 packet */ 00093 ROHC_PACKET_TCP_SEQ_7 = 30, /**< TCP seq_7 packet */ 00094 ROHC_PACKET_TCP_SEQ_8 = 31, /**< TCP seq_8 packet */ 00095 00096 ROHC_PACKET_MAX /**< The number of packet types */ 00097 } rohc_packet_t; 00098 00099 00100 /** 00101 * @brief The different types of extensions for UO-1-ID and UOR-2* packets 00102 * 00103 * If you add a new extension type, please also add the corresponding textual 00104 * description in \ref rohc_get_ext_descr. 00105 */ 00106 typedef enum 00107 { 00108 ROHC_EXT_0 = 0, /**< The EXT-0 extension for UO-1-ID/UOR-2* packets */ 00109 ROHC_EXT_1 = 1, /**< The EXT-1 extension for UO-1-ID/UOR-2* packets */ 00110 ROHC_EXT_2 = 2, /**< The EXT-2 extension for UO-1-ID/UOR-2* packets */ 00111 ROHC_EXT_3 = 3, /**< The EXT-3 extension for UO-1-ID/UOR-2* packets */ 00112 ROHC_EXT_NONE = 4, /**< No extension for UO-1-ID/UOR-2* packets */ 00113 ROHC_EXT_UNKNOWN = 5, /**< Unknown packet extension type */ 00114 } rohc_ext_t; 00115 00116 00117 /* 00118 * Prototypes of public functions 00119 */ 00120 00121 const char * ROHC_EXPORT rohc_get_packet_descr(const rohc_packet_t packet_type) 00122 __attribute__((warn_unused_result, const)); 00123 00124 const char * ROHC_EXPORT rohc_get_ext_descr(const rohc_ext_t ext_type) 00125 __attribute__((warn_unused_result, const)); 00126 00127 rohc_packet_t ROHC_EXPORT rohc_get_packet_type(const char *const packet_id) 00128 __attribute__((warn_unused_result, nonnull(1))); 00129 00130 00131 #undef ROHC_EXPORT /* do not pollute outside this header */ 00132 00133 #ifdef __cplusplus 00134 } 00135 #endif 00136 00137 #endif /* ROHC_PACKETS_H */ 00138
1.6.1