ROHC compression/decompression library
rohc_packets.h
Go to the documentation of this file.
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 #define PACKET_IR ROHC_PACKET_IR /**< deprecated, for compat only */
00054         ROHC_PACKET_IR_DYN    =  1, /**< ROHC IR-DYN packet */
00055 #define PACKET_IR_DYN ROHC_PACKET_IR_DYN /**< deprecated, for compat only */
00056 
00057         /* UO-0 packets */
00058         ROHC_PACKET_UO_0      =  2, /**< ROHC UO-0 packet */
00059 #define PACKET_UO_0 ROHC_PACKET_UO_0 /**< deprecated, for compat only */
00060 
00061         /* UO-1 packets */
00062         ROHC_PACKET_UO_1      =  3, /**< ROHC UO-1 packet (for all non-RTP profiles) */
00063 #define PACKET_UO_1 ROHC_PACKET_UO_1 /**< deprecated, for compat only */
00064         ROHC_PACKET_UO_1_ID   =  4, /**< ROHC UO-1-ID packet (RTP profile only) */
00065 #define PACKET_UO_1_ID ROHC_PACKET_UO_1_ID /**< deprecated, for compat only */
00066         ROHC_PACKET_UO_1_TS   =  5, /**< ROHC UO-1-TS packet (RTP profile only) */
00067 #define PACKET_UO_1_TS ROHC_PACKET_UO_1_TS /**< deprecated, for compat only */
00068         ROHC_PACKET_UO_1_RTP  =  6, /**< ROHC UO-1-RTP packet (RTP profile only) */
00069 #define PACKET_UO_1_RTP ROHC_PACKET_UO_1_RTP /**< deprecated, for compat only */
00070 
00071         /* UOR-2 packets */
00072         ROHC_PACKET_UOR_2     =  7, /**< ROHC UOR-2 packet (for all non-RTP profiles) */
00073 #define PACKET_UOR_2 ROHC_PACKET_UOR_2 /**< deprecated, for compat only */
00074         ROHC_PACKET_UOR_2_RTP =  8, /**< ROHC UO-2 packet (RTP profile only) */
00075 #define PACKET_UOR_2_RTP ROHC_PACKET_UOR_2_RTP /**< deprecated, for compat only */
00076         ROHC_PACKET_UOR_2_ID  =  9, /**< ROHC UO-2-ID packet (RTP profile only) */
00077 #define PACKET_UOR_2_ID ROHC_PACKET_UOR_2_ID /**< deprecated, for compat only */
00078         ROHC_PACKET_UOR_2_TS  = 10, /**< ROHC UO-2-TS packet (RTP profile only) */
00079 #define PACKET_UOR_2_TS ROHC_PACKET_UOR_2_TS /**< deprecated, for compat only */
00080 
00081         /* CCE packets (UDP-Lite profile only) */
00082         ROHC_PACKET_CCE       = 11, /**< ROHC CCE packet (UDP-Lite profile only) */
00083 #define PACKET_CCE ROHC_PACKET_CCE /**< deprecated, for compat only */
00084         ROHC_PACKET_CCE_OFF   = 12, /**< ROHC CCE(OFF) packet (UDP-Lite profile only) */
00085 #define PACKET_CCE_OFF ROHC_PACKET_CCE_OFF /**< deprecated, for compat only */
00086 
00087         /* Normal packet (Uncompressed profile only) */
00088         ROHC_PACKET_NORMAL    = 13, /**< ROHC Normal packet (Uncompressed profile only) */
00089 #define PACKET_NORMAL ROHC_PACKET_NORMAL /**< deprecated, for compat only */
00090 
00091         ROHC_PACKET_UNKNOWN   = 14, /**< Unknown packet type */
00092 #define PACKET_UNKNOWN ROHC_PACKET_UNKNOWN /**< deprecated, for compat only */
00093 
00094         /* packets for TCP profile */
00095         ROHC_PACKET_TCP_CO_COMMON = 15, /**< TCP co_common packet */
00096         ROHC_PACKET_TCP_RND_1     = 16, /**< TCP rnd_1 packet */
00097         ROHC_PACKET_TCP_RND_2     = 17, /**< TCP rnd_2 packet */
00098         ROHC_PACKET_TCP_RND_3     = 18, /**< TCP rnd_3 packet */
00099         ROHC_PACKET_TCP_RND_4     = 19, /**< TCP rnd_4 packet */
00100         ROHC_PACKET_TCP_RND_5     = 20, /**< TCP rnd_5 packet */
00101         ROHC_PACKET_TCP_RND_6     = 21, /**< TCP rnd_6 packet */
00102         ROHC_PACKET_TCP_RND_7     = 22, /**< TCP rnd_7 packet */
00103         ROHC_PACKET_TCP_RND_8     = 23, /**< TCP rnd_8 packet */
00104         ROHC_PACKET_TCP_SEQ_1     = 24, /**< TCP seq_1 packet */
00105         ROHC_PACKET_TCP_SEQ_2     = 25, /**< TCP seq_2 packet */
00106         ROHC_PACKET_TCP_SEQ_3     = 26, /**< TCP seq_3 packet */
00107         ROHC_PACKET_TCP_SEQ_4     = 27, /**< TCP seq_4 packet */
00108         ROHC_PACKET_TCP_SEQ_5     = 28, /**< TCP seq_5 packet */
00109         ROHC_PACKET_TCP_SEQ_6     = 29, /**< TCP seq_6 packet */
00110         ROHC_PACKET_TCP_SEQ_7     = 30, /**< TCP seq_7 packet */
00111         ROHC_PACKET_TCP_SEQ_8     = 31, /**< TCP seq_8 packet */
00112 
00113 } rohc_packet_t;
00114 
00115 
00116 /**
00117  * @brief The different types of extensions for UO-1-ID and UOR-2* packets
00118  *
00119  * If you add a new extension type, please also add the corresponding textual
00120  * description in \ref rohc_get_ext_descr.
00121  */
00122 typedef enum
00123 {
00124         ROHC_EXT_0       = 0,  /**< The EXT-0 extension for UO-1-ID/UOR-2* packets */
00125 #define PACKET_EXT_0 ROHC_EXT_0 /**< deprecated, for compat only */
00126         ROHC_EXT_1       = 1,  /**< The EXT-1 extension for UO-1-ID/UOR-2* packets */
00127 #define PACKET_EXT_1 ROHC_EXT_1 /**< deprecated, for compat only */
00128         ROHC_EXT_2       = 2,  /**< The EXT-2 extension for UO-1-ID/UOR-2* packets */
00129 #define PACKET_EXT_2 ROHC_EXT_2 /**< deprecated, for compat only */
00130         ROHC_EXT_3       = 3,  /**< The EXT-3 extension for UO-1-ID/UOR-2* packets */
00131 #define PACKET_EXT_3 ROHC_EXT_3 /**< deprecated, for compat only */
00132         ROHC_EXT_NONE    = 4,  /**< No extension for UO-1-ID/UOR-2* packets */
00133 #define PACKET_NOEXT ROHC_EXT_NONE /**< deprecated, for compat only */
00134         ROHC_EXT_UNKNOWN = 5,  /**< Unknown packet extension type */
00135 #define PACKET_EXT_UNKNOWN ROHC_EXT_UNKNOWN /**< deprecated, for compat only */
00136 } rohc_ext_t;
00137 
00138 
00139 /*
00140  * Prototypes of public functions
00141  */
00142 
00143 const char * ROHC_EXPORT rohc_get_packet_descr(const rohc_packet_t packet_type);
00144 
00145 const char * ROHC_EXPORT rohc_get_ext_descr(const rohc_ext_t ext_type);
00146 
00147 
00148 #undef ROHC_EXPORT /* do not pollute outside this header */
00149 
00150 #ifdef __cplusplus
00151 }
00152 #endif
00153 
00154 #endif /* ROHC_PACKETS_H */
00155