summaryrefslogtreecommitdiffstats
path: root/src/shared/local-addresses.h
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2019-07-23 14:22:06 +0200
committerLennart Poettering <lennart@poettering.net>2019-07-24 09:06:50 +0200
commit733cbd00b0190bb7d16d12e001ddf7817754e46d (patch)
tree6d4f503318df7efaf706657739914a9a67239601 /src/shared/local-addresses.h
parent[systemctl] Don't print ExecXYZEx= when doing 'systemctl status' (diff)
downloadsystemd-733cbd00b0190bb7d16d12e001ddf7817754e46d.tar.xz
systemd-733cbd00b0190bb7d16d12e001ddf7817754e46d.zip
netlink: move local-addresses.[ch] to src/shared
This code is not part of the public API of sd-netlink, nor used by it internally and hence should not be in the sd-netlink directory. Also, move the test case for it to src/test/.
Diffstat (limited to 'src/shared/local-addresses.h')
-rw-r--r--src/shared/local-addresses.h17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/shared/local-addresses.h b/src/shared/local-addresses.h
new file mode 100644
index 0000000000..e88c5e5d21
--- /dev/null
+++ b/src/shared/local-addresses.h
@@ -0,0 +1,17 @@
+/* SPDX-License-Identifier: LGPL-2.1+ */
+#pragma once
+
+#include "sd-netlink.h"
+
+#include "in-addr-util.h"
+
+struct local_address {
+ int family, ifindex;
+ unsigned char scope;
+ uint32_t metric;
+ union in_addr_union address;
+};
+
+int local_addresses(sd_netlink *rtnl, int ifindex, int af, struct local_address **ret);
+
+int local_gateways(sd_netlink *rtnl, int ifindex, int af, struct local_address **ret);