Debian Codegraph @

src/shared/netif-util.h

raw
1 /* SPDX-License-Identifier: LGPL-2.1-or-later */
2 #pragma once
3
4 #include "shared-forward.h"
5
6 bool netif_has_carrier(uint8_t operstate, unsigned flags);
7 int net_get_type_string(sd_device *device, uint16_t iftype, char **ret);
8 const char* net_get_persistent_name(sd_device *device);
9 int net_get_unique_predictable_data(sd_device *device, bool use_sysname, uint64_t *ret);
10 int net_get_unique_predictable_data_from_name(const char *name, const sd_id128_t *key, uint64_t *ret);
11 int net_verify_hardware_address(
12 const char *ifname,
13 bool is_static,
14 uint16_t iftype,
15 const struct hw_addr_data *ib_hw_addr,
16 struct hw_addr_data *new_hw_addr);
17 int net_generate_mac(
18 const char *machine_name,
19 struct ether_addr *mac,
20 sd_id128_t hash_key,
21 uint64_t idx);
22 int net_shorten_ifname(char *ifname, bool check_naming_scheme);