ROHC compression/decompression library
decomp/schemes/tcp_sack.h
Go to the documentation of this file.
1 /*
2  * Copyright 2012,2013,2014 Didier Barvaux
3  * Copyright 2013,2014 Viveris Technologies
4  * Copyright 2012 WBX
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 decomp/schemes/tcp_sack.h
23  * @brief Handle decoding of TCP Selective ACKnowledgement (SACK) option
24  * @author FWX <rohc_team@dialine.fr>
25  * @author Didier Barvaux <didier@barvaux.org>
26  */
27 
28 #ifndef ROHC_DECOMP_SCHEMES_TCP_SACK_H
29 #define ROHC_DECOMP_SCHEMES_TCP_SACK_H
30 
31 #include "rohc_decomp_internals.h"
32 #include "protocols/tcp.h"
33 
34 #include <stdlib.h>
35 #include <stdint.h>
36 
37 /** The context to parse and decode the TCP SACK option */
39 {
40  sack_block_t blocks[TCP_SACK_BLOCKS_MAX_NR]; /**< The SACK blocks */
41  size_t blocks_nr; /**< The number of SACK blocks */
42 };
43 
44 int d_tcp_sack_parse(const struct rohc_decomp_ctxt *const context,
45  const uint8_t *const data,
46  const size_t data_len,
47  struct d_tcp_opt_sack *const opt_sack)
48  __attribute__((warn_unused_result, nonnull(1, 2, 4)));
49 
50 #endif /* ROHC_DECOMP_SCHEMES_TCP_SACK_H */
51 
The Selective Acknowlegment TCP option.
Definition: tcp.h:200
#define TCP_SACK_BLOCKS_MAX_NR
Definition: tcp.h:208
sack_block_t blocks[TCP_SACK_BLOCKS_MAX_NR]
Definition: decomp/schemes/tcp_sack.h:40
Internal structures for ROHC decompression.
Definition: decomp/schemes/tcp_sack.h:38
int d_tcp_sack_parse(const struct rohc_decomp_ctxt *const context, const uint8_t *const data, const size_t data_len, struct d_tcp_opt_sack *const opt_sack)
Parse the SACK TCP option.
Definition: decomp/schemes/tcp_sack.c:59
The ROHC decompression context.
Definition: rohc_decomp_internals.h:274
size_t blocks_nr
Definition: decomp/schemes/tcp_sack.h:41
TCP header description.