ROHC compression/decompression library
Functions
comp/schemes/tcp_ts.c File Reference

Handle encoding of TCP TimeStamp (TS) option. More...

#include "tcp_ts.h"
#include <string.h>
Include dependency graph for comp/schemes/tcp_ts.c:

Functions

bool c_tcp_ts_lsb_code (const struct rohc_comp_ctxt *const context, const uint32_t timestamp, const size_t nr_bits_minus_1, const size_t nr_bits_0x40000, const size_t nr_bits_0x4000000, uint8_t *const rohc_data, const size_t rohc_max_len, size_t *const rohc_len)
 Compress the TimeStamp option value. More...
 

Detailed Description

Handle encoding of TCP TimeStamp (TS) option.

Author
Didier Barvaux didie.nosp@m.r@ba.nosp@m.rvaux.nosp@m..org

Function Documentation

bool c_tcp_ts_lsb_code ( const struct rohc_comp_ctxt *const  context,
const uint32_t  timestamp,
const size_t  nr_bits_minus_1,
const size_t  nr_bits_0x40000,
const size_t  nr_bits_0x4000000,
uint8_t *const  rohc_data,
const size_t  rohc_max_len,
size_t *const  rohc_len 
)

Compress the TimeStamp option value.

See RFC4996 page 65

Parameters
contextThe compression context
timestampThe timestamp value to compress
nr_bits_minus_1The minimal number of required bits for p = -1
nr_bits_0x40000The minimal number of required bits for p = 0x40000
nr_bits_0x4000000The minimal number of required bits for p = 0x4000000
[out]rohc_dataThe ROHC packet being built
rohc_max_lenThe max remaining length in the ROHC buffer
[out]rohc_lenThe length appended in the ROHC buffer
Returns
true if compression was successful, false otherwise