Generic network interface header. More...
Generic network interface header.
Definition in file hdr.h.
#include <errno.h>#include <string.h>#include <stdint.h>#include "net/gnrc/netif/internal.h"#include "net/gnrc/pkt.h"#include "net/gnrc/pktbuf.h"#include "net/gnrc/netif.h"#include "time_units.h" Include dependency graph for hdr.h:
 Include dependency graph for hdr.h: This graph shows which files directly or indirectly include this file:
 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. | |
| #define | GNRC_NETIF_HDR_NO_RSSI (INT16_MIN) | 
| Special value to indicate that no RSSI value is present. | |
| #define | GNRC_NETIF_HDR_NO_LQI (0) | 
| Special value to indicate that no LQI value is present. | |
| 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. | |
| static size_t | gnrc_netif_hdr_sizeof (const gnrc_netif_hdr_t *hdr) | 
| Get the size of the given generic network interface header. | |
| static uint8_t * | gnrc_netif_hdr_get_src_addr (const gnrc_netif_hdr_t *hdr) | 
| Get the source address from the given header. | |
| static void | gnrc_netif_hdr_set_src_addr (gnrc_netif_hdr_t *hdr, const uint8_t *addr, uint8_t addr_len) | 
| Set the source address in the given header. | |
| static uint8_t * | gnrc_netif_hdr_get_dst_addr (const gnrc_netif_hdr_t *hdr) | 
| Get the destination address from the given header. | |
| static void | gnrc_netif_hdr_set_dst_addr (gnrc_netif_hdr_t *hdr, const uint8_t *addr, uint8_t addr_len) | 
| Set the destination address in the given header. | |
| static void | gnrc_netif_hdr_set_timestamp (gnrc_netif_hdr_t *hdr, uint64_t timestamp) | 
| Set the timestamp in the netif header. | |
| static int | gnrc_netif_hdr_get_timestamp (const gnrc_netif_hdr_t *hdr, uint64_t *dest) | 
| Get the timestamp of the frame in nanoseconds since epoch. | |
| static int | gnrc_netif_hdr_ipv6_iid_from_src (const gnrc_netif_t *netif, const gnrc_netif_hdr_t *hdr, eui64_t *iid) | 
| Converts the source address of a given Generic network interface header to an IPv6 IID. | |
| static int | gnrc_netif_hdr_ipv6_iid_from_dst (const gnrc_netif_t *netif, const gnrc_netif_hdr_t *hdr, eui64_t *iid) | 
| Converts the destination address of a given Generic network interface header to an IPv6 IID. | |
| gnrc_pktsnip_t * | gnrc_netif_hdr_build (const uint8_t *src, uint8_t src_len, const uint8_t *dst, uint8_t dst_len) | 
| Builds a generic network interface header for sending and adds it to the packet buffer. | |
| static gnrc_netif_t * | gnrc_netif_hdr_get_netif (const gnrc_netif_hdr_t *hdr) | 
| Convenience function to get the corresponding interface struct for a given interface header. | |
| static void | gnrc_netif_hdr_set_netif (gnrc_netif_hdr_t *hdr, const gnrc_netif_t *netif) | 
| Convenience function to set the interface of an interface header, given the network interface. | |
| void | gnrc_netif_hdr_print (gnrc_netif_hdr_t *hdr) | 
| Outputs a generic interface header to stdout. | |
| uint8_t | gnrc_netif_hdr_get_flag (gnrc_pktsnip_t *pkt) | 
| Fetch the netif header flags of a gnrc packet. | |
| int | gnrc_netif_hdr_get_dstaddr (gnrc_pktsnip_t *pkt, uint8_t **pointer_to_addr) | 
| Extract the destination address out of a gnrc packet. | |
| int | gnrc_netif_hdr_get_srcaddr (gnrc_pktsnip_t *pkt, uint8_t **pointer_to_addr) | 
| Extract the source address out of a gnrc packet. | |
| Flags for the gnrc_netif_hdr_t | |
| #define | GNRC_NETIF_HDR_FLAGS_BROADCAST (0x80) | 
| Send packet broadcast. | |
| #define | GNRC_NETIF_HDR_FLAGS_MULTICAST (0x40) | 
| Send packet multicast. | |
| #define | GNRC_NETIF_HDR_FLAGS_MORE_DATA (0x10) | 
| More data will follow. | |
| #define | GNRC_NETIF_HDR_FLAGS_TIMESTAMP (0x08) | 
| Indicate presence of a valid timestamp. | |