-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathinterface.h
More file actions
33 lines (26 loc) · 782 Bytes
/
interface.h
File metadata and controls
33 lines (26 loc) · 782 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
/*-
* SPDX-License-Identifier: BSD-2-Clause
*
* Copyright (c) 2025, Muhammad Saheed <saheed@FreeBSD.org>
*/
#ifndef INTERFACE_H
#define INTERFACE_H
#include <stdbool.h>
#include "libifconfig.h"
enum connection_state {
CONNECTED,
DISCONNECTED,
UNPLUGGED,
DISABLED,
NA,
};
bool is_wlan_group(struct ifconfig_handle *lifh, const char *ifname);
enum connection_state get_connection_state(struct ifconfig_handle *lifh,
struct ifaddrs *ifa);
int get_iface_parent(const char *ifname, int ifname_len, char *buf,
int buf_len);
void get_mac_addr(ifconfig_handle_t *lifh, struct ifaddrs *ifa, void *udata);
void is_ifaddr_af_inet(ifconfig_handle_t *lifh, struct ifaddrs *ifa,
void *udata);
extern const char *connection_state_to_string[];
#endif /* !INTERFACE_H */