ROHC compression/decompression library
Functions
comp/schemes/tcp_sack.h File Reference

Handle encoding of TCP Selective ACKnowledgement (SACK) option. More...

#include "rohc_comp_internals.h"
#include "protocols/tcp.h"
#include <stddef.h>
#include <stdint.h>
Include dependency graph for comp/schemes/tcp_sack.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

int c_tcp_opt_sack_code (const struct rohc_comp_ctxt *const context, const uint32_t ack_value, const sack_block_t *const sack_blocks, const uint8_t length, const bool is_unchanged, uint8_t *const rohc_data, const size_t rohc_max_len)
 Compress one TCP Selective ACKnowledgement (SACK) option. More...
 

Detailed Description

Handle encoding of TCP Selective ACKnowledgement (SACK) option.

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

Function Documentation

int c_tcp_opt_sack_code ( const struct rohc_comp_ctxt *const  context,
const uint32_t  ack_value,
const sack_block_t *const  sack_blocks,
const uint8_t  length,
const bool  is_unchanged,
uint8_t *const  rohc_data,
const size_t  rohc_max_len 
)

Compress one TCP Selective ACKnowledgement (SACK) option.

See RFC6846 page 68 (and RFC2018 for Selective Acknowledgement option)

Parameters
contextThe compression context
ack_valueThe ack value
sack_blocksThe SACK blocks to compress
lengthThe length of the SACK blocks
is_unchangedWhether the SACK option is unchanged or not (only for irregular chain, use false for list item)
[out]rohc_dataThe ROHC packet being built
rohc_max_lenThe max remaining length in the ROHC buffer
Returns
The length appended in the ROHC buffer if positive, -1 in case of error