All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
Loading...
Searching...
No Matches

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 "sched.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/l2util.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
 

Macros

#define GNRC_NETIF_EVQ_INDEX_PRIO_HIGH   (0)
 Index of the high priority queue.
 
#define GNRC_NETIF_EVQ_INDEX_PRIO_LOW   GNRC_NETIF_EVQ_INDEX_PRIO_HIGH
 Index of the low priority queue.
 
#define GNRC_NETIF_EVQ_NUMOF   (GNRC_NETIF_EVQ_INDEX_PRIO_LOW + 1)
 Number of event queues.
 

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 Buses. More...
 
enum  gnrc_ipv6_event_t { GNRC_IPV6_EVENT_ADDR_VALID }
 Event types for GNRC_NETIF_BUS_IPV6 per-interface message bus. More...
 

Functions

static bool gnrc_netif_netdev_legacy_api (gnrc_netif_t *netif)
 Check if the device belonging to the given netif uses the legacy netdev API.
 
static bool gnrc_netif_netdev_new_api (gnrc_netif_t *netif)
 Check if the device belonging to the given netif uses the new netdev API.
 
void gnrc_netif_init_devs (void)
 Initialize all available network interfaces.
 
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.
 
unsigned gnrc_netif_numof (void)
 Get number of network interfaces actually allocated.
 
static bool gnrc_netif_highlander (void)
 Check if there can only be one gnrc_netif_t interface.
 
gnrc_netif_tgnrc_netif_iter (const gnrc_netif_t *prev)
 Iterate over all network interfaces.
 
gnrc_netif_tgnrc_netif_get_by_pid (kernel_pid_t pid)
 Get network interface by PID.
 
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)
 
static int gnrc_netif_ipv6_addr_add (const gnrc_netif_t *netif, const ipv6_addr_t *addr, unsigned pfx_len, uint8_t flags)
 Adds an (unicast or anycast) IPv6 address to an interface (if IPv6 is supported)
 
static int gnrc_netif_ipv6_addr_remove (const gnrc_netif_t *netif, const ipv6_addr_t *addr)
 Removes a (unicast or anycast) IPv6 address from an interface (if IPv6 is supported)
 
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)
 
static int gnrc_netif_ipv6_group_join (const gnrc_netif_t *netif, const ipv6_addr_t *group)
 Joins an IPv6 multicast group on an interface (if IPv6 is supported)
 
static int gnrc_netif_ipv6_group_leave (const gnrc_netif_t *netif, const ipv6_addr_t *group)
 Leaves an IPv6 multicast group on an interface (if IPv6 is supported)
 
int gnrc_netif_default_init (gnrc_netif_t *netif)
 Default operation for gnrc_netif_ops_t::init()
 
int gnrc_netif_get_from_netdev (gnrc_netif_t *netif, gnrc_netapi_opt_t *opt)
 Default operation for gnrc_netif_ops_t::get()
 
int gnrc_netif_set_from_netdev (gnrc_netif_t *netif, const gnrc_netapi_opt_t *opt)
 Default operation for gnrc_netif_ops_t::set()
 
gnrc_netif_tgnrc_netif_get_by_type (netdev_type_t type, uint8_t index)
 Gets an interface by the netdev type (and index)
 
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.
 
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.
 
static int gnrc_netif_send (gnrc_netif_t *netif, gnrc_pktsnip_t *pkt)
 Send a GNRC packet via a given gnrc_netif_t interface.
 
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.
 
bool gnrc_netif_ipv6_wait_for_global_address (gnrc_netif_t *netif, uint32_t timeout_ms)
 Wait for a global address to become available.