Merge pull request #20846 from yuwata/sd-lldp-tx

network: move LLDP transmission feature to libsystemd-network
This commit is contained in:
Yu Watanabe
2021-09-28 11:29:34 +09:00
committed by GitHub
28 changed files with 1633 additions and 1186 deletions
+5
View File
@@ -4,6 +4,7 @@
#include <stdbool.h>
#include <stdio.h>
#include "env-file.h"
#include "macro.h"
#include "strv.h"
@@ -60,3 +61,7 @@ static inline bool is_outbound_hostname(const char *hostname) {
/* This tries to identify the valid syntaxes for the our synthetic "outbound" host. */
return STRCASE_IN_SET(hostname, "_outbound", "_outbound.");
}
static inline int get_pretty_hostname(char **ret) {
return parse_env_file(NULL, "/etc/machine-info", "PRETTY_HOSTNAME", ret);
}