diff options
| author | Michael Biebl <biebl@debian.org> | 2021-02-11 18:12:43 +0100 |
|---|---|---|
| committer | Michael Biebl <biebl@debian.org> | 2021-02-11 18:12:43 +0100 |
| commit | 8f0db010e71e252ac290d51bd2a5b0a078f1d279 (patch) | |
| tree | 2caa344fefcd9bb4218583c5aa2e0f92f4b2aa8c /src/core/initrd/nm-initrd-generator.h | |
| parent | f54032b30e1ddd84f10a339e0caf493772e049a7 (diff) | |
| parent | 80ec1decc49c72efec2a8b87c06245c92c0ab807 (diff) | |
Update upstream source from tag 'upstream/1.29.90'
Update to upstream version '1.29.90' with Debian dir 90df6d97476cc3200c410f3f3603b87396175c7a
Diffstat (limited to 'src/core/initrd/nm-initrd-generator.h')
| -rw-r--r-- | src/core/initrd/nm-initrd-generator.h | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/src/core/initrd/nm-initrd-generator.h b/src/core/initrd/nm-initrd-generator.h new file mode 100644 index 00000000..56dcfd68 --- /dev/null +++ b/src/core/initrd/nm-initrd-generator.h @@ -0,0 +1,45 @@ +/* SPDX-License-Identifier: LGPL-2.1-or-later */ +/* + * Copyright (C) 2014, 2018 Red Hat, Inc. + */ + +#ifndef __NM_INITRD_GENERATOR_H__ +#define __NM_INITRD_GENERATOR_H__ + +#include "nm-connection.h" +#include "nm-utils.h" + +#define NMI_WAIT_DEVICE_TIMEOUT_MS 60000 + +static inline int +get_ip_address_family(const char *str, gboolean with_prefix) +{ + int addr_family; + + if (!str) + return AF_UNSPEC; + + if (with_prefix) { + if (nm_utils_parse_inaddr_prefix_bin(AF_UNSPEC, str, &addr_family, NULL, NULL)) + return addr_family; + } else { + if (nm_utils_parse_inaddr_bin(AF_UNSPEC, str, &addr_family, NULL)) + return addr_family; + } + + return AF_UNSPEC; +} + +GHashTable *nmi_ibft_read(const char *sysfs_dir); + +gboolean +nmi_ibft_update_connection_from_nic(NMConnection *connection, GHashTable *nic, GError **error); + +NMConnection *nmi_dt_reader_parse(const char *sysfs_dir); + +GHashTable *nmi_cmdline_reader_parse(const char * sysfs_dir, + const char *const *argv, + char ** hostname, + gint64 * carrier_timeout_sec); + +#endif /* __NM_INITRD_GENERATOR_H__ */ |