ROHC compression/decompression library
Data Fields
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, unsigned char *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 struct c_feedback *const feedback)
 The handler used to warn the profile-specific part of the context about the arrival of feedback data.
bool(* use_udp_port )(const struct rohc_comp_ctxt *const context, const unsigned int port)
 The handler used to detect if a UDP port is used by the profile.

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, unsigned char *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:
contextThe compression context
ipThe IP packet to encode
packet_sizeThe length of the IP packet to encode
rohc_pktOUT: The ROHC packet
rohc_pkt_max_lenThe maximum length of the ROHC packet
packet_typeOUT: The type of ROHC packet that is created
payload_offsetOUT: 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 struct c_feedback *const feedback)

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.

bool(* rohc_comp_profile::use_udp_port)(const struct rohc_comp_ctxt *const context, const unsigned int port)

The handler used to detect if a UDP port is used by the profile.


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