ROHC compression/decompression library
d_ip.h
Go to the documentation of this file.
1 /*
2  * Copyright 2012,2013 Didier Barvaux
3  * Copyright 2007,2008 Thales Alenia Space
4  * Copyright 2007,2009,2010,2012 Viveris Technologies
5  *
6  * This library is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU Lesser General Public
8  * License as published by the Free Software Foundation; either
9  * version 2.1 of the License, or (at your option) any later version.
10  *
11  * This library is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14  * Lesser General Public License for more details.
15  *
16  * You should have received a copy of the GNU Lesser General Public
17  * License along with this library; if not, write to the Free Software
18  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
19  */
20 
21 /**
22  * @file d_ip.h
23  * @brief ROHC decompression context for the IP-only profile.
24  * @author Didier Barvaux <didier.barvaux@toulouse.viveris.com>
25  * @author Didier Barvaux <didier@barvaux.org>
26  */
27 
28 #ifndef ROHC_DECOMP_IP_H
29 #define ROHC_DECOMP_IP_H
30 
31 #include "rohc_decomp_rfc3095.h"
32 
33 
34 /*
35  * Public function prototypes.
36  */
37 
38 rohc_packet_t ip_detect_packet_type(const struct rohc_decomp_ctxt *const context,
39  const uint8_t *const rohc_packet,
40  const size_t rohc_length,
41  const size_t large_cid_len)
42  __attribute__((warn_unused_result, nonnull(1, 2)));
43 
44 int ip_parse_dynamic_ip(const struct rohc_decomp_ctxt *const context,
45  const uint8_t *packet,
46  const size_t length,
47  struct rohc_extr_bits *const bits)
48  __attribute__((warn_unused_result, nonnull(1, 2, 4)));
49 
50 int ip_parse_ext3(const struct rohc_decomp_ctxt *const context,
51  const uint8_t *const rohc_data,
52  const size_t rohc_data_len,
53  const rohc_packet_t packet_type,
54  struct rohc_extr_bits *const bits)
55  __attribute__((warn_unused_result, nonnull(1, 2, 5)));
56 
57 int parse_outer_header_flags(const struct rohc_decomp_ctxt *const context,
58  const uint8_t *const flags,
59  const uint8_t *fields,
60  const size_t length,
61  struct rohc_extr_ip_bits *const bits)
62  __attribute__((warn_unused_result, nonnull(1, 2, 3, 5)));
63 
64 int parse_inner_header_flags(const struct rohc_decomp_ctxt *const context,
65  const uint8_t *const flags,
66  const uint8_t *fields,
67  const size_t length,
68  struct rohc_extr_ip_bits *const bits)
69  __attribute__((warn_unused_result, nonnull(1, 2, 3, 5)));
70 
71 #endif
72 
size_t bits
The maximal number of bits for representing the value.
Definition: comp_wlsb.c:72
The bits extracted from ROHC UO* base headers.
Definition: rohc_decomp_rfc3095.h:113
int parse_inner_header_flags(const struct rohc_decomp_ctxt *const context, const uint8_t *const flags, const uint8_t *fields, const size_t length, struct rohc_extr_ip_bits *const bits)
Parse the inner IP header flags and fields.
Definition: d_ip.c:533
int ip_parse_dynamic_ip(const struct rohc_decomp_ctxt *const context, const uint8_t *packet, const size_t length, struct rohc_extr_bits *const bits)
Parse the IP dynamic part of the ROHC packet.
Definition: d_ip.c:201
int parse_outer_header_flags(const struct rohc_decomp_ctxt *const context, const uint8_t *const flags, const uint8_t *fields, const size_t length, struct rohc_extr_ip_bits *const bits)
Parse the outer IP header flags and fields.
Definition: d_ip.c:698
int ip_parse_ext3(const struct rohc_decomp_ctxt *const context, const uint8_t *const rohc_data, const size_t rohc_data_len, const rohc_packet_t packet_type, struct rohc_extr_bits *const bits)
Parse the extension 3 of the UOR-2 packet.
Definition: d_ip.c:275
The ROHC decompression context.
Definition: rohc_decomp_internals.h:274
rohc_packet_t ip_detect_packet_type(const struct rohc_decomp_ctxt *const context, const uint8_t *const rohc_packet, const size_t rohc_length, const size_t large_cid_len)
Detect the type of ROHC packet for IP-based non-RTP profiles.
Definition: d_ip.c:137
Definition: rohc_decomp_rfc3095.h:53
rohc_packet_t
The different types of ROHC packets.
Definition: rohc_packets.h:49