00001 /* 00002 * Copyright 2012,2013,2014 Didier Barvaux 00003 * Copyright 2013,2014 Viveris Technologies 00004 * Copyright 2012 WBX 00005 * 00006 * This library is free software; you can redistribute it and/or 00007 * modify it under the terms of the GNU Lesser General Public 00008 * License as published by the Free Software Foundation; either 00009 * version 2.1 of the License, or (at your option) any later version. 00010 * 00011 * This library is distributed in the hope that it will be useful, 00012 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00013 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00014 * Lesser General Public License for more details. 00015 * 00016 * You should have received a copy of the GNU Lesser General Public 00017 * License along with this library; if not, write to the Free Software 00018 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 00019 */ 00020 00021 /** 00022 * @file decomp/schemes/tcp_sack.h 00023 * @brief Handle decoding of TCP Selective ACKnowledgement (SACK) option 00024 * @author FWX <rohc_team@dialine.fr> 00025 * @author Didier Barvaux <didier@barvaux.org> 00026 */ 00027 00028 #ifndef ROHC_DECOMP_SCHEMES_TCP_SACK_H 00029 #define ROHC_DECOMP_SCHEMES_TCP_SACK_H 00030 00031 #include "rohc_decomp_internals.h" 00032 #include "protocols/tcp.h" 00033 00034 #include <stdlib.h> 00035 #include <stdint.h> 00036 00037 /** The context to parse and decode the TCP SACK option */ 00038 struct d_tcp_opt_sack 00039 { 00040 sack_block_t blocks[TCP_SACK_BLOCKS_MAX_NR]; /**< The SACK blocks */ 00041 size_t blocks_nr; /**< The number of SACK blocks */ 00042 }; 00043 00044 int d_tcp_sack_parse(const struct rohc_decomp_ctxt *const context, 00045 const uint8_t *const data, 00046 const size_t data_len, 00047 struct d_tcp_opt_sack *const opt_sack) 00048 __attribute__((warn_unused_result, nonnull(1, 2, 4))); 00049 00050 #endif /* ROHC_DECOMP_SCHEMES_TCP_SACK_H */ 00051
1.6.1