ROHC compression/decompression library
comp/schemes/tcp_sack.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_sack.h
21  * @brief Handle encoding of TCP Selective ACKnowledgement (SACK) option
22  * @author Didier Barvaux <didier@barvaux.org>
23  */
24 
25 #ifndef ROHC_COMP_SCHEMES_TCP_SACK_H
26 #define ROHC_COMP_SCHEMES_TCP_SACK_H
27 
28 #include "rohc_comp_internals.h"
29 #include "protocols/tcp.h" /* for sack_block_t */
30 
31 #include <stddef.h>
32 #include <stdint.h>
33 
34 int c_tcp_opt_sack_code(const struct rohc_comp_ctxt *const context,
35  const uint32_t ack_value,
36  const sack_block_t *const sack_blocks,
37  const uint8_t length,
38  const bool is_unchanged,
39  uint8_t *const rohc_data,
40  const size_t rohc_max_len)
41  __attribute__((warn_unused_result, nonnull(1, 3, 6)));
42 
43 #endif /* ROHC_COMP_SCHEMES_TCP_SACK_H */
44 
The Selective Acknowlegment TCP option.
Definition: tcp.h:200
Internal structures for ROHC compression.
The ROHC compression context.
Definition: rohc_comp_internals.h:306
int c_tcp_opt_sack_code(const struct rohc_comp_ctxt *const context, const uint32_t ack_value, const sack_block_t *const sack_blocks, const uint8_t length, const bool is_unchanged, uint8_t *const rohc_data, const size_t rohc_max_len)
Compress one TCP Selective ACKnowledgement (SACK) option.
Definition: comp/schemes/tcp_sack.c:60
TCP header description.