ROHC compression/decompression library
|
00001 /* 00002 * Copyright 2007,2008 CNES 00003 * Copyright 2011,2012,2013 Didier Barvaux 00004 * Copyright 2007,2008 Thales Alenia Space 00005 * Copyright 2007,2010 Viveris Technologies 00006 * 00007 * This library is free software; you can redistribute it and/or 00008 * modify it under the terms of the GNU Lesser General Public 00009 * License as published by the Free Software Foundation; either 00010 * version 2.1 of the License, or (at your option) any later version. 00011 * 00012 * This library is distributed in the hope that it will be useful, 00013 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00014 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00015 * Lesser General Public License for more details. 00016 * 00017 * You should have received a copy of the GNU Lesser General Public 00018 * License along with this library; if not, write to the Free Software 00019 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 00020 */ 00021 00022 /** 00023 * @file rtp.h 00024 * @brief RTP header 00025 * @author David Moreau from TAS 00026 * @author Didier Barvaux <didier@barvaux.org> 00027 * 00028 * See section 5.1 of RFC 1889 for details. 00029 */ 00030 00031 #ifndef ROHC_PROTOCOLS_RTP_H 00032 #define ROHC_PROTOCOLS_RTP_H 00033 00034 #include <stdint.h> 00035 00036 #ifdef __KERNEL__ 00037 # include <endian.h> 00038 #else 00039 # include "config.h" /* for WORDS_BIGENDIAN */ 00040 #endif 00041 00042 00043 /** 00044 * @brief The RTP header 00045 * 00046 * See section 5.1 of RFC 1889 for details. 00047 */ 00048 struct rtphdr 00049 { 00050 #if WORDS_BIGENDIAN == 1 00051 uint16_t version:2; 00052 uint16_t padding:1; 00053 uint16_t extension:1; 00054 uint16_t cc:4; 00055 uint16_t m:1; 00056 uint16_t pt:7; 00057 #else 00058 uint16_t cc:4; ///< CSRC Count 00059 uint16_t extension:1; ///< Extension bit 00060 uint16_t padding:1; ///< Padding bit 00061 uint16_t version:2; ///< RTP version 00062 uint16_t pt:7; ///< Payload Type 00063 uint16_t m:1; ///< Marker 00064 #endif 00065 uint16_t sn; ///< Sequence Number 00066 uint32_t timestamp; ///< Timestamp 00067 uint32_t ssrc; ///< Synchronization SouRCe (SSRC) identifier 00068 } __attribute__((packed)); 00069 00070 00071 #endif 00072