ROHC compression/decompression library
Functions
net_pkt.c File Reference

Network packet (may contains several IP headers) More...

#include "net_pkt.h"
#include "protocols/ip_numbers.h"
#include "rohc_traces_internal.h"
Include dependency graph for net_pkt.c:

Functions

void net_pkt_parse (struct net_pkt *const packet, const struct rohc_buf data, rohc_trace_callback2_t trace_cb, void *const trace_cb_priv, rohc_trace_entity_t trace_entity)
 Parse a network packet. More...
 
size_t net_pkt_get_payload_offset (const struct net_pkt *const packet)
 Get the offset of the IP payload in the given packet. More...
 

Detailed Description

Network packet (may contains several IP headers)

Author
Didier Barvaux didie.nosp@m.r.ba.nosp@m.rvaux.nosp@m.@tou.nosp@m.louse.nosp@m..viv.nosp@m.eris..nosp@m.com

Function Documentation

◆ net_pkt_get_payload_offset()

size_t net_pkt_get_payload_offset ( const struct net_pkt *const  packet)

Get the offset of the IP payload in the given packet.

The payload begins after the innermost IP header (and its extension headers).

Parameters
packetThe packet to get the payload offset for
Returns
The payload offset (in bytes)

◆ net_pkt_parse()

void net_pkt_parse ( struct net_pkt *const  packet,
const struct rohc_buf  data,
rohc_trace_callback2_t  trace_cb,
void *const  trace_cb_priv,
rohc_trace_entity_t  trace_entity 
)

Parse a network packet.

Parameters
[out]packetThe parsed packet
dataThe data to parse
trace_cbThe function to call for printing traces
trace_cb_privAn optional private context, may be NULL
trace_entityThe entity that emits the traces