| ROHC compression/decompression library
    | 
ROHC compression context for the RTP profile. More...
#include "c_rtp.h"#include "c_udp.h"#include "rohc_traces_internal.h"#include "rohc_packets.h"#include "rohc_utils.h"#include "sdvl.h"#include "crc.h"#include <stdlib.h>#include <string.h>#include <assert.h>
| Functions | |
| static bool | c_rtp_create (struct rohc_comp_ctxt *const context, const struct net_pkt *const packet) | 
| Create a new RTP context and initialize it thanks to the given IP/UDP/RTP packet.  More... | |
| static void | c_rtp_destroy (struct rohc_comp_ctxt *const context) | 
| Destroy the RTP context.  More... | |
| static bool | c_rtp_check_profile (const struct rohc_comp *const comp, const struct net_pkt *const packet) | 
| Check if the given packet corresponds to the RTP profile.  More... | |
| static bool | c_rtp_check_context (const struct rohc_comp_ctxt *const context, const struct net_pkt *const packet, size_t *const cr_score) | 
| Check if the IP/UDP/RTP packet belongs to the context.  More... | |
| static int | c_rtp_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) | 
| Encode an IP/UDP/RTP packet according to a pattern decided by several different factors.  More... | |
| static void | rtp_decide_state (struct rohc_comp_ctxt *const context) | 
| Decide the state that should be used for the next packet compressed with the ROHC RTP profile.  More... | |
| static rohc_packet_t | c_rtp_decide_FO_packet (const struct rohc_comp_ctxt *context) | 
| Decide which packet to send when in First Order (FO) state.  More... | |
| static rohc_packet_t | c_rtp_decide_SO_packet (const struct rohc_comp_ctxt *context) | 
| Decide which packet to send when in Second Order (SO) state.  More... | |
| static rohc_ext_t | c_rtp_decide_extension (const struct rohc_comp_ctxt *context) | 
| Decide what extension shall be used in the UO-1/UO-2 packet.  More... | |
| static uint32_t | c_rtp_get_next_sn (const struct rohc_comp_ctxt *const context, const struct net_pkt *const uncomp_pkt) | 
| Determine the SN value for the next packet.  More... | |
| static bool | rtp_encode_uncomp_fields (struct rohc_comp_ctxt *const context, const struct net_pkt *const uncomp_pkt) | 
| Encode uncompressed RTP fields.  More... | |
| static size_t | rtp_code_static_rtp_part (const struct rohc_comp_ctxt *const context, const uint8_t *const next_header, uint8_t *const dest, const size_t counter) | 
| Build the static part of the UDP/RTP headers.  More... | |
| static size_t | rtp_code_dynamic_rtp_part (const struct rohc_comp_ctxt *const context, const uint8_t *const next_header, uint8_t *const dest, const size_t counter) | 
| Build the dynamic part of the UDP/RTP headers.  More... | |
| static int | rtp_changed_rtp_dynamic (const struct rohc_comp_ctxt *const context, const struct udphdr *const udp, const struct rtphdr *const rtp) | 
| Check if the dynamic part of the UDP/RTP headers changed.  More... | |
| Variables | |
| const struct rohc_comp_profile | c_rtp_profile | 
| Define the compression part of the RTP profile as described in the RFC 3095.  More... | |
ROHC compression context for the RTP profile.
| 
 | static | 
Check if the IP/UDP/RTP packet belongs to the context.
Conditions are:
All the context but the last one are done by the c_udp_check_context() function.
This function is one of the functions that must exist in one profile for the framework to work.
| context | The compression context | |
| packet | The IP/UDP/RTP packet to check | |
| [out] | cr_score | The score of the context for Context Replication (CR) | 
| 
 | static | 
Check if the given packet corresponds to the RTP profile.
Conditions are:
This function is one of the functions that must exist in one profile for the framework to work.
| comp | The ROHC compressor | 
| packet | The packet to check | 
| 
 | static | 
Create a new RTP context and initialize it thanks to the given IP/UDP/RTP packet.
This function is one of the functions that must exist in one profile for the framework to work.
| context | The compression context | 
| packet | The IP/UDP/RTP packet given to initialize the new context | 
| 
 | static | 
Decide what extension shall be used in the UO-1/UO-2 packet.
Extensions 0, 1 & 2 are IPv4 only because of the IP-ID.
| context | The compression context | 
| 
 | static | 
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 | 
| 
 | static | 
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 | 
| 
 | static | 
Destroy the RTP context.
This function is one of the functions that must exist in one profile for the framework to work.
| context | The RTP compression context to destroy | 
| 
 | static | 
Encode an IP/UDP/RTP packet according to a pattern decided by several different factors.
| context | The compression context | 
| uncomp_pkt | The uncompressed 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 | 
| 
 | static | 
Determine the SN value for the next packet.
Profile SN is the 16-bit RTP SN.
| context | The compression context | 
| uncomp_pkt | The uncompressed packet to encode | 
| 
 | static | 
Check if the dynamic part of the UDP/RTP headers changed.
| context | The compression context | 
| udp | The UDP header | 
| rtp | The RTP header | 
| 
 | static | 
Build the dynamic part of the UDP/RTP headers.
 Dynamic part of UDP header (5.7.7.5):
    +---+---+---+---+---+---+---+---+
 1  /           Checksum            /   2 octets
    +---+---+---+---+---+---+---+---+
 Dynamic part of RTP header (5.7.7.6):
    +---+---+---+---+---+---+---+---+
 2  |  V=2  | P | RX|      CC       |  (RX is NOT the RTP X bit)
    +---+---+---+---+---+---+---+---+
 3  | M |            PT             |
    +---+---+---+---+---+---+---+---+
 4  /      RTP Sequence Number      /  2 octets
    +---+---+---+---+---+---+---+---+
 5  /   RTP Timestamp (absolute)    /  4 octets
    +---+---+---+---+---+---+---+---+
 6  /      Generic CSRC list        /  variable length
    +---+---+---+---+---+---+---+---+
 7  : Reserved  | X |  Mode |TIS|TSS:  if RX = 1
    +---+---+---+---+---+---+---+---+
 8  :         TS_Stride             :  1-4 octets, if TSS = 1
    +---+---+---+---+---+---+---+---+
 9  :         Time_Stride           :  1-4 octets, if TIS = 1
    +---+---+---+---+---+---+---+---+Parts 6 & 9 are not supported yet. The TIS flag in part 7 is not supported.
| context | The compression context | 
| next_header | The UDP/RTP headers | 
| dest | The rohc-packet-under-build buffer | 
| counter | The current position in the rohc-packet-under-build buffer | 
| 
 | static | 
Build the static part of the UDP/RTP headers.
 Static part of UDP header (5.7.7.5):
    +---+---+---+---+---+---+---+---+
 1  /          Source Port          /   2 octets
    +---+---+---+---+---+---+---+---+
 2  /       Destination Port        /   2 octets
    +---+---+---+---+---+---+---+---+
 Static part of RTP header (5.7.7.6):
    +---+---+---+---+---+---+---+---+
 3  /             SSRC              /   4 octets
    +---+---+---+---+---+---+---+---+Parts 1 & 2 are done by the udp_code_static_udp_part() function. Part 3 is done by this function.
| context | The compression context | 
| next_header | The UDP/RTP headers | 
| dest | The rohc-packet-under-build buffer | 
| counter | The current position in the rohc-packet-under-build buffer | 
| 
 | static | 
Decide the state that should be used for the next packet compressed with the ROHC RTP profile.
The three states are:
| context | The compression context | 
| 
 | static | 
Encode uncompressed RTP fields.
Handle the RTP TS field.
| context | The compression context | 
| uncomp_pkt | The uncompressed packet to encode | 
| const struct rohc_comp_profile c_rtp_profile | 
Define the compression part of the RTP profile as described in the RFC 3095.
 1.8.13
 1.8.13