ROHC compression/decompression library
|
ROHC compression context for the UDP profile. More...
Go to the source code of this file.
Functions | |
bool | c_udp_check_profile (const struct rohc_comp *const comp, const struct net_pkt *const packet) |
Check if the given packet corresponds to the UDP profile. More... | |
bool | c_udp_check_context (const struct rohc_comp_ctxt *context, const struct net_pkt *const packet) |
Check if the IP/UDP packet belongs to the context. More... | |
size_t | udp_code_uo_remainder (const struct rohc_comp_ctxt *context, const uint8_t *next_header, uint8_t *const dest, const size_t counter) |
Build UDP-related fields in the tail of the UO packets. More... | |
size_t | udp_code_static_udp_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 header. More... | |
ROHC compression context for the UDP profile.
bool c_udp_check_context | ( | const struct rohc_comp_ctxt *const | context, |
const struct net_pkt *const | packet | ||
) |
Check if the IP/UDP packet belongs to the context.
Conditions are:
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 packet to check |
Check if the given packet corresponds to the UDP 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 |
size_t udp_code_static_udp_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 header.
Static part of UDP header (5.7.7.5): +---+---+---+---+---+---+---+---+ 1 / Source Port / 2 octets +---+---+---+---+---+---+---+---+ 2 / Destination Port / 2 octets +---+---+---+---+---+---+---+---+
context | The compression context |
next_header | The UDP header |
dest | The rohc-packet-under-build buffer |
counter | The current position in the rohc-packet-under-build buffer |
size_t udp_code_uo_remainder | ( | const struct rohc_comp_ctxt *const | context, |
const uint8_t *const | next_header, | ||
uint8_t *const | dest, | ||
const size_t | counter | ||
) |
Build UDP-related fields in the tail of the UO packets.
--- --- --- --- --- --- --- --- : : 13 + UDP Checksum + 2 octets, : : if context(UDP Checksum) != 0 --- --- --- --- --- --- --- ---
context | The compression context |
next_header | The UDP header |
dest | The rohc-packet-under-build buffer |
counter | The current position in the rohc-packet-under-build buffer |