Zephyr API Documentation 4.0.0-rc3
A Scalable Open Source RTOS
Loading...
Searching...
No Matches
if.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2019 Linaro Limited
3 *
4 * SPDX-License-Identifier: Apache-2.0
5 */
6#ifndef ZEPHYR_INCLUDE_POSIX_NET_IF_H_
7#define ZEPHYR_INCLUDE_POSIX_NET_IF_H_
8
9#ifdef CONFIG_NET_INTERFACE_NAME_LEN
10#define IF_NAMESIZE CONFIG_NET_INTERFACE_NAME_LEN
11#else
12#define IF_NAMESIZE 1
13#endif
14
15#ifdef __cplusplus
16extern "C" {
17#endif
18
20 unsigned int if_index;
21 char *if_name;
22};
23
24char *if_indextoname(unsigned int ifindex, char *ifname);
27unsigned int if_nametoindex(const char *ifname);
28
29#ifdef __cplusplus
30}
31#endif
32
33#endif /* ZEPHYR_INCLUDE_POSIX_NET_IF_H_ */
void if_freenameindex(struct if_nameindex *ptr)
char * if_indextoname(unsigned int ifindex, char *ifname)
unsigned int if_nametoindex(const char *ifname)
struct if_nameindex * if_nameindex(void)
Definition if.h:19
unsigned int if_index
Definition if.h:20
char * if_name
Definition if.h:21