ROHC decompression context for the IP-only profile.
More...
Functions |
static void | d_ip_destroy (void *const context) |
| Destroy the given IP-only context.
|
void * | d_ip_create (const struct rohc_decomp_ctxt *const context) |
| Create the IP decompression context.
|
rohc_packet_t | ip_detect_packet_type (const struct rohc_decomp_ctxt *const context, const uint8_t *const rohc_packet, const size_t rohc_length, const size_t large_cid_len) |
| Detect the type of ROHC packet for IP-based non-RTP profiles.
|
int | ip_parse_dynamic_ip (const struct rohc_decomp_ctxt *const context, const uint8_t *packet, const size_t length, struct rohc_extr_bits *const bits) |
| Parse the IP dynamic part of the ROHC packet.
|
int | ip_parse_ext3 (const struct rohc_decomp_ctxt *const context, const unsigned char *const rohc_data, const size_t rohc_data_len, const rohc_packet_t packet_type, struct rohc_extr_bits *const bits) |
| Parse the extension 3 of the UOR-2 packet.
|
int | parse_inner_header_flags (const struct rohc_decomp_ctxt *const context, const unsigned char *const flags, const unsigned char *fields, const size_t length, struct rohc_extr_ip_bits *const bits) |
| Parse the inner IP header flags and fields.
|
int | parse_outer_header_flags (const struct rohc_decomp_ctxt *const context, const unsigned char *const flags, const unsigned char *fields, const size_t length, struct rohc_extr_ip_bits *const bits) |
| Parse the outer IP header flags and fields.
|
Variables |
struct rohc_decomp_profile | d_ip_profile |
| Define the decompression part of the IP-only profile as described in the RFC 3843.
|
Detailed Description
ROHC decompression context for the IP-only profile.
- Author:
- Didier Barvaux <didier.barvaux@toulouse.viveris.com>
-
Didier Barvaux <didier@barvaux.org>
Function Documentation
Create the IP decompression context.
This function is one of the functions that must exist in one profile for the framework to work.
- Parameters:
-
context | The decompression context |
- Returns:
- The newly-created IP decompression context
Destroy the given IP-only context.
This function is one of the functions that must exist in one profile for the framework to work.
- Parameters:
-
context | The compression context |
Detect the type of ROHC packet for IP-based non-RTP profiles.
- Parameters:
-
context | The decompression context |
rohc_packet | The ROHC packet |
rohc_length | The length of the ROHC packet |
large_cid_len | The length of the optional large CID field |
- Returns:
- The packet type
Parse the IP dynamic part of the ROHC packet.
- Parameters:
-
context | The decompression context |
packet | The ROHC packet to parse |
length | The length of the ROHC packet |
bits | OUT: The bits extracted from the ROHC header |
- Returns:
- The number of bytes read in the ROHC packet, -1 in case of failure
Parse the extension 3 of the UOR-2 packet.
Extension 3 for non-RTP profiles (5.7.5 & 5.11.4):
0 1 2 3 4 5 6 7
+-----+-----+-----+-----+-----+-----+-----+-----+
1 | 1 1 | S | Mode | I | ip | ip2 |
+-----+-----+-----+-----+-----+-----+-----+-----+
2 | Inner IP header flags | | if ip = 1
+-----+-----+-----+-----+-----+-----+-----+-----+
3 | Outer IP header flags | if ip2 = 1
+-----+-----+-----+-----+-----+-----+-----+-----+
4 | SN | if S = 1
+-----+-----+-----+-----+-----+-----+-----+-----+
| |
5 / Inner IP header fields / variable,
| | if ip = 1
+-----+-----+-----+-----+-----+-----+-----+-----+
6 | IP-ID | 2 octets, if I = 1
+-----+-----+-----+-----+-----+-----+-----+-----+
| |
7 / Outer IP header fields / variable,
| | if ip2 = 1
+-----+-----+-----+-----+-----+-----+-----+-----+
- Parameters:
-
context | The decompression context |
rohc_data | The ROHC data to parse |
rohc_data_len | The length of the ROHC data to parse |
packet_type | The type of ROHC packet to parse |
bits | IN: the bits already found in base header OUT: the bits found in the extension header 3 |
- Returns:
- The data length read from the ROHC packet, -1 in case of error
Parse the inner IP header flags and fields.
Store the values in an IP header info structure.
Inner IP header flags (5.7.5):
0 1 2 3 4 5 6 7
..... ..... ..... ..... ..... ..... ..... .....
| TOS | TTL | DF | PR | IPX | NBO | RND | ip2 | if ip = 1
..... ..... ..... ..... ..... ..... ..... .....
Inner IP header fields (5.7.5):
..... ..... ..... ..... ..... ..... ..... .....
| Type of Service/Traffic Class | if TOS = 1
..... ..... ..... ..... ..... ..... ..... .....
| Time to Live/Hop Limit | if TTL = 1
..... ..... ..... ..... ..... ..... ..... .....
| Protocol/Next Header | if PR = 1
..... ..... ..... ..... ..... ..... ..... .....
/ IP extension headers / variable,
..... ..... ..... ..... ..... ..... ..... ..... if IPX = 1
- Parameters:
-
context | The decompression context |
flags | The ROHC flags that indicate which IP fields are present in the packet |
fields | The ROHC packet part that contains some IP header fields |
length | The length of the ROHC packet part that contains some IP header fields |
bits | OUT: The bits extracted from extension 3 |
- Returns:
- The data length read from the ROHC packet, -1 in case of error
Parse the outer IP header flags and fields.
Store the values in an IP header info structure.
Outer IP header flags (5.7.5):
0 1 2 3 4 5 6 7
..... ..... ..... ..... ..... ..... ..... .....
| TOS2| TTL2| DF2 | PR2 |IPX2 |NBO2 |RND2 | I2 | if ip2 = 1
..... ..... ..... ..... ..... ..... ..... .....
Outer IP header fields
..... ..... ..... ..... ..... ..... ..... .....
| Type of Service/Traffic Class | if TOS2 = 1
..... ..... ..... ..... ..... ..... ..... .....
| Time to Live/Hop Limit | if TTL2 = 1
..... ..... ..... ..... ..... ..... ..... .....
| Protocol/Next Header | if PR2 = 1
..... ..... ..... ..... ..... ..... ..... .....
/ IP extension header(s) / variable,
..... ..... ..... ..... ..... ..... ..... ..... if IPX2 = 1
| IP-ID | 2 octets,
..... ..... ..... ..... ..... ..... ..... ..... if I2 = 1
- Parameters:
-
context | The decompression context |
flags | The ROHC flags that indicate which IP fields are present in the packet |
fields | The ROHC packet part that contain some IP header fields |
length | The length of the ROHC packet part that contains some IP header fields |
bits | OUT: The bits extracted from extension 3 |
- Returns:
- The data length read from the ROHC packet, -1 in case of error
Variable Documentation
Initial value:
Define the decompression part of the IP-only profile as described in the RFC 3843.