Loading...
Searching...
No Matches

General definitions for network packets and their helper functions. More...

Detailed Description

General definitions for network packets and their helper functions.

Author
Martine Lenders mlend.nosp@m.ers@.nosp@m.inf.f.nosp@m.u-be.nosp@m.rlin..nosp@m.de
Hauke Petersen hauke.nosp@m..pet.nosp@m.ersen.nosp@m.@fu-.nosp@m.berli.nosp@m.n.de

Definition in file pkt.h.

#include <inttypes.h>
#include <stdlib.h>
#include "sched.h"
#include "net/gnrc/nettype.h"
#include "list.h"
+ Include dependency graph for pkt.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  gnrc_pktsnip
 Type to represent parts (either headers or payload) of a packet, called snips. More...
 

Typedefs

typedef struct gnrc_pktsnip gnrc_pktsnip_t
 Type to represent parts (either headers or payload) of a packet, called snips.
 

Functions

static gnrc_pktsnip_tgnrc_pkt_prev_snip (gnrc_pktsnip_t *pkt, gnrc_pktsnip_t *snip)
 Returns the snip before a given snip in a packet.
 
static size_t gnrc_pkt_len (const gnrc_pktsnip_t *pkt)
 Calculates length of a packet in byte.
 
static gnrc_pktsnip_tgnrc_pkt_append (gnrc_pktsnip_t *pkt, gnrc_pktsnip_t *snip)
 Appends a snip to a packet.
 
static gnrc_pktsnip_tgnrc_pkt_prepend (gnrc_pktsnip_t *pkt, gnrc_pktsnip_t *snip)
 Prepends a snip to a packet.
 
static gnrc_pktsnip_tgnrc_pkt_delete (gnrc_pktsnip_t *pkt, gnrc_pktsnip_t *snip)
 Deletes a snip from a packet.
 
static size_t gnrc_pkt_len_upto (const gnrc_pktsnip_t *pkt, gnrc_nettype_t type)
 Calculates length of a packet in byte up to (including) a snip with the given type.
 
static size_t gnrc_pkt_count (const gnrc_pktsnip_t *pkt)
 Count the numbers of snips in the given packet.
 
gnrc_pktsnip_tgnrc_pktsnip_search_type (gnrc_pktsnip_t *pkt, gnrc_nettype_t type)
 Searches the packet for a packet snip of a specific type.