ROHC compression/decompression library
d_ip.h
Go to the documentation of this file.
00001 /*
00002  * Copyright 2012,2013 Didier Barvaux
00003  * Copyright 2007,2008 Thales Alenia Space
00004  * Copyright 2007,2009,2010,2012 Viveris Technologies
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 d_ip.h
00023  * @brief ROHC decompression context for the IP-only profile.
00024  * @author Didier Barvaux <didier.barvaux@toulouse.viveris.com>
00025  * @author Didier Barvaux <didier@barvaux.org>
00026  */
00027 
00028 #ifndef ROHC_DECOMP_IP_H
00029 #define ROHC_DECOMP_IP_H
00030 
00031 #include "d_generic.h"
00032 
00033 
00034 /*
00035  * Public function prototypes.
00036  */
00037 
00038 rohc_packet_t ip_detect_packet_type(const struct rohc_decomp_ctxt *const context,
00039                                     const uint8_t *const rohc_packet,
00040                                     const size_t rohc_length,
00041                                     const size_t large_cid_len)
00042         __attribute__((warn_unused_result, nonnull(1, 2)));
00043 
00044 int ip_parse_dynamic_ip(const struct rohc_decomp_ctxt *const context,
00045                         const uint8_t *packet,
00046                         const size_t length,
00047                         struct rohc_extr_bits *const bits)
00048         __attribute__((warn_unused_result, nonnull(1, 2, 4)));
00049 
00050 int ip_parse_ext3(const struct rohc_decomp_ctxt *const context,
00051                   const unsigned char *const rohc_data,
00052                   const size_t rohc_data_len,
00053                   const rohc_packet_t packet_type,
00054                   struct rohc_extr_bits *const bits)
00055         __attribute__((warn_unused_result, nonnull(1, 2, 5)));
00056 
00057 int parse_outer_header_flags(const struct rohc_decomp_ctxt *const context,
00058                              const unsigned char *const flags,
00059                              const unsigned char *fields,
00060                              const size_t length,
00061                              struct rohc_extr_ip_bits *const bits)
00062         __attribute__((warn_unused_result, nonnull(1, 2, 3, 5)));
00063 
00064 int parse_inner_header_flags(const struct rohc_decomp_ctxt *const context,
00065                              const unsigned char *const flags,
00066                              const unsigned char *fields,
00067                              const size_t length,
00068                              struct rohc_extr_ip_bits *const bits)
00069         __attribute__((warn_unused_result, nonnull(1, 2, 3, 5)));
00070 
00071 #endif
00072