ROHC compression/decompression library
c_udp.h
Go to the documentation of this file.
00001 /*
00002  * Copyright 2013 Didier Barvaux
00003  * Copyright 2007,2008 Thales Alenia Space
00004  * Copyright 2007,2009,2010,2012,2014 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 c_udp.h
00023  * @brief ROHC compression context for the UDP profile.
00024  * @author Didier Barvaux <didier.barvaux@toulouse.viveris.com>
00025  */
00026 
00027 #ifndef ROHC_COMP_UDP_H
00028 #define ROHC_COMP_UDP_H
00029 
00030 #include "rohc_comp_internals.h"
00031 
00032 #include <stdint.h>
00033 #include <stdbool.h>
00034 
00035 
00036 /*
00037  * Function prototypes.
00038  */
00039 
00040 bool c_udp_check_profile(const struct rohc_comp *const comp,
00041                          const struct net_pkt *const packet)
00042         __attribute__((warn_unused_result, nonnull(1, 2)));
00043 
00044 bool c_udp_check_context(const struct rohc_comp_ctxt *context,
00045                          const struct net_pkt *const packet)
00046         __attribute__((warn_unused_result, nonnull(1, 2)));
00047 
00048 size_t udp_code_uo_remainder(const struct rohc_comp_ctxt *context,
00049                              const unsigned char *next_header,
00050                              unsigned char *const dest,
00051                              const size_t counter)
00052         __attribute__((warn_unused_result, nonnull(1, 2, 3)));
00053 
00054 size_t udp_code_static_udp_part(const struct rohc_comp_ctxt *const context,
00055                                 const unsigned char *const next_header,
00056                                 unsigned char *const dest,
00057                                 const size_t counter)
00058         __attribute__((warn_unused_result, nonnull(1, 2, 3)));
00059 
00060 #endif
00061