ROHC compression/decompression library
|
00001 /* 00002 * Copyright 2011,2012,2013 Didier Barvaux 00003 * Copyright 2007,2009,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_decomp_detect_packet.h 00022 * @brief Functions related to packet detection 00023 * @author Didier Barvaux <didier.barvaux@toulouse.viveris.com> 00024 * @author Didier Barvaux <didier@barvaux.org> 00025 */ 00026 00027 #ifndef ROHC_DECOMP_DETECT_PACKET_H 00028 #define ROHC_DECOMP_DETECT_PACKET_H 00029 00030 #include "dllexport.h" 00031 00032 #include <stddef.h> 00033 #include <stdint.h> 00034 #ifdef __KERNEL__ 00035 # include <linux/types.h> 00036 #else 00037 # include <stdbool.h> 00038 #endif 00039 00040 00041 /* 00042 * Function prototypes. 00043 */ 00044 00045 /* ROHC segment */ 00046 bool ROHC_EXPORT rohc_decomp_packet_is_segment(const uint8_t *const data) 00047 __attribute__((warn_unused_result, nonnull(1), pure)); 00048 bool ROHC_EXPORT rohc_decomp_packet_is_padding(const uint8_t *const data) 00049 __attribute__((warn_unused_result, nonnull(1), pure)); 00050 00051 /* IR packet */ 00052 bool ROHC_EXPORT rohc_decomp_packet_is_ir(const uint8_t *const data, 00053 const size_t len) 00054 __attribute__((warn_unused_result, nonnull(1), pure)); 00055 00056 /* IR-DYN packet */ 00057 bool ROHC_EXPORT rohc_decomp_packet_is_irdyn(const uint8_t *const data, 00058 const size_t len) 00059 __attribute__((warn_unused_result, nonnull(1), pure)); 00060 00061 /* UO-0 packet */ 00062 bool ROHC_EXPORT rohc_decomp_packet_is_uo0(const uint8_t *const data, 00063 const size_t len) 00064 __attribute__((warn_unused_result, nonnull(1), pure)); 00065 00066 /* UO-1* packets */ 00067 bool ROHC_EXPORT rohc_decomp_packet_is_uo1(const uint8_t *const data, 00068 const size_t len) 00069 __attribute__((warn_unused_result, nonnull(1), pure)); 00070 bool ROHC_EXPORT rohc_decomp_packet_is_uo1_ts(const uint8_t *const data, 00071 const size_t len) 00072 __attribute__((warn_unused_result, nonnull(1), pure)); 00073 00074 /* UOR-2* packets */ 00075 bool ROHC_EXPORT rohc_decomp_packet_is_uor2(const uint8_t *const data, 00076 const size_t len) 00077 __attribute__((warn_unused_result, nonnull(1), pure)); 00078 bool ROHC_EXPORT rohc_decomp_packet_is_uor2_ts(const uint8_t *const data, 00079 const size_t data_len, 00080 const size_t large_cid_len) 00081 __attribute__((warn_unused_result, nonnull(1), pure)); 00082 00083 #endif 00084