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

Offset IP-ID encoding. More...

#include "rohc_internal.h"
#include <stdint.h>
#include <stdbool.h>
Include dependency graph for comp/schemes/ip_id_offset.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

bool is_ip_id_increasing (const uint16_t old_id, const uint16_t new_id, const uint16_t max_delta)
 Whether the new IP-ID is increasing. More...
 
rohc_ip_id_behavior_t rohc_comp_detect_ip_id_behavior (const uint16_t last_ip_id, const uint16_t new_ip_id, const int32_t msn_offset, const uint16_t max_delta)
 Detect the behavior of the IPv4 Identification field. More...
 

Detailed Description

Offset IP-ID encoding.

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

Function Documentation

◆ is_ip_id_increasing()

bool is_ip_id_increasing ( const uint16_t  old_id,
const uint16_t  new_id,
const uint16_t  max_delta 
)

Whether the new IP-ID is increasing.

The new IP-ID is considered as increasing if the new value is greater by a small delta then the previous IP-ID. Wraparound shall be taken into account.

Parameters
old_idThe IP-ID of the previous IPv4 header
new_idThe IP-ID of the current IPv4 header
max_deltaThe maximum allowed delta
Returns
Whether the IP-ID is increasing

◆ rohc_comp_detect_ip_id_behavior()

rohc_ip_id_behavior_t rohc_comp_detect_ip_id_behavior ( const uint16_t  last_ip_id,
const uint16_t  new_ip_id,
const int32_t  msn_offset,
const uint16_t  max_delta 
)

Detect the behavior of the IPv4 Identification field.

Parameters
last_ip_idThe IP-ID value of the previous packet (in HBO)
new_ip_idThe IP-ID value of the current packet (in HBO)
msn_offsetThe offset between the previous and current MSN
max_deltaThe maximum allowed delta
Returns
The IP-ID behavior among: ROHC_IP_ID_BEHAVIOR_SEQ, ROHC_IP_ID_BEHAVIOR_SEQ_SWAP, ROHC_IP_ID_BEHAVIOR_ZERO, or ROHC_IP_ID_BEHAVIOR_RAND