Definition for GNRC's network interfaces. More...

Detailed Description

Definition for GNRC's network interfaces.

Author
Martine Lenders mlend.nosp@m.ers@.nosp@m.inf.f.nosp@m.u-be.nosp@m.rlin..nosp@m.de

Definition in file netif.h.

#include <stddef.h>
#include <stdint.h>
#include <stdbool.h>
#include "kernel_types.h"
#include "msg.h"
#include "event.h"
#include "net/ipv6/addr.h"
#include "net/gnrc/netapi.h"
#include "net/gnrc/pkt.h"
#include "net/gnrc/netif/conf.h"
#include "net/gnrc/netif/flags.h"
#include "net/ndp.h"
#include "net/netdev.h"
#include "net/netopt.h"
#include "rmutex.h"
#include "net/netif.h"
+ Include dependency graph for netif.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_t
 Representation of a network interface. More...
 
struct  gnrc_netif_ops
 

Typedefs

typedef struct gnrc_netif_ops gnrc_netif_ops_t
 Operations to an interface.
 

Enumerations

enum  gnrc_netif_bus_t { GNRC_NETIF_BUS_IPV6, GNRC_NETIF_BUS_NUMOF }
 Per-Interface Event Message Busses. More...
 
enum  gnrc_ipv6_event_t { GNRC_IPV6_EVENT_ADDR_VALID }
 Event types for GNRC_NETIF_BUS_IPV6 per-interface message bus. More...
 

Functions

void gnrc_netif_init_devs (void)
 Initialize all available network interfaces. More...
 
int gnrc_netif_create (gnrc_netif_t *netif, char *stack, int stacksize, char priority, const char *name, netdev_t *dev, const gnrc_netif_ops_t *ops)
 Creates a network interface. More...
 
unsigned gnrc_netif_numof (void)
 Get number of network interfaces actually allocated. More...
 
static bool gnrc_netif_highlander (void)
 Check if there can only be one gnrc_netif_t interface. More...
 
gnrc_netif_tgnrc_netif_iter (const gnrc_netif_t *prev)
 Iterate over all network interfaces. More...
 
gnrc_netif_tgnrc_netif_get_by_pid (kernel_pid_t pid)
 Get network interface by PID. More...
 
static int gnrc_netif_ipv6_addrs_get (const gnrc_netif_t *netif, ipv6_addr_t *addrs, size_t max_len)
 Gets the (unicast on anycast) IPv6 address of an interface (if IPv6 is supported) More...
 
static int gnrc_netif_ipv6_addr_add (const gnrc_netif_t *netif, ipv6_addr_t *addr, unsigned pfx_len, uint8_t flags)
 Adds an (unicast or anycast) IPv6 address to an interface (if IPv6 is supported) More...
 
static int gnrc_netif_ipv6_addr_remove (const gnrc_netif_t *netif, ipv6_addr_t *addr)
 Removes a (unicast or anycast) IPv6 address from an interface (if IPv6 is supported) More...
 
static int gnrc_netif_ipv6_groups_get (const gnrc_netif_t *netif, ipv6_addr_t *groups, size_t max_len)
 Gets the IPv6 multicast groups an interface is joined to (if IPv6 is supported) More...
 
static int gnrc_netif_ipv6_group_join (const gnrc_netif_t *netif, ipv6_addr_t *group)
 Joins an IPv6 multicast group on an interface (if IPv6 is supported) More...
 
static int gnrc_netif_ipv6_group_leave (const gnrc_netif_t *netif, ipv6_addr_t *group)
 Leaves an IPv6 multicast group on an interface (if IPv6 is supported) More...
 
void gnrc_netif_default_init (gnrc_netif_t *netif)
 Default operation for gnrc_netif_ops_t::init() More...
 
int gnrc_netif_get_from_netdev (gnrc_netif_t *netif, gnrc_netapi_opt_t *opt)
 Default operation for gnrc_netif_ops_t::get() More...
 
int gnrc_netif_set_from_netdev (gnrc_netif_t *netif, const gnrc_netapi_opt_t *opt)
 Default operation for gnrc_netif_ops_t::set() More...
 
static char * gnrc_netif_addr_to_str (const uint8_t *addr, size_t addr_len, char *out)
 Converts a hardware address to a human readable string. More...
 
static size_t gnrc_netif_addr_from_str (const char *str, uint8_t *out)
 Parses a string of colon-separated hexadecimals to a hardware address. More...
 
static int gnrc_netif_send (gnrc_netif_t *netif, gnrc_pktsnip_t *pkt)
 Send a GNRC packet via a given gnrc_netif_t interface. More...
 
static msg_bus_tgnrc_netif_get_bus (gnrc_netif_t *netif, gnrc_netif_bus_t type)
 Get a message bus of a given gnrc_netif_t interface. More...