ROHC compression/decompression library
rohc_decomp_detect_packet.h
Go to the documentation of this file.
1 /*
2  * Copyright 2011,2012,2013 Didier Barvaux
3  * Copyright 2007,2009,2010,2013 Viveris Technologies
4  *
5  * This library is free software; you can redistribute it and/or
6  * modify it under the terms of the GNU Lesser General Public
7  * License as published by the Free Software Foundation; either
8  * version 2.1 of the License, or (at your option) any later version.
9  *
10  * This library is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13  * Lesser General Public License for more details.
14  *
15  * You should have received a copy of the GNU Lesser General Public
16  * License along with this library; if not, write to the Free Software
17  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
18  */
19 
20 /**
21  * @file rohc_decomp_detect_packet.h
22  * @brief Functions related to packet detection
23  * @author Didier Barvaux <didier.barvaux@toulouse.viveris.com>
24  * @author Didier Barvaux <didier@barvaux.org>
25  */
26 
27 #ifndef ROHC_DECOMP_DETECT_PACKET_H
28 #define ROHC_DECOMP_DETECT_PACKET_H
29 
30 #include <stddef.h>
31 #include <stdint.h>
32 #include <stdbool.h>
33 
34 
35 /*
36  * Function prototypes.
37  */
38 
39 /* ROHC segment */
40 bool rohc_decomp_packet_is_segment(const uint8_t *const data)
41  __attribute__((warn_unused_result, nonnull(1), pure));
42 bool rohc_decomp_packet_is_padding(const uint8_t *const data)
43  __attribute__((warn_unused_result, nonnull(1), pure));
44 
45 /* IR packet */
46 bool rohc_decomp_packet_is_ir(const uint8_t *const data, const size_t len)
47  __attribute__((warn_unused_result, nonnull(1), pure));
48 
49 /* IR-DYN packet */
50 bool rohc_decomp_packet_is_irdyn(const uint8_t *const data, const size_t len)
51  __attribute__((warn_unused_result, nonnull(1), pure));
52 
53 /* UO-0 packet */
54 bool rohc_decomp_packet_is_uo0(const uint8_t *const data, const size_t len)
55  __attribute__((warn_unused_result, nonnull(1), pure));
56 
57 /* UO-1* packets */
58 bool rohc_decomp_packet_is_uo1(const uint8_t *const data, const size_t len)
59  __attribute__((warn_unused_result, nonnull(1), pure));
60 bool rohc_decomp_packet_is_uo1_ts(const uint8_t *const data, const size_t len)
61  __attribute__((warn_unused_result, nonnull(1), pure));
62 
63 /* UOR-2* packets */
64 bool rohc_decomp_packet_is_uor2(const uint8_t *const data, const size_t len)
65  __attribute__((warn_unused_result, nonnull(1), pure));
66 bool rohc_decomp_packet_is_uor2_ts(const uint8_t *const data,
67  const size_t data_len,
68  const size_t large_cid_len)
69  __attribute__((warn_unused_result, nonnull(1), pure));
70 
71 #endif
72 
bool rohc_decomp_packet_is_uor2(const uint8_t *const data, const size_t len)
Find out whether a ROHC packet is an UOR-2* packet or not.
Definition: rohc_decomp_detect_packet.c:140
bool rohc_decomp_packet_is_uor2_ts(const uint8_t *const data, const size_t data_len, const size_t large_cid_len)
Find out whether a ROHC packet is an UOR-2-TS packet or not.
Definition: rohc_decomp_detect_packet.c:156
bool rohc_decomp_packet_is_uo1_ts(const uint8_t *const data, const size_t len)
Find out whether a ROHC packet is an UO-1-TS packet or not.
Definition: rohc_decomp_detect_packet.c:127
bool rohc_decomp_packet_is_padding(const uint8_t *const data)
Find out whether the field is a padding field or not.
Definition: rohc_decomp_detect_packet.c:60
bool rohc_decomp_packet_is_irdyn(const uint8_t *const data, const size_t len)
Find out whether a ROHC packet is an IR-DYN packet or not.
Definition: rohc_decomp_detect_packet.c:86
bool rohc_decomp_packet_is_ir(const uint8_t *const data, const size_t len)
Find out whether a ROHC packet is an IR packet or not.
Definition: rohc_decomp_detect_packet.c:73
bool rohc_decomp_packet_is_uo0(const uint8_t *const data, const size_t len)
Find out whether a ROHC packet is an UO-0 packet or not.
Definition: rohc_decomp_detect_packet.c:99
bool rohc_decomp_packet_is_uo1(const uint8_t *const data, const size_t len)
Find out whether a ROHC packet is an UO-1* packet or not.
Definition: rohc_decomp_detect_packet.c:112
bool rohc_decomp_packet_is_segment(const uint8_t *const data)
Find out whether the field is a segment field or not.
Definition: rohc_decomp_detect_packet.c:48