rohc_comp_profile Struct Reference

The ROHC compression profile. More...

#include <rohc_comp_internals.h>

Data Fields

const rohc_profile_t id
const unsigned short protocol
 The IP protocol ID used to find out which profile is able to compress an IP packet.
bool(* create )(struct rohc_comp_ctxt *const context, const struct net_pkt *const packet)
 The handler used to create the profile-specific part of the compression context.
void(* destroy )(struct rohc_comp_ctxt *const context)
 The handler used to destroy the profile-specific part of the compression context.
bool(* check_profile )(const struct rohc_comp *const comp, const struct net_pkt *const packet)
 The handler used to check whether an uncompressed IP packet fits the current profile or not.
bool(* check_context )(const struct rohc_comp_ctxt *const context, const struct net_pkt *const packet)
 The handler used to check whether an uncompressed IP packet belongs to a context or not.
int(* encode )(struct rohc_comp_ctxt *const context, const struct net_pkt *const uncomp_pkt, uint8_t *const rohc_pkt, const size_t rohc_pkt_max_len, rohc_packet_t *const packet_type, size_t *const payload_offset)
 The handler used to encode uncompressed IP packets.
bool(* reinit_context )(struct rohc_comp_ctxt *const context)
 The handler used to re-initialize a context.
bool(* feedback )(struct rohc_comp_ctxt *const context, const enum rohc_feedback_type feedback_type, const uint8_t *const packet, const size_t packet_len, const uint8_t *const feedback_data, const size_t feedback_data_len)
 The handler used to warn the profile-specific part of the context about the arrival of feedback data.

Detailed Description

The ROHC compression profile.

The object defines a ROHC profile. Each field must be filled in for each new profile.


Field Documentation

bool(* rohc_comp_profile::check_context)(const struct rohc_comp_ctxt *const context, const struct net_pkt *const packet)

The handler used to check whether an uncompressed IP packet belongs to a context or not.

bool(* rohc_comp_profile::check_profile)(const struct rohc_comp *const comp, const struct net_pkt *const packet)

The handler used to check whether an uncompressed IP packet fits the current profile or not.

bool(* rohc_comp_profile::create)(struct rohc_comp_ctxt *const context, const struct net_pkt *const packet)

The handler used to create the profile-specific part of the compression context.

void(* rohc_comp_profile::destroy)(struct rohc_comp_ctxt *const context)

The handler used to destroy the profile-specific part of the compression context.

int(* rohc_comp_profile::encode)(struct rohc_comp_ctxt *const context, const struct net_pkt *const uncomp_pkt, uint8_t *const rohc_pkt, const size_t rohc_pkt_max_len, rohc_packet_t *const packet_type, size_t *const payload_offset)

The handler used to encode uncompressed IP packets.

Parameters:
context The compression context
ip The IP packet to encode
packet_size The length of the IP packet to encode
rohc_pkt OUT: The ROHC packet
rohc_pkt_max_len The maximum length of the ROHC packet
packet_type OUT: The type of ROHC packet that is created
payload_offset OUT: The offset for the payload in the IP packet
Returns:
The length of the ROHC packet if successful, -1 otherwise
bool(* rohc_comp_profile::feedback)(struct rohc_comp_ctxt *const context, const enum rohc_feedback_type feedback_type, const uint8_t *const packet, const size_t packet_len, const uint8_t *const feedback_data, const size_t feedback_data_len)

The handler used to warn the profile-specific part of the context about the arrival of feedback data.

The profile ID as reserved by IANA

const unsigned short rohc_comp_profile::protocol

The IP protocol ID used to find out which profile is able to compress an IP packet.

bool(* rohc_comp_profile::reinit_context)(struct rohc_comp_ctxt *const context)

The handler used to re-initialize a context.


The documentation for this struct was generated from the following file:

Generated on 4 Jul 2018 for ROHC compression/decompression library by  doxygen 1.6.1