ROHC compression/decompression library
comp/schemes/tcp_ts.h
Go to the documentation of this file.
1 /*
2  * Copyright 2015 Didier Barvaux
3  *
4  * This library is free software; you can redistribute it and/or
5  * modify it under the terms of the GNU Lesser General Public
6  * License as published by the Free Software Foundation; either
7  * version 2.1 of the License, or (at your option) any later version.
8  *
9  * This library is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12  * Lesser General Public License for more details.
13  *
14  * You should have received a copy of the GNU Lesser General Public
15  * License along with this library; if not, write to the Free Software
16  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
17  */
18 
19 /**
20  * @file /comp/schemes/tcp_ts.h
21  * @brief Handle encoding of TCP TimeStamp (TS) option
22  * @author Didier Barvaux <didier@barvaux.org>
23  */
24 
25 #ifndef ROHC_COMP_SCHEMES_TCP_TS_H
26 #define ROHC_COMP_SCHEMES_TCP_TS_H
27 
28 #include "rohc_comp_internals.h"
29 
30 #include <stddef.h>
31 #include <stdint.h>
32 
33 bool c_tcp_ts_lsb_code(const struct rohc_comp_ctxt *const context,
34  const uint32_t timestamp,
35  const size_t nr_bits_minus_1,
36  const size_t nr_bits_0x40000,
37  const size_t nr_bits_0x4000000,
38  uint8_t *const rohc_data,
39  const size_t rohc_max_len,
40  size_t *const rohc_len)
41  __attribute__((warn_unused_result, nonnull(1, 6, 8)));
42 
43 #endif /* ROHC_COMP_SCHEMES_TCP_TS_H */
44 
bool c_tcp_ts_lsb_code(const struct rohc_comp_ctxt *const context, const uint32_t timestamp, const size_t nr_bits_minus_1, const size_t nr_bits_0x40000, const size_t nr_bits_0x4000000, uint8_t *const rohc_data, const size_t rohc_max_len, size_t *const rohc_len)
Compress the TimeStamp option value.
Definition: comp/schemes/tcp_ts.c:47
Internal structures for ROHC compression.
The ROHC compression context.
Definition: rohc_comp_internals.h:306