Common network interface API definitions. More...
Common network interface API definitions.
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"
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_t * | netif_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_t * | netif_get_by_name_buffer (const char *name, size_t name_len) |
Gets interface by name, from a buffer. | |
static netif_t * | netif_get_by_name (const char *name) |
Gets interface by name. | |
netif_t * | netif_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. | |