ROHC compression/decompression library
c_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,2014 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 c_ip.h
23  * @brief ROHC compression context for the IP-only profile.
24  * @author Didier Barvaux <didier.barvaux@toulouse.viveris.com>
25  */
26 
27 #ifndef ROHC_COMP_IP_H
28 #define ROHC_COMP_IP_H
29 
30 #include "rohc_comp_rfc3095.h"
31 
32 /*
33  * Public function prototypes.
34  */
35 
36 bool c_ip_check_context(const struct rohc_comp_ctxt *const context,
37  const struct net_pkt *const packet)
38  __attribute__((warn_unused_result, nonnull(1, 2), pure));
39 
42 
43 uint32_t c_ip_get_next_sn(const struct rohc_comp_ctxt *const context,
44  const struct net_pkt *const uncomp_pkt)
45  __attribute__((warn_unused_result, nonnull(1, 2), pure));
46 
47 int c_ip_code_ir_remainder(const struct rohc_comp_ctxt *const context,
48  uint8_t *const dest,
49  const size_t dest_max_len,
50  const size_t counter)
51  __attribute__((warn_unused_result, nonnull(1, 2)));
52 
53 #endif
54 
Generic framework for RFC3095-based compression profiles such as IP-only, UDP, UDP-Lite, ESP, and RTP profiles.
bool c_ip_check_context(const struct rohc_comp_ctxt *const context, const struct net_pkt *const packet)
Check if an IP packet belongs to the context.
Definition: c_ip.c:115
The ROHC compression context.
Definition: rohc_comp_internals.h:306
Definition: net_pkt.h:39
rohc_packet_t c_ip_decide_SO_packet(const struct rohc_comp_ctxt *context)
Decide which packet to send when in Second Order (SO) state.
Definition: c_ip.c:311
rohc_packet_t c_ip_decide_FO_packet(const struct rohc_comp_ctxt *context)
Decide which packet to send when in First Order (FO) state.
Definition: c_ip.c:239
int c_ip_code_ir_remainder(const struct rohc_comp_ctxt *const context, uint8_t *const dest, const size_t dest_max_len, const size_t counter)
Code the remainder header for the IR or IR-DYN packets.
Definition: c_ip.c:468
rohc_packet_t
The different types of ROHC packets.
Definition: rohc_packets.h:49
uint32_t c_ip_get_next_sn(const struct rohc_comp_ctxt *const context, const struct net_pkt *const uncomp_pkt)
Determine the SN value for the next packet.
Definition: c_ip.c:425