ROHC compression/decompression library
|
ROHC compression context for the IP-only profile. More...
#include "c_generic.h"
Go to the source code of this file.
Functions | |
int | c_ip_check_context (const struct c_context *context, const const struct ip_packet *ip) |
rohc_packet_t | c_ip_decide_FO_packet (const struct c_context *context) |
Decide which packet to send when in First Order (FO) state. | |
rohc_packet_t | c_ip_decide_SO_packet (const struct c_context *context) |
Decide which packet to send when in Second Order (SO) state. | |
uint32_t | c_ip_get_next_sn (const struct c_context *context, const struct ip_packet *outer_ip, const struct ip_packet *inner_ip) |
Determine the SN value for the next packet. | |
int | c_ip_code_ir_remainder (const struct c_context *context, unsigned char *const dest, int counter) |
Code the remainder header for the IR or IR-DYN packets. |
ROHC compression context for the IP-only profile.
int c_ip_check_context | ( | const struct c_context * | context, |
const const struct ip_packet * | ip | ||
) |
int c_ip_code_ir_remainder | ( | const struct c_context * | context, |
unsigned char *const | dest, | ||
int | counter | ||
) |
Code the remainder header for the IR or IR-DYN packets.
Remainder of IR/IR-DYN packet (5.7.7.1): 0 1 2 3 4 5 6 7 +---+---+---+---+---+---+---+---+ 1 | SN | 2 octets if not RTP +---+---+---+---+---+---+---+---+
context | The compression context |
dest | The rohc-packet-under-build buffer |
counter | The current position in the rohc-packet-under-build buffer |
References rohc_debugf, sn, c_generic_context::sn, and c_context::specific.
Referenced by c_udp_create(), and c_udp_lite_create().
rohc_packet_t c_ip_decide_FO_packet | ( | const struct c_context * | context | ) |
Decide which packet to send when in First Order (FO) state.
Packets that can be used are the IR-DYN and UO-2 packets.
context | The compression context |
References generic_tmp_vars::nr_of_ip_hdr, generic_tmp_vars::nr_sn_bits, PACKET_IR_DYN, PACKET_UOR_2, rohc_debugf, generic_tmp_vars::send_dynamic, generic_tmp_vars::send_static, c_context::specific, and c_generic_context::tmp.
Referenced by c_udp_create(), and c_udp_lite_create().
rohc_packet_t c_ip_decide_SO_packet | ( | const struct c_context * | context | ) |
Decide which packet to send when in Second Order (SO) state.
Packets that can be used are the UO-0, UO-1 and UO-2 (with or without extensions) packets.
context | The compression context |
References ip_header_info::info, c_generic_context::ip2_flags, c_generic_context::ip_flags, IPV4, generic_tmp_vars::nr_ip_id_bits, generic_tmp_vars::nr_ip_id_bits2, generic_tmp_vars::nr_of_ip_hdr, generic_tmp_vars::nr_sn_bits, PACKET_IR_DYN, PACKET_UO_0, PACKET_UO_1, PACKET_UOR_2, ipv4_header_info::rnd, rohc_debugf, c_context::specific, c_generic_context::tmp, ip_header_info::v4, and ip_header_info::version.
Referenced by c_udp_create(), and c_udp_lite_create().
uint32_t c_ip_get_next_sn | ( | const struct c_context * | context, |
const struct ip_packet * | outer_ip, | ||
const struct ip_packet * | inner_ip | ||
) |
Determine the SN value for the next packet.
Profile SN is an internal increasing 16-bit number.
context | The compression context |
outer_ip | The outer IP header |
inner_ip | The inner IP header if it exists, NULL otherwise |
References c_generic_context::sn, and c_context::specific.
Referenced by c_udp_create(), and c_udp_lite_create().