netif.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2016 Kaspar Schleiser <kaspar@schleiser.de>
3  * Copyright (C) 2017 Freie Universit├Ąt Berlin
4  *
5  * This file is subject to the terms and conditions of the GNU Lesser
6  * General Public License v2.1. See the file LICENSE in the top level
7  * directory for more details.
8  */
9 
30 #ifndef NET_NETIF_H
31 #define NET_NETIF_H
32 
33 #include "net/netopt.h"
34 
35 #include "netif_types.h"
36 
37 #ifdef __cplusplus
38 extern "C" {
39 #endif
40 
44 #ifndef NETIF_NAMELENMAX
45 #define NETIF_NAMELENMAX (8U)
46 #endif
47 
62 
79 int netif_get_name(netif_t netif, char *name);
80 
95 netif_t netif_get_by_name(const char *name);
96 
111 int netif_get_opt(netif_t netif, netopt_t opt, uint16_t context,
112  void *value, size_t max_len);
113 
128 int netif_set_opt(netif_t netif, netopt_t opt, uint16_t context,
129  void *value, size_t value_len);
130 
131 #ifdef __cplusplus
132 }
133 #endif
134 
135 #endif /* NET_NETIF_H */
136 
int netif_set_opt(netif_t netif, netopt_t opt, uint16_t context, void *value, size_t value_len)
Sets option to an interface.
int netif_get_name(netif_t netif, char *name)
Gets name of an interface.
netopt_t
Global list of configuration options available throughout the network stack, e.g. ...
Definition: netopt.h:42
GNRC-specfic type definitions for Network interfaces.
netif_t netif_get_by_name(const char *name)
Gets interface by name.
kernel_pid_t netif_t
GNRC-representation of a network interface.
Definition: netif_types.h:29
Definition of global configuration options.
int netif_get_opt(netif_t netif, netopt_t opt, uint16_t context, void *value, size_t max_len)
Gets option from an interface.
netif_t netif_iter(netif_t last)
Iterator for the interfaces.