| 
    ROHC compression/decompression library
    
   | 
 
#include "rohc_decomp.h"#include "rohc_decomp_internals.h"#include "rohc_packets.h"#include "rohc_utils.h"#include "schemes/decomp_wlsb.h"#include "schemes/ip_id_offset.h"#include "schemes/decomp_list.h"#include "protocols/udp_lite.h"#include "ip.h"#include "crc.h"#include <stddef.h>#include <stdbool.h>

Go to the source code of this file.
Data Structures | |
| struct | rohc_extr_ip_bits | 
| struct | rohc_extr_bits | 
| The bits extracted from ROHC UO* base headers.  More... | |
| struct | rohc_decoded_ip_values | 
| struct | rohc_decoded_values | 
| The values decoded from the bits extracted from ROHC header.  More... | |
| struct | rohc_decomp_rfc3095_changes | 
| Store information about an IP header between the different decompressions of IP packets.  More... | |
| struct | rohc_decomp_rfc3095_ctxt | 
| The generic decompression context for RFC3095-based profiles.  More... | |
Functions | |
| bool | rohc_decomp_rfc3095_create (const struct rohc_decomp_ctxt *const context, struct rohc_decomp_rfc3095_ctxt **const persist_ctxt, struct rohc_decomp_volat_ctxt *const volat_ctxt, rohc_trace_callback2_t trace_cb, void *const trace_cb_priv, const int profile_id) | 
| Create the RFC3095 volatile and persistent parts of the context.  More... | |
| void | rohc_decomp_rfc3095_destroy (struct rohc_decomp_rfc3095_ctxt *const rfc3095_ctxt, const struct rohc_decomp_volat_ctxt *const volat_ctxt) | 
| Destroy the context.  More... | |
| bool | rfc3095_decomp_parse_pkt (const struct rohc_decomp_ctxt *const context, const struct rohc_buf rohc_packet, const size_t large_cid_len, rohc_packet_t *const packet_type, struct rohc_decomp_crc *const extr_crc, struct rohc_extr_bits *const bits, size_t *const rohc_hdr_len) | 
| Parse one IR, IR-DYN, UO-0, UO-1*, or UOR-2* packet.  More... | |
| rohc_status_t | rfc3095_decomp_build_hdrs (const struct rohc_decomp *const decomp, const struct rohc_decomp_ctxt *const context, const rohc_packet_t packet_type, const struct rohc_decomp_crc *const extr_crc, const struct rohc_decoded_values *const decoded, const size_t payload_len, struct rohc_buf *const uncomp_hdrs, size_t *const uncomp_hdrs_len) | 
| Build the uncompressed headers.  More... | |
| rohc_status_t | rfc3095_decomp_decode_bits (const struct rohc_decomp_ctxt *const context, const struct rohc_extr_bits *const bits, const size_t payload_len, struct rohc_decoded_values *const decoded) | 
| Decode values from extracted bits.  More... | |
| void | rfc3095_decomp_update_ctxt (struct rohc_decomp_ctxt *const context, const struct rohc_decoded_values *const decoded, const size_t payload_len, bool *const do_change_mode) | 
| Update context with decoded values.  More... | |
| bool | rfc3095_decomp_attempt_repair (const struct rohc_decomp *const decomp, const struct rohc_decomp_ctxt *const context, const struct rohc_ts pkt_arrival_time, struct rohc_decomp_crc_corr_ctxt *const crc_corr, struct rohc_extr_bits *const extr_bits) | 
| Attempt a packet/context repair upon CRC failure.  More... | |
| uint32_t | rohc_decomp_rfc3095_get_sn (const struct rohc_decomp_ctxt *const context) | 
| Get the reference SN value of the context.  More... | |
| static bool | is_ipv4_pkt (const struct rohc_extr_ip_bits *const bits) | 
| Is the given IP header IPV4 wrt packet?  More... | |
| static bool | is_ipv4_rnd_pkt (const struct rohc_extr_ip_bits *const bits) | 
| Is the given IP header IPv4 and its IP-ID random wrt packet?  More... | |
| static bool | is_ipv4_non_rnd_pkt (const struct rohc_extr_ip_bits *const bits) | 
| Is the given IP header IPv4 and its IP-ID non-random wrt packet?  More... | |
      
  | 
  inlinestatic | 
Is the given IP header IPv4 and its IP-ID non-random wrt packet?
| bits | The bits extracted from packet | 
      
  | 
  inlinestatic | 
Is the given IP header IPV4 wrt packet?
| bits | The bits extracted from packet | 
      
  | 
  inlinestatic | 
Is the given IP header IPv4 and its IP-ID random wrt packet?
| bits | The bits extracted from packet | 
| bool rfc3095_decomp_attempt_repair | ( | const struct rohc_decomp *const | decomp, | 
| const struct rohc_decomp_ctxt *const | context, | ||
| const struct rohc_ts | pkt_arrival_time, | ||
| struct rohc_decomp_crc_corr_ctxt *const | crc_corr, | ||
| struct rohc_extr_bits *const | extr_bits | ||
| ) | 
Attempt a packet/context repair upon CRC failure.
| decomp | The ROHC decompressor | |
| context | The decompression context | |
| pkt_arrival_time | The arrival time of the ROHC packet that caused the CRC failure | |
| [in,out] | crc_corr | The context for corrections upon CRC failures | 
| [in,out] | extr_bits | The bits extracted from the ROHC header | 
| rohc_status_t rfc3095_decomp_build_hdrs | ( | const struct rohc_decomp *const | decomp, | 
| const struct rohc_decomp_ctxt *const | context, | ||
| const rohc_packet_t | packet_type, | ||
| const struct rohc_decomp_crc *const | extr_crc, | ||
| const struct rohc_decoded_values *const | decoded, | ||
| const size_t | payload_len, | ||
| struct rohc_buf *const | uncomp_hdrs, | ||
| size_t *const | uncomp_hdrs_len | ||
| ) | 
Build the uncompressed headers.
| decomp | The ROHC decompressor | |
| context | The decompression context | |
| packet_type | The type of ROHC packet | |
| extr_crc | The CRC bits extracted from the ROHC header | |
| decoded | The values decoded from ROHC header | |
| payload_len | The length of the packet payload | |
| [out] | uncomp_hdrs | The buffer to store the uncompressed headers | 
| [out] | uncomp_hdrs_len | The length of the uncompressed headers written into the buffer | 
| rohc_status_t rfc3095_decomp_decode_bits | ( | const struct rohc_decomp_ctxt *const | context, | 
| const struct rohc_extr_bits *const | bits, | ||
| const size_t | payload_len, | ||
| struct rohc_decoded_values *const | decoded | ||
| ) | 
Decode values from extracted bits.
The following values are decoded:
Other fields may be decoded by the profile-specific callback named decode_values_from_bits.
This function is one of the functions that must exist in one profile for the framework to work.
| context | The decompression context | |
| bits | The bits extracted from the ROHC packet | |
| payload_len | The length of the packet payload (in bytes) | |
| [out] | decoded | The corresponding decoded values | 
| bool rfc3095_decomp_parse_pkt | ( | const struct rohc_decomp_ctxt *const | context, | 
| const struct rohc_buf | rohc_packet, | ||
| const size_t | large_cid_len, | ||
| rohc_packet_t *const | packet_type, | ||
| struct rohc_decomp_crc *const | extr_crc, | ||
| struct rohc_extr_bits *const | bits, | ||
| size_t *const | rohc_hdr_len | ||
| ) | 
Parse one IR, IR-DYN, UO-0, UO-1*, or UOR-2* packet.
| context | The decompression context | |
| rohc_packet | The ROHC packet to decode | |
| large_cid_len | The length of the optional large CID field | |
| [in,out] | packet_type | IN: The type of the ROHC packet to parse OUT: The type of the parsed ROHC packet | 
| [out] | extr_crc | The CRC bits extracted from the ROHC header | 
| [out] | bits | The bits extracted from the ROHC header | 
| [out] | rohc_hdr_len | The length of the ROHC header (in bytes) | 
| void rfc3095_decomp_update_ctxt | ( | struct rohc_decomp_ctxt *const | context, | 
| const struct rohc_decoded_values *const | decoded, | ||
| const size_t | payload_len, | ||
| bool *const | do_change_mode | ||
| ) | 
Update context with decoded values.
The following decoded values are updated in context:
This function is one of the functions that must exist in one profile for the framework to work.
| context | The decompression context | |
| decoded | The decoded values to update in the context | |
| payload_len | The length of the packet payload | |
| [out] | do_change_mode | Whether the profile context wants to change its operational mode or not | 
| bool rohc_decomp_rfc3095_create | ( | const struct rohc_decomp_ctxt *const | context, | 
| struct rohc_decomp_rfc3095_ctxt **const | persist_ctxt, | ||
| struct rohc_decomp_volat_ctxt *const | volat_ctxt, | ||
| rohc_trace_callback2_t | trace_cb, | ||
| void *const | trace_cb_priv, | ||
| const int | profile_id | ||
| ) | 
Create the RFC3095 volatile and persistent parts of the context.
This function is one of the functions that must exist in one profile for the framework to work.
| context | The decompression context | |
| [out] | persist_ctxt | The persistent part of the decompression context | 
| [out] | volat_ctxt | The volatile part of the decompression context | 
| trace_cb | The function to call for printing traces | |
| trace_cb_priv | An optional private context, may be NULL | |
| profile_id | The ID of the associated decompression profile | 
| void rohc_decomp_rfc3095_destroy | ( | struct rohc_decomp_rfc3095_ctxt *const | rfc3095_ctxt, | 
| const struct rohc_decomp_volat_ctxt *const | volat_ctxt | ||
| ) | 
Destroy the context.
This function is one of the functions that must exist in one profile for the framework to work.
| rfc3095_ctxt | The generic decompression context | 
| volat_ctxt | The volatile part of the decompression context | 
| uint32_t rohc_decomp_rfc3095_get_sn | ( | const struct rohc_decomp_ctxt *const | context | ) | 
Get the reference SN value of the context.
This function is one of the functions that must exist in one profile for the framework to work.
| context | The decompression context | 
 1.8.13