ROHC compression context for the IP-only profile.
More...
#include "c_ip.h"
#include "rohc_traces_internal.h"
#include "rohc_utils.h"
#include <string.h>
#include <assert.h>
◆ c_ip_code_ir_remainder()
int c_ip_code_ir_remainder |
( |
const struct rohc_comp_ctxt *const |
context, |
|
|
uint8_t *const |
dest, |
|
|
const size_t |
dest_max_len, |
|
|
const size_t |
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
+---+---+---+---+---+---+---+---+
- Parameters
-
context | The compression context |
dest | The ROHC packet being coded |
dest_max_len | The maximum length (in bytes) of the ROHC packet |
counter | The current position in the ROHC buffer |
- Returns
- The new position in ROHC buffer in case of success, -1 in case of failure
◆ c_ip_decide_FO_packet()
Decide which packet to send when in First Order (FO) state.
Packets that can be used are the IR-DYN and UO-2 packets.
- See also
- decide_packet
- Parameters
-
context | The compression context |
- Returns
- The packet type among ROHC_PACKET_IR_DYN and ROHC_PACKET_UOR_2
◆ c_ip_decide_SO_packet()
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.
- See also
- decide_packet
- Parameters
-
context | The compression context |
- Returns
- The packet type among ROHC_PACKET_UO_0, ROHC_PACKET_UO_1 and ROHC_PACKET_UOR_2
◆ c_ip_get_next_sn()
Determine the SN value for the next packet.
Profile SN is an internal increasing 16-bit number.
- Parameters
-
context | The compression context |
uncomp_pkt_hdrs | The uncompressed headers to encode |
- Returns
- The SN
◆ max_6_bits_of_innermost_nonrnd_ipv4_id_required()
static bool max_6_bits_of_innermost_nonrnd_ipv4_id_required |
( |
const struct rohc_comp_rfc3095_ctxt *const |
ctxt | ) |
|
|
static |
May the inner IP header transmit the required non-random IP-ID bits?
- Parameters
-
ctxt | The generic decompression context |
- Returns
- true if the required IP-ID bits may be transmitted, false otherwise
◆ rohc_ip_ctxt_create()
Create a new context and initialize it thanks to the given IP packet.
This function is one of the functions that must exist in one profile for the framework to work.
- Parameters
-
context | The compression context |
uncomp_pkt_hdrs | The uncompressed headers to initialize the new context |
- Returns
- true if successful, false otherwise
◆ c_ip_profile
Initial value:=
{
}
static bool rohc_ip_ctxt_create(struct rohc_comp_ctxt *const context, const struct rohc_pkt_hdrs *const uncomp_pkt_hdrs)
Create a new context and initialize it thanks to the given IP packet.
Definition: c_ip.c:62
void rohc_comp_rfc3095_destroy(struct rohc_comp_ctxt *const context)
Destroy the context.
Definition: rohc_comp_rfc3095.c:649
int rohc_comp_rfc3095_encode(struct rohc_comp_ctxt *const context, const struct rohc_pkt_hdrs *const uncomp_pkt_hdrs, uint8_t *const rohc_pkt, const size_t rohc_pkt_max_len, rohc_packet_t *const packet_type)
Encode an IP packet according to a pattern decided by several different factors.
Definition: rohc_comp_rfc3095.c:691
bool rohc_comp_rfc3095_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)
Update the profile when feedback is received.
Definition: rohc_comp_rfc3095.c:756
Definition: rohc_profiles.h:95
Define the compression part of the IP-only profile as described in the RFC 3843.