00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027 #ifndef ROHC_DECOMP_IP_ID_OFFSET_H
00028 #define ROHC_DECOMP_IP_ID_OFFSET_H
00029
00030 #include "decomp_wlsb.h"
00031
00032 #include <stdint.h>
00033 #include <stdlib.h>
00034 #ifdef __KERNEL__
00035 # include <linux/types.h>
00036 #else
00037 # include <stdbool.h>
00038 #endif
00039
00040
00041
00042 struct ip_id_offset_decode;
00043
00044
00045
00046
00047
00048
00049 struct ip_id_offset_decode * ip_id_offset_new(void);
00050
00051 void ip_id_offset_free(struct ip_id_offset_decode *const ipid)
00052 __attribute__((nonnull(1)));
00053
00054 bool ip_id_offset_decode(const struct ip_id_offset_decode *const ipid,
00055 const rohc_lsb_ref_t ref_type,
00056 const uint16_t m,
00057 const size_t k,
00058 const uint32_t sn,
00059 uint16_t *const decoded)
00060 __attribute__((nonnull(1, 6), warn_unused_result));
00061
00062 void ip_id_offset_set_ref(struct ip_id_offset_decode *const ipid,
00063 const uint16_t id_ref,
00064 const uint32_t sn_ref,
00065 const bool keep_ref_minus_1)
00066 __attribute__((nonnull(1)));
00067
00068 #endif
00069