Generic network interface header. More...

Detailed Description

#include <string.h>
#include <stdint.h>
#include "net/gnrc/pkt.h"
#include "net/gnrc/pktbuf.h"
+ Include dependency graph for gnrc/netif/hdr.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  gnrc_netif_hdr_t
 Generic network interface header. More...
 

Macros

#define GNRC_NETIF_HDR_L2ADDR_MAX_LEN   (8)
 Maximum length of the l2 addresses of the generic interface header in bytes.
 
#define GNRC_NETIF_HDR_L2ADDR_PRINT_LEN   (GNRC_NETIF_HDR_L2ADDR_MAX_LEN * 3)
 Maximum length of the string representatiom of l2 addresses of the generic interface header in bytes.
 
Flags for the gnrc_netif_hdr_t
#define GNRC_NETIF_HDR_FLAGS_BROADCAST   (0x80)
 Send packet broadcast. More...
 
#define GNRC_NETIF_HDR_FLAGS_MULTICAST   (0x40)
 Send packet multicast. More...
 

Functions

static void gnrc_netif_hdr_init (gnrc_netif_hdr_t *hdr, uint8_t src_l2addr_len, uint8_t dst_l2addr_len)
 Initialize the given generic network interface header. More...
 
static size_t gnrc_netif_hdr_sizeof (gnrc_netif_hdr_t *hdr)
 Get the size of the given generic network interface header. More...
 
static uint8_t * gnrc_netif_hdr_get_src_addr (gnrc_netif_hdr_t *hdr)
 Get the source address from the given header. More...
 
static void gnrc_netif_hdr_set_src_addr (gnrc_netif_hdr_t *hdr, uint8_t *addr, uint8_t addr_len)
 Set the source address in the given header. More...
 
static uint8_t * gnrc_netif_hdr_get_dst_addr (gnrc_netif_hdr_t *hdr)
 Get the destination address from the given header. More...
 
static void gnrc_netif_hdr_set_dst_addr (gnrc_netif_hdr_t *hdr, uint8_t *addr, uint8_t addr_len)
 Set the destination address in the given header. More...
 
gnrc_pktsnip_tgnrc_netif_hdr_build (uint8_t *src, uint8_t src_len, uint8_t *dst, uint8_t dst_len)
 Builds a generic network interface header for sending and adds it to the packet buffer. More...
 
void gnrc_netif_hdr_print (gnrc_netif_hdr_t *hdr)
 Outputs a generic interface header to stdout. More...
 
uint8_t gnrc_netif_hdr_get_flag (gnrc_pktsnip_t *pkt)
 Fetch the netif header flags of a gnrc packet. More...
 
int gnrc_netif_hdr_get_dstaddr (gnrc_pktsnip_t *pkt, uint8_t **pointer_to_addr)
 Extract the destination address out of a gnrc packet. More...
 
int gnrc_netif_hdr_get_srcaddr (gnrc_pktsnip_t *pkt, uint8_t **pointer_to_addr)
 Extract the source address out of a gnrc packet. More...