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  size_t *const cr_score)
39  __attribute__((warn_unused_result, nonnull(1, 2, 3)));
40 
43 
44 uint32_t c_ip_get_next_sn(const struct rohc_comp_ctxt *const context,
45  const struct net_pkt *const uncomp_pkt)
46  __attribute__((warn_unused_result, nonnull(1, 2), pure));
47 
48 int c_ip_code_ir_remainder(const struct rohc_comp_ctxt *const context,
49  uint8_t *const dest,
50  const size_t dest_max_len,
51  const size_t counter)
52  __attribute__((warn_unused_result, nonnull(1, 2)));
53 
54 #endif
55 
Generic framework for RFC3095-based compression profiles such as IP-only, UDP, UDP-Lite, ESP, and RTP profiles.
The ROHC compression context.
Definition: rohc_comp_internals.h:329
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:319
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:247
bool c_ip_check_context(const struct rohc_comp_ctxt *const context, const struct net_pkt *const packet, size_t *const cr_score)
Check if an IP packet belongs to the context.
Definition: c_ip.c:114
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:476
rohc_packet_t
The different types of ROHC packets.
Definition: rohc_packets.h:55
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:433