ROHC compression/decompression library
comp/schemes/ip_id_offset.h
Go to the documentation of this file.
1 /*
2  * Copyright 2012,2013 Didier Barvaux
3  * Copyright 2007,2009,2010 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 src/comp/schemes/ip_id_offset.h
22  * @brief Offset IP-ID encoding
23  * @author Didier Barvaux <didier@barvaux.org>
24  */
25 
26 #ifndef ROHC_COMP_IP_ID_OFFSET_H
27 #define ROHC_COMP_IP_ID_OFFSET_H
28 
29 #include "rohc_internal.h"
30 
31 #include <stdint.h>
32 #include <stdbool.h>
33 
34 bool is_ip_id_increasing(const uint16_t old_id,
35  const uint16_t new_id,
36  const uint16_t max_delta)
37  __attribute__((warn_unused_result, const));
38 
40  const uint16_t new_ip_id,
41  const int32_t msn_offset,
42  const uint16_t max_delta)
43  __attribute__((warn_unused_result, const));
44 
45 #endif
46 
bool is_ip_id_increasing(const uint16_t old_id, const uint16_t new_id, const uint16_t max_delta)
Whether the new IP-ID is increasing.
Definition: comp/schemes/ip_id_offset.c:41
rohc_ip_id_behavior_t
Definition: rohc_internal.h:171
rohc_ip_id_behavior_t rohc_comp_detect_ip_id_behavior(const uint16_t last_ip_id, const uint16_t new_ip_id, const int32_t msn_offset, const uint16_t max_delta)
Detect the behavior of the IPv4 Identification field.
Definition: comp/schemes/ip_id_offset.c:83
ROHC private common definitions and routines.