ROHC compression/decompression library
rohc_packets.h
Go to the documentation of this file.
00001 /*
00002  * This program is free software; you can redistribute it and/or modify
00003  * it under the terms of the GNU General Public License as published by
00004  * the Free Software Foundation; either version 2 of the License, or
00005  * (at your option) any later version.
00006  *
00007  * This program is distributed in the hope that it will be useful,
00008  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00009  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00010  * GNU General Public License for more details.
00011  *
00012  * You should have received a copy of the GNU General Public License
00013  * along with this program; if not, write to the Free Software
00014  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00015  */
00016 
00017 /**
00018  * @file    rohc_packets.h
00019  * @brief   Definition of ROHC packets and extensions
00020  * @author  Didier Barvaux <didier.barvaux@toulouse.viveris.com>
00021  */
00022 
00023 #ifndef ROHC_PACKETS_H
00024 #define ROHC_PACKETS_H
00025 
00026 
00027 /** Macro that handles DLL export declarations gracefully */
00028 #ifdef DLL_EXPORT /* passed by autotools on command line */
00029         #define ROHC_EXPORT __declspec(dllexport)
00030 #else
00031         #define ROHC_EXPORT 
00032 #endif
00033 
00034 
00035 
00036 /**
00037  * @brief The different types of ROHC packets
00038  *
00039  * If you add a new packet type, please also add the corresponding textual
00040  * description in \ref rohc_get_packet_descr.
00041  */
00042 typedef enum
00043 {
00044         /* IR and IR-DYN packets */
00045         PACKET_IR        =  0, /**< ROHC IR packet */
00046         PACKET_IR_DYN    =  1, /**< ROHC IR-DYN packet */
00047 
00048         /* UO-0 packets */
00049         PACKET_UO_0      =  2, /**< ROHC UO-0 packet */
00050 
00051         /* UO-1 packets */
00052         PACKET_UO_1      =  3, /**< ROHC UO-1 packet (for all non-RTP profiles) */
00053         PACKET_UO_1_ID   =  4, /**< ROHC UO-1-ID packet (RTP profile only) */
00054         PACKET_UO_1_TS   =  5, /**< ROHC UO-1-TS packet (RTP profile only) */
00055         PACKET_UO_1_RTP  =  6, /**< ROHC UO-1-RTP packet (RTP profile only) */
00056 
00057         /* UOR-2 packets */
00058         PACKET_UOR_2     =  7, /**< ROHC UOR-2 packet (for all non-RTP profiles) */
00059         PACKET_UOR_2_RTP =  8, /**< ROHC UO-2 packet (RTP profile only) */
00060         PACKET_UOR_2_ID  =  9, /**< ROHC UO-2-ID packet (RTP profile only) */
00061         PACKET_UOR_2_TS  = 10, /**< ROHC UO-2-TS packet (RTP profile only) */
00062 
00063         /* CCE packets (UDP-Lite profile only) */
00064         PACKET_CCE       = 11, /**< ROHC CCE packet (UDP-Lite profile only) */
00065         PACKET_CCE_OFF   = 12, /**< ROHC CCE(OFF) packet (UDP-Lite profile only) */
00066 
00067         /* Normal packet (Uncompressed profile only) */
00068         PACKET_NORMAL    = 13, /**< ROHC Normal packet (Uncompressed profile only) */
00069 
00070         PACKET_UNKNOWN   = 14, /**< Unknown packet type */
00071 
00072 } rohc_packet_t;
00073 
00074 
00075 /**
00076  * @brief The different types of extensions for UO-1-ID and UOR-2* packets
00077  *
00078  * If you add a new extension type, please also add the corresponding textual
00079  * description in \ref rohc_get_ext_descr.
00080  */
00081 typedef enum
00082 {
00083         PACKET_EXT_0 = 0,  /**< The EXT-0 extension for UO-1-ID/UOR-2* packets */
00084         PACKET_EXT_1 = 1,  /**< The EXT-1 extension for UO-1-ID/UOR-2* packets */
00085         PACKET_EXT_2 = 2,  /**< The EXT-2 extension for UO-1-ID/UOR-2* packets */
00086         PACKET_EXT_3 = 3,  /**< The EXT-3 extension for UO-1-ID/UOR-2* packets */
00087         PACKET_NOEXT = 4,  /**< No extension for UO-1-ID/UOR-2* packets */
00088         PACKET_EXT_UNKNOWN = 5, /**< Unknown packet extension type */
00089 } rohc_ext_t;
00090 
00091 
00092 /*
00093  * Prototypes of public functions
00094  */
00095 
00096 const char * ROHC_EXPORT rohc_get_packet_descr(const rohc_packet_t packet_type);
00097 
00098 const char * ROHC_EXPORT rohc_get_ext_descr(const rohc_ext_t ext_type);
00099 
00100 
00101 #undef ROHC_EXPORT /* do not pollute outside this header */
00102 
00103 #endif
00104