Loading...
Searching...
No Matches
netif.h File Reference

Common network interface API definitions. More...

Detailed Description

Common network interface API definitions.

Author
Martine Lenders m.len.nosp@m.ders.nosp@m.@fu-b.nosp@m.erli.nosp@m.n.de
Kaspar Schleiser kaspa.nosp@m.r@sc.nosp@m.hleis.nosp@m.er.d.nosp@m.e
José Ignacio Alamos jose..nosp@m.alam.nosp@m.os@ha.nosp@m.w-ha.nosp@m.mburg.nosp@m..de

Definition in file netif.h.

#include <stdint.h>
#include <string.h>
#include <unistd.h>
#include "list.h"
#include "net/netopt.h"
#include "net/ipv6.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  netif_t
 Network interface descriptor. More...
 

Macros

#define CONFIG_NETIF_NAMELENMAX   (8U)
 Maximum length for an interface name.
 

Functions

netif_tnetif_iter (const netif_t *last)
 Iterator for the interfaces.
 
int netif_get_name (const netif_t *netif, char *name)
 Gets name of an interface.
 
int16_t netif_get_id (const netif_t *netif)
 Gets the numeric identifier of an interface.
 
netif_tnetif_get_by_name_buffer (const char *name, size_t name_len)
 Gets interface by name, from a buffer.
 
static netif_tnetif_get_by_name (const char *name)
 Gets interface by name.
 
netif_tnetif_get_by_id (int16_t id)
 Gets interface by a numeric identifier.
 
int netif_get_opt (const netif_t *netif, netopt_t opt, uint16_t context, void *value, size_t max_len)
 Gets option from an interface.
 
int netif_set_opt (const netif_t *netif, netopt_t opt, uint16_t context, void *value, size_t value_len)
 Sets option to an interface.
 
int netif_register (netif_t *netif)
 Registers a network interface in the global interface list.
 
static ssize_t netif_get_ipv6 (netif_t *netif, ipv6_addr_t *dest, size_t numof)
 Get IPv6 address(es) of the given interface.
 
ssize_t netifs_get_ipv6 (ipv6_addr_t *dest, size_t numof)
 Get IPv6 address(es) of all interfaces.
 
void netif_print_ipv6 (netif_t *netif, const char *separator)
 Print the IPv6 address(es) of the given interface.
 
void netifs_print_ipv6 (const char *separator)
 Print the IPv6 address(es) of all interface.