* [PATCH] systemd: Built with systemd sd-netlink
@ 2023-09-19 12:57 Jonatan Schlag
0 siblings, 0 replies; only message in thread
From: Jonatan Schlag @ 2023-09-19 12:57 UTC (permalink / raw)
To: development
[-- Attachment #1: Type: text/plain, Size: 61957 bytes --]
This is needed for the network stack.
The patch reverts https://github.com/systemd/systemd/commit/dd35a61
as systemd currently does not export sd-netlink.
Signed-off-by: Jonatan Schlag <jonatan.schlag(a)ipfire.org>
---
...evert-sd-netlink-unexport-sd-netlink.patch | 1416 +++++++++++++++++
systemd/systemd.nm | 3 +-
2 files changed, 1418 insertions(+), 1 deletion(-)
create mode 100644 systemd/patches/0001-Revert-sd-netlink-unexport-sd-netlink.patch
diff --git a/systemd/patches/0001-Revert-sd-netlink-unexport-sd-netlink.patch b/systemd/patches/0001-Revert-sd-netlink-unexport-sd-netlink.patch
new file mode 100644
index 000000000..4507a1086
--- /dev/null
+++ b/systemd/patches/0001-Revert-sd-netlink-unexport-sd-netlink.patch
@@ -0,0 +1,1416 @@
+From b0ca7a9351fab7a339357cbc17800e11ccae91e8 Mon Sep 17 00:00:00 2001
+From: Jonatan Schlag <jonatan.schlag(a)ipfire.org>
+Date: Tue, 19 Sep 2023 11:58:49 +0000
+Subject: [PATCH] Revert "sd-netlink: unexport sd-netlink"
+
+This reverts commit dd35a61cafb5ffb380f92f45b9d9e3ac1f53351b.
+---
+ src/libsystemd/libsystemd.sym | 155 ++++++++++++++++++
+ src/libsystemd/sd-netlink/netlink-genl.c | 10 +-
+ .../sd-netlink/netlink-message-rtnl.c | 134 +++++++--------
+ src/libsystemd/sd-netlink/netlink-message.c | 100 +++++------
+ src/libsystemd/sd-netlink/sd-netlink.c | 26 +--
+ src/systemd/meson.build | 2 +-
+ 6 files changed, 291 insertions(+), 136 deletions(-)
+
+diff --git a/src/libsystemd/libsystemd.sym b/src/libsystemd/libsystemd.sym
+index 56a8831f0f..0f84848064 100644
+--- a/src/libsystemd/libsystemd.sym
++++ b/src/libsystemd/libsystemd.sym
+@@ -795,6 +795,161 @@ global:
+ sd_id128_string_equal;
+
+ sd_hwdb_new_from_path;
++
++ sd_netlink_open;
++ sd_netlink_open_fd;
++ sd_netlink_increase_rxbuf;
++ sd_netlink_ref;
++ sd_netlink_unref;
++ sd_netlink_send;
++ sd_netlink_call_async;
++ sd_netlink_call;
++ sd_netlink_read;
++ sd_netlink_get_events;
++ sd_netlink_get_timeout;
++ sd_netlink_process;
++ sd_netlink_wait;
++ sd_netlink_add_match;
++ sd_netlink_attach_event;
++ sd_netlink_detach_event;
++ sd_netlink_attach_filter;
++ sd_netlink_message_append_string;
++ sd_netlink_message_append_strv;
++ sd_netlink_message_append_flag;
++ sd_netlink_message_append_u8;
++ sd_netlink_message_append_u16;
++ sd_netlink_message_append_u32;
++ sd_netlink_message_append_u64;
++ sd_netlink_message_append_s8;
++ sd_netlink_message_append_s16;
++ sd_netlink_message_append_s32;
++ sd_netlink_message_append_s64;
++ sd_netlink_message_append_data;
++ sd_netlink_message_append_container_data;
++ sd_netlink_message_append_in_addr;
++ sd_netlink_message_append_in6_addr;
++ sd_netlink_message_append_sockaddr_in;
++ sd_netlink_message_append_sockaddr_in6;
++ sd_netlink_message_append_ether_addr;
++ sd_netlink_message_append_cache_info;
++ sd_netlink_message_open_container;
++ sd_netlink_message_open_container_union;
++ sd_netlink_message_close_container;
++ sd_netlink_message_read;
++ sd_netlink_message_read_data;
++ sd_netlink_message_read_data_suffix0;
++ sd_netlink_message_read_string_strdup;
++ sd_netlink_message_read_string;
++ sd_netlink_message_read_strv;
++ sd_netlink_message_read_u8;
++ sd_netlink_message_read_u16;
++ sd_netlink_message_read_u32;
++ sd_netlink_message_read_ether_addr;
++ sd_netlink_message_read_cache_info;
++ sd_netlink_message_read_in_addr;
++ sd_netlink_message_read_in6_addr;
++ sd_netlink_message_has_flag;
++ sd_netlink_message_enter_container;
++ sd_netlink_message_enter_array;
++ sd_netlink_message_exit_container;
++ sd_netlink_message_open_array;
++ sd_netlink_message_cancel_array;
++ sd_netlink_message_rewind;
++ sd_netlink_message_next;
++ sd_netlink_message_ref;
++ sd_netlink_message_unref;
++ sd_netlink_message_set_request_dump;
++ sd_netlink_message_is_error;
++ sd_netlink_message_get_errno;
++ sd_netlink_message_get_type;
++ sd_netlink_message_set_flags;
++ sd_netlink_message_is_broadcast;
++ sd_netlink_message_get_max_attribute;
++ sd_netlink_slot_ref;
++ sd_netlink_slot_unref;
++ sd_netlink_slot_get_netlink;
++ sd_netlink_slot_get_userdata;
++ sd_netlink_slot_set_userdata;
++ sd_netlink_slot_get_destroy_callback;
++ sd_netlink_slot_set_destroy_callback;
++ sd_netlink_slot_get_floating;
++ sd_netlink_slot_set_floating;
++ sd_netlink_slot_get_description;
++ sd_netlink_slot_set_description;
++
++ sd_rtnl_message_get_family;
++ sd_rtnl_message_new_addr;
++ sd_rtnl_message_new_addr_update;
++ sd_rtnl_message_addr_set_prefixlen;
++ sd_rtnl_message_addr_set_scope;
++ sd_rtnl_message_addr_set_flags;
++ sd_rtnl_message_addr_get_family;
++ sd_rtnl_message_addr_get_prefixlen;
++ sd_rtnl_message_addr_get_scope;
++ sd_rtnl_message_addr_get_flags;
++ sd_rtnl_message_addr_get_ifindex;
++ sd_rtnl_message_new_link;
++ sd_rtnl_message_link_set_flags;
++ sd_rtnl_message_link_set_type;
++ sd_rtnl_message_link_set_family;
++ sd_rtnl_message_link_get_ifindex;
++ sd_rtnl_message_link_get_flags;
++ sd_rtnl_message_link_get_type;
++ sd_rtnl_message_new_route;
++ sd_rtnl_message_route_set_dst_prefixlen;
++ sd_rtnl_message_route_set_src_prefixlen;
++ sd_rtnl_message_route_set_scope;
++ sd_rtnl_message_route_set_flags;
++ sd_rtnl_message_route_set_table;
++ sd_rtnl_message_route_set_type;
++ sd_rtnl_message_route_get_flags;
++ sd_rtnl_message_route_get_family;
++ sd_rtnl_message_route_get_protocol;
++ sd_rtnl_message_route_get_scope;
++ sd_rtnl_message_route_get_tos;
++ sd_rtnl_message_route_get_table;
++ sd_rtnl_message_route_get_dst_prefixlen;
++ sd_rtnl_message_route_get_src_prefixlen;
++ sd_rtnl_message_route_get_type;
++ sd_rtnl_message_new_nexthop;
++ sd_rtnl_message_nexthop_set_flags;
++ sd_rtnl_message_nexthop_get_flags;
++ sd_rtnl_message_nexthop_get_family;
++ sd_rtnl_message_nexthop_get_protocol;
++ sd_rtnl_message_new_neigh;
++ sd_rtnl_message_neigh_set_flags;
++ sd_rtnl_message_neigh_set_state;
++ sd_rtnl_message_neigh_get_family;
++ sd_rtnl_message_neigh_get_ifindex;
++ sd_rtnl_message_neigh_get_state;
++ sd_rtnl_message_neigh_get_flags;
++ sd_rtnl_message_new_addrlabel;
++ sd_rtnl_message_addrlabel_set_prefixlen;
++ sd_rtnl_message_addrlabel_get_prefixlen;
++ sd_rtnl_message_new_routing_policy_rule;
++ sd_rtnl_message_routing_policy_rule_set_tos;
++ sd_rtnl_message_routing_policy_rule_get_tos;
++ sd_rtnl_message_routing_policy_rule_set_table;
++ sd_rtnl_message_routing_policy_rule_get_table;
++ sd_rtnl_message_routing_policy_rule_set_fib_src_prefixlen;
++ sd_rtnl_message_routing_policy_rule_get_fib_src_prefixlen;
++ sd_rtnl_message_routing_policy_rule_set_fib_dst_prefixlen;
++ sd_rtnl_message_routing_policy_rule_get_fib_dst_prefixlen;
++ sd_rtnl_message_routing_policy_rule_set_fib_type;
++ sd_rtnl_message_routing_policy_rule_get_fib_type;
++ sd_rtnl_message_routing_policy_rule_set_flags;
++ sd_rtnl_message_routing_policy_rule_get_flags;
++ sd_rtnl_message_new_traffic_control;
++ sd_rtnl_message_traffic_control_get_ifindex;
++ sd_rtnl_message_traffic_control_get_handle;
++ sd_rtnl_message_traffic_control_get_parent;
++ sd_rtnl_message_new_mdb;
++
++ sd_genl_socket_open;
++ sd_genl_message_new;
++ sd_genl_message_get_family_name;
++ sd_genl_message_get_command;
++ sd_genl_add_match;
+ } LIBSYSTEMD_251;
+
+ LIBSYSTEMD_253 {
+diff --git a/src/libsystemd/sd-netlink/netlink-genl.c b/src/libsystemd/sd-netlink/netlink-genl.c
+index 1dc62e89ba..aeb4b8a686 100644
+--- a/src/libsystemd/sd-netlink/netlink-genl.c
++++ b/src/libsystemd/sd-netlink/netlink-genl.c
+@@ -365,7 +365,7 @@ int genl_get_policy_set_and_header_size(
+ return 0;
+ }
+
+-int sd_genl_message_new(sd_netlink *nl, const char *family_name, uint8_t cmd, sd_netlink_message **ret) {
++_public_ int sd_genl_message_new(sd_netlink *nl, const char *family_name, uint8_t cmd, sd_netlink_message **ret) {
+ const GenericNetlinkFamily *family;
+ int r;
+
+@@ -381,7 +381,7 @@ int sd_genl_message_new(sd_netlink *nl, const char *family_name, uint8_t cmd, sd
+ return genl_message_new(nl, family, cmd, ret);
+ }
+
+-int sd_genl_message_get_family_name(sd_netlink *nl, sd_netlink_message *m, const char **ret) {
++_public_ int sd_genl_message_get_family_name(sd_netlink *nl, sd_netlink_message *m, const char **ret) {
+ const GenericNetlinkFamily *family;
+ uint16_t nlmsg_type;
+ int r;
+@@ -403,7 +403,7 @@ int sd_genl_message_get_family_name(sd_netlink *nl, sd_netlink_message *m, const
+ return 0;
+ }
+
+-int sd_genl_message_get_command(sd_netlink *nl, sd_netlink_message *m, uint8_t *ret) {
++_public_ int sd_genl_message_get_command(sd_netlink *nl, sd_netlink_message *m, uint8_t *ret) {
+ struct genlmsghdr *h;
+ uint16_t nlmsg_type;
+ size_t size;
+@@ -448,7 +448,7 @@ static int genl_family_get_multicast_group_id_by_name(const GenericNetlinkFamily
+ return 0;
+ }
+
+-int sd_genl_add_match(
++_public_ int sd_genl_add_match(
+ sd_netlink *nl,
+ sd_netlink_slot **ret_slot,
+ const char *family_name,
+@@ -483,6 +483,6 @@ int sd_genl_add_match(
+ callback, destroy_callback, userdata, description);
+ }
+
+-int sd_genl_socket_open(sd_netlink **ret) {
++_public_ int sd_genl_socket_open(sd_netlink **ret) {
+ return netlink_open_family(ret, NETLINK_GENERIC);
+ }
+diff --git a/src/libsystemd/sd-netlink/netlink-message-rtnl.c b/src/libsystemd/sd-netlink/netlink-message-rtnl.c
+index 008e8022b1..ae1d217294 100644
+--- a/src/libsystemd/sd-netlink/netlink-message-rtnl.c
++++ b/src/libsystemd/sd-netlink/netlink-message-rtnl.c
+@@ -56,7 +56,7 @@ static bool rtnl_message_type_is_mdb(uint16_t type) {
+ return IN_SET(type, RTM_NEWMDB, RTM_DELMDB, RTM_GETMDB);
+ }
+
+-int sd_rtnl_message_route_set_dst_prefixlen(sd_netlink_message *m, unsigned char prefixlen) {
++_public_ int sd_rtnl_message_route_set_dst_prefixlen(sd_netlink_message *m, unsigned char prefixlen) {
+ struct rtmsg *rtm;
+
+ assert_return(m, -EINVAL);
+@@ -74,7 +74,7 @@ int sd_rtnl_message_route_set_dst_prefixlen(sd_netlink_message *m, unsigned char
+ return 0;
+ }
+
+-int sd_rtnl_message_route_set_src_prefixlen(sd_netlink_message *m, unsigned char prefixlen) {
++_public_ int sd_rtnl_message_route_set_src_prefixlen(sd_netlink_message *m, unsigned char prefixlen) {
+ struct rtmsg *rtm;
+
+ assert_return(m, -EINVAL);
+@@ -92,7 +92,7 @@ int sd_rtnl_message_route_set_src_prefixlen(sd_netlink_message *m, unsigned char
+ return 0;
+ }
+
+-int sd_rtnl_message_route_set_scope(sd_netlink_message *m, unsigned char scope) {
++_public_ int sd_rtnl_message_route_set_scope(sd_netlink_message *m, unsigned char scope) {
+ struct rtmsg *rtm;
+
+ assert_return(m, -EINVAL);
+@@ -106,7 +106,7 @@ int sd_rtnl_message_route_set_scope(sd_netlink_message *m, unsigned char scope)
+ return 0;
+ }
+
+-int sd_rtnl_message_route_set_flags(sd_netlink_message *m, unsigned flags) {
++_public_ int sd_rtnl_message_route_set_flags(sd_netlink_message *m, unsigned flags) {
+ struct rtmsg *rtm;
+
+ assert_return(m, -EINVAL);
+@@ -120,7 +120,7 @@ int sd_rtnl_message_route_set_flags(sd_netlink_message *m, unsigned flags) {
+ return 0;
+ }
+
+-int sd_rtnl_message_route_get_flags(sd_netlink_message *m, unsigned *flags) {
++_public_ int sd_rtnl_message_route_get_flags(sd_netlink_message *m, unsigned *flags) {
+ struct rtmsg *rtm;
+
+ assert_return(m, -EINVAL);
+@@ -135,7 +135,7 @@ int sd_rtnl_message_route_get_flags(sd_netlink_message *m, unsigned *flags) {
+ return 0;
+ }
+
+-int sd_rtnl_message_route_set_table(sd_netlink_message *m, unsigned char table) {
++_public_ int sd_rtnl_message_route_set_table(sd_netlink_message *m, unsigned char table) {
+ struct rtmsg *rtm;
+
+ assert_return(m, -EINVAL);
+@@ -149,7 +149,7 @@ int sd_rtnl_message_route_set_table(sd_netlink_message *m, unsigned char table)
+ return 0;
+ }
+
+-int sd_rtnl_message_route_get_family(sd_netlink_message *m, int *family) {
++_public_ int sd_rtnl_message_route_get_family(sd_netlink_message *m, int *family) {
+ struct rtmsg *rtm;
+
+ assert_return(m, -EINVAL);
+@@ -164,7 +164,7 @@ int sd_rtnl_message_route_get_family(sd_netlink_message *m, int *family) {
+ return 0;
+ }
+
+-int sd_rtnl_message_route_get_type(sd_netlink_message *m, unsigned char *type) {
++_public_ int sd_rtnl_message_route_get_type(sd_netlink_message *m, unsigned char *type) {
+ struct rtmsg *rtm;
+
+ assert_return(m, -EINVAL);
+@@ -179,7 +179,7 @@ int sd_rtnl_message_route_get_type(sd_netlink_message *m, unsigned char *type) {
+ return 0;
+ }
+
+-int sd_rtnl_message_route_set_type(sd_netlink_message *m, unsigned char type) {
++_public_ int sd_rtnl_message_route_set_type(sd_netlink_message *m, unsigned char type) {
+ struct rtmsg *rtm;
+
+ assert_return(m, -EINVAL);
+@@ -193,7 +193,7 @@ int sd_rtnl_message_route_set_type(sd_netlink_message *m, unsigned char type) {
+ return 0;
+ }
+
+-int sd_rtnl_message_route_get_protocol(sd_netlink_message *m, unsigned char *protocol) {
++_public_ int sd_rtnl_message_route_get_protocol(sd_netlink_message *m, unsigned char *protocol) {
+ struct rtmsg *rtm;
+
+ assert_return(m, -EINVAL);
+@@ -208,7 +208,7 @@ int sd_rtnl_message_route_get_protocol(sd_netlink_message *m, unsigned char *pro
+ return 0;
+ }
+
+-int sd_rtnl_message_route_get_scope(sd_netlink_message *m, unsigned char *scope) {
++_public_ int sd_rtnl_message_route_get_scope(sd_netlink_message *m, unsigned char *scope) {
+ struct rtmsg *rtm;
+
+ assert_return(m, -EINVAL);
+@@ -223,7 +223,7 @@ int sd_rtnl_message_route_get_scope(sd_netlink_message *m, unsigned char *scope)
+ return 0;
+ }
+
+-int sd_rtnl_message_route_get_tos(sd_netlink_message *m, uint8_t *tos) {
++_public_ int sd_rtnl_message_route_get_tos(sd_netlink_message *m, uint8_t *tos) {
+ struct rtmsg *rtm;
+
+ assert_return(m, -EINVAL);
+@@ -238,7 +238,7 @@ int sd_rtnl_message_route_get_tos(sd_netlink_message *m, uint8_t *tos) {
+ return 0;
+ }
+
+-int sd_rtnl_message_route_get_table(sd_netlink_message *m, unsigned char *table) {
++_public_ int sd_rtnl_message_route_get_table(sd_netlink_message *m, unsigned char *table) {
+ struct rtmsg *rtm;
+
+ assert_return(m, -EINVAL);
+@@ -253,7 +253,7 @@ int sd_rtnl_message_route_get_table(sd_netlink_message *m, unsigned char *table)
+ return 0;
+ }
+
+-int sd_rtnl_message_route_get_dst_prefixlen(sd_netlink_message *m, unsigned char *dst_len) {
++_public_ int sd_rtnl_message_route_get_dst_prefixlen(sd_netlink_message *m, unsigned char *dst_len) {
+ struct rtmsg *rtm;
+
+ assert_return(m, -EINVAL);
+@@ -268,7 +268,7 @@ int sd_rtnl_message_route_get_dst_prefixlen(sd_netlink_message *m, unsigned char
+ return 0;
+ }
+
+-int sd_rtnl_message_route_get_src_prefixlen(sd_netlink_message *m, unsigned char *src_len) {
++_public_ int sd_rtnl_message_route_get_src_prefixlen(sd_netlink_message *m, unsigned char *src_len) {
+ struct rtmsg *rtm;
+
+ assert_return(m, -EINVAL);
+@@ -283,7 +283,7 @@ int sd_rtnl_message_route_get_src_prefixlen(sd_netlink_message *m, unsigned char
+ return 0;
+ }
+
+-int sd_rtnl_message_new_route(sd_netlink *rtnl, sd_netlink_message **ret,
++_public_ int sd_rtnl_message_new_route(sd_netlink *rtnl, sd_netlink_message **ret,
+ uint16_t nlmsg_type, int rtm_family,
+ unsigned char rtm_protocol) {
+ struct rtmsg *rtm;
+@@ -309,7 +309,7 @@ int sd_rtnl_message_new_route(sd_netlink *rtnl, sd_netlink_message **ret,
+ return 0;
+ }
+
+-int sd_rtnl_message_new_nexthop(sd_netlink *rtnl, sd_netlink_message **ret,
++_public_ int sd_rtnl_message_new_nexthop(sd_netlink *rtnl, sd_netlink_message **ret,
+ uint16_t nlmsg_type, int nh_family,
+ unsigned char nh_protocol) {
+ struct nhmsg *nhm;
+@@ -347,7 +347,7 @@ int sd_rtnl_message_new_nexthop(sd_netlink *rtnl, sd_netlink_message **ret,
+ return 0;
+ }
+
+-int sd_rtnl_message_nexthop_set_flags(sd_netlink_message *m, uint8_t flags) {
++_public_ int sd_rtnl_message_nexthop_set_flags(sd_netlink_message *m, uint8_t flags) {
+ struct nhmsg *nhm;
+
+ assert_return(m, -EINVAL);
+@@ -360,7 +360,7 @@ int sd_rtnl_message_nexthop_set_flags(sd_netlink_message *m, uint8_t flags) {
+ return 0;
+ }
+
+-int sd_rtnl_message_nexthop_get_flags(sd_netlink_message *m, uint8_t *ret) {
++_public_ int sd_rtnl_message_nexthop_get_flags(sd_netlink_message *m, uint8_t *ret) {
+ struct nhmsg *nhm;
+
+ assert_return(m, -EINVAL);
+@@ -374,7 +374,7 @@ int sd_rtnl_message_nexthop_get_flags(sd_netlink_message *m, uint8_t *ret) {
+ return 0;
+ }
+
+-int sd_rtnl_message_nexthop_get_family(sd_netlink_message *m, uint8_t *family) {
++_public_ int sd_rtnl_message_nexthop_get_family(sd_netlink_message *m, uint8_t *family) {
+ struct nhmsg *nhm;
+
+ assert_return(m, -EINVAL);
+@@ -388,7 +388,7 @@ int sd_rtnl_message_nexthop_get_family(sd_netlink_message *m, uint8_t *family) {
+ return 0;
+ }
+
+-int sd_rtnl_message_nexthop_get_protocol(sd_netlink_message *m, uint8_t *protocol) {
++_public_ int sd_rtnl_message_nexthop_get_protocol(sd_netlink_message *m, uint8_t *protocol) {
+ struct nhmsg *nhm;
+
+ assert_return(m, -EINVAL);
+@@ -402,7 +402,7 @@ int sd_rtnl_message_nexthop_get_protocol(sd_netlink_message *m, uint8_t *protoco
+ return 0;
+ }
+
+-int sd_rtnl_message_neigh_set_flags(sd_netlink_message *m, uint8_t flags) {
++_public_ int sd_rtnl_message_neigh_set_flags(sd_netlink_message *m, uint8_t flags) {
+ struct ndmsg *ndm;
+
+ assert_return(m, -EINVAL);
+@@ -415,7 +415,7 @@ int sd_rtnl_message_neigh_set_flags(sd_netlink_message *m, uint8_t flags) {
+ return 0;
+ }
+
+-int sd_rtnl_message_neigh_set_state(sd_netlink_message *m, uint16_t state) {
++_public_ int sd_rtnl_message_neigh_set_state(sd_netlink_message *m, uint16_t state) {
+ struct ndmsg *ndm;
+
+ assert_return(m, -EINVAL);
+@@ -428,7 +428,7 @@ int sd_rtnl_message_neigh_set_state(sd_netlink_message *m, uint16_t state) {
+ return 0;
+ }
+
+-int sd_rtnl_message_neigh_get_flags(sd_netlink_message *m, uint8_t *flags) {
++_public_ int sd_rtnl_message_neigh_get_flags(sd_netlink_message *m, uint8_t *flags) {
+ struct ndmsg *ndm;
+
+ assert_return(m, -EINVAL);
+@@ -441,7 +441,7 @@ int sd_rtnl_message_neigh_get_flags(sd_netlink_message *m, uint8_t *flags) {
+ return 0;
+ }
+
+-int sd_rtnl_message_neigh_get_state(sd_netlink_message *m, uint16_t *state) {
++_public_ int sd_rtnl_message_neigh_get_state(sd_netlink_message *m, uint16_t *state) {
+ struct ndmsg *ndm;
+
+ assert_return(m, -EINVAL);
+@@ -454,7 +454,7 @@ int sd_rtnl_message_neigh_get_state(sd_netlink_message *m, uint16_t *state) {
+ return 0;
+ }
+
+-int sd_rtnl_message_neigh_get_family(sd_netlink_message *m, int *family) {
++_public_ int sd_rtnl_message_neigh_get_family(sd_netlink_message *m, int *family) {
+ struct ndmsg *ndm;
+
+ assert_return(m, -EINVAL);
+@@ -469,7 +469,7 @@ int sd_rtnl_message_neigh_get_family(sd_netlink_message *m, int *family) {
+ return 0;
+ }
+
+-int sd_rtnl_message_neigh_get_ifindex(sd_netlink_message *m, int *index) {
++_public_ int sd_rtnl_message_neigh_get_ifindex(sd_netlink_message *m, int *index) {
+ struct ndmsg *ndm;
+
+ assert_return(m, -EINVAL);
+@@ -484,7 +484,7 @@ int sd_rtnl_message_neigh_get_ifindex(sd_netlink_message *m, int *index) {
+ return 0;
+ }
+
+-int sd_rtnl_message_new_neigh(
++_public_ int sd_rtnl_message_new_neigh(
+ sd_netlink *rtnl,
+ sd_netlink_message **ret,
+ uint16_t nlmsg_type,
+@@ -517,7 +517,7 @@ int sd_rtnl_message_new_neigh(
+ return 0;
+ }
+
+-int sd_rtnl_message_link_set_flags(sd_netlink_message *m, unsigned flags, unsigned change) {
++_public_ int sd_rtnl_message_link_set_flags(sd_netlink_message *m, unsigned flags, unsigned change) {
+ struct ifinfomsg *ifi;
+
+ assert_return(m, -EINVAL);
+@@ -533,7 +533,7 @@ int sd_rtnl_message_link_set_flags(sd_netlink_message *m, unsigned flags, unsign
+ return 0;
+ }
+
+-int sd_rtnl_message_link_set_type(sd_netlink_message *m, unsigned type) {
++_public_ int sd_rtnl_message_link_set_type(sd_netlink_message *m, unsigned type) {
+ struct ifinfomsg *ifi;
+
+ assert_return(m, -EINVAL);
+@@ -547,7 +547,7 @@ int sd_rtnl_message_link_set_type(sd_netlink_message *m, unsigned type) {
+ return 0;
+ }
+
+-int sd_rtnl_message_link_set_family(sd_netlink_message *m, unsigned family) {
++_public_ int sd_rtnl_message_link_set_family(sd_netlink_message *m, unsigned family) {
+ struct ifinfomsg *ifi;
+
+ assert_return(m, -EINVAL);
+@@ -561,7 +561,7 @@ int sd_rtnl_message_link_set_family(sd_netlink_message *m, unsigned family) {
+ return 0;
+ }
+
+-int sd_rtnl_message_new_link(sd_netlink *rtnl, sd_netlink_message **ret,
++_public_ int sd_rtnl_message_new_link(sd_netlink *rtnl, sd_netlink_message **ret,
+ uint16_t nlmsg_type, int index) {
+ struct ifinfomsg *ifi;
+ int r;
+@@ -586,7 +586,7 @@ int sd_rtnl_message_new_link(sd_netlink *rtnl, sd_netlink_message **ret,
+ return 0;
+ }
+
+-int sd_rtnl_message_addr_set_prefixlen(sd_netlink_message *m, unsigned char prefixlen) {
++_public_ int sd_rtnl_message_addr_set_prefixlen(sd_netlink_message *m, unsigned char prefixlen) {
+ struct ifaddrmsg *ifa;
+
+ assert_return(m, -EINVAL);
+@@ -604,7 +604,7 @@ int sd_rtnl_message_addr_set_prefixlen(sd_netlink_message *m, unsigned char pref
+ return 0;
+ }
+
+-int sd_rtnl_message_addr_set_flags(sd_netlink_message *m, unsigned char flags) {
++_public_ int sd_rtnl_message_addr_set_flags(sd_netlink_message *m, unsigned char flags) {
+ struct ifaddrmsg *ifa;
+
+ assert_return(m, -EINVAL);
+@@ -618,7 +618,7 @@ int sd_rtnl_message_addr_set_flags(sd_netlink_message *m, unsigned char flags) {
+ return 0;
+ }
+
+-int sd_rtnl_message_addr_set_scope(sd_netlink_message *m, unsigned char scope) {
++_public_ int sd_rtnl_message_addr_set_scope(sd_netlink_message *m, unsigned char scope) {
+ struct ifaddrmsg *ifa;
+
+ assert_return(m, -EINVAL);
+@@ -632,7 +632,7 @@ int sd_rtnl_message_addr_set_scope(sd_netlink_message *m, unsigned char scope) {
+ return 0;
+ }
+
+-int sd_rtnl_message_addr_get_family(sd_netlink_message *m, int *ret_family) {
++_public_ int sd_rtnl_message_addr_get_family(sd_netlink_message *m, int *ret_family) {
+ struct ifaddrmsg *ifa;
+
+ assert_return(m, -EINVAL);
+@@ -647,7 +647,7 @@ int sd_rtnl_message_addr_get_family(sd_netlink_message *m, int *ret_family) {
+ return 0;
+ }
+
+-int sd_rtnl_message_addr_get_prefixlen(sd_netlink_message *m, unsigned char *ret_prefixlen) {
++_public_ int sd_rtnl_message_addr_get_prefixlen(sd_netlink_message *m, unsigned char *ret_prefixlen) {
+ struct ifaddrmsg *ifa;
+
+ assert_return(m, -EINVAL);
+@@ -662,7 +662,7 @@ int sd_rtnl_message_addr_get_prefixlen(sd_netlink_message *m, unsigned char *ret
+ return 0;
+ }
+
+-int sd_rtnl_message_addr_get_scope(sd_netlink_message *m, unsigned char *ret_scope) {
++_public_ int sd_rtnl_message_addr_get_scope(sd_netlink_message *m, unsigned char *ret_scope) {
+ struct ifaddrmsg *ifa;
+
+ assert_return(m, -EINVAL);
+@@ -677,7 +677,7 @@ int sd_rtnl_message_addr_get_scope(sd_netlink_message *m, unsigned char *ret_sco
+ return 0;
+ }
+
+-int sd_rtnl_message_addr_get_flags(sd_netlink_message *m, unsigned char *ret_flags) {
++_public_ int sd_rtnl_message_addr_get_flags(sd_netlink_message *m, unsigned char *ret_flags) {
+ struct ifaddrmsg *ifa;
+
+ assert_return(m, -EINVAL);
+@@ -692,7 +692,7 @@ int sd_rtnl_message_addr_get_flags(sd_netlink_message *m, unsigned char *ret_fla
+ return 0;
+ }
+
+-int sd_rtnl_message_addr_get_ifindex(sd_netlink_message *m, int *ret_ifindex) {
++_public_ int sd_rtnl_message_addr_get_ifindex(sd_netlink_message *m, int *ret_ifindex) {
+ struct ifaddrmsg *ifa;
+
+ assert_return(m, -EINVAL);
+@@ -707,7 +707,7 @@ int sd_rtnl_message_addr_get_ifindex(sd_netlink_message *m, int *ret_ifindex) {
+ return 0;
+ }
+
+-int sd_rtnl_message_new_addr(
++_public_ int sd_rtnl_message_new_addr(
+ sd_netlink *rtnl,
+ sd_netlink_message **ret,
+ uint16_t nlmsg_type,
+@@ -736,7 +736,7 @@ int sd_rtnl_message_new_addr(
+ return 0;
+ }
+
+-int sd_rtnl_message_new_addr_update(
++_public_ int sd_rtnl_message_new_addr_update(
+ sd_netlink *rtnl,
+ sd_netlink_message **ret,
+ int index,
+@@ -752,7 +752,7 @@ int sd_rtnl_message_new_addr_update(
+ return 0;
+ }
+
+-int sd_rtnl_message_link_get_ifindex(sd_netlink_message *m, int *ifindex) {
++_public_ int sd_rtnl_message_link_get_ifindex(sd_netlink_message *m, int *ifindex) {
+ struct ifinfomsg *ifi;
+
+ assert_return(m, -EINVAL);
+@@ -767,7 +767,7 @@ int sd_rtnl_message_link_get_ifindex(sd_netlink_message *m, int *ifindex) {
+ return 0;
+ }
+
+-int sd_rtnl_message_link_get_flags(sd_netlink_message *m, unsigned *flags) {
++_public_ int sd_rtnl_message_link_get_flags(sd_netlink_message *m, unsigned *flags) {
+ struct ifinfomsg *ifi;
+
+ assert_return(m, -EINVAL);
+@@ -782,7 +782,7 @@ int sd_rtnl_message_link_get_flags(sd_netlink_message *m, unsigned *flags) {
+ return 0;
+ }
+
+-int sd_rtnl_message_link_get_type(sd_netlink_message *m, unsigned short *type) {
++_public_ int sd_rtnl_message_link_get_type(sd_netlink_message *m, unsigned short *type) {
+ struct ifinfomsg *ifi;
+
+ assert_return(m, -EINVAL);
+@@ -797,7 +797,7 @@ int sd_rtnl_message_link_get_type(sd_netlink_message *m, unsigned short *type) {
+ return 0;
+ }
+
+-int sd_rtnl_message_get_family(sd_netlink_message *m, int *family) {
++_public_ int sd_rtnl_message_get_family(sd_netlink_message *m, int *family) {
+ assert_return(m, -EINVAL);
+ assert_return(family, -EINVAL);
+
+@@ -856,7 +856,7 @@ int sd_rtnl_message_get_family(sd_netlink_message *m, int *family) {
+ return -EOPNOTSUPP;
+ }
+
+-int sd_rtnl_message_new_addrlabel(
++_public_ int sd_rtnl_message_new_addrlabel(
+ sd_netlink *rtnl,
+ sd_netlink_message **ret,
+ uint16_t nlmsg_type,
+@@ -884,7 +884,7 @@ int sd_rtnl_message_new_addrlabel(
+ return 0;
+ }
+
+-int sd_rtnl_message_addrlabel_set_prefixlen(sd_netlink_message *m, unsigned char prefixlen) {
++_public_ int sd_rtnl_message_addrlabel_set_prefixlen(sd_netlink_message *m, unsigned char prefixlen) {
+ struct ifaddrlblmsg *addrlabel;
+
+ assert_return(m, -EINVAL);
+@@ -901,7 +901,7 @@ int sd_rtnl_message_addrlabel_set_prefixlen(sd_netlink_message *m, unsigned char
+ return 0;
+ }
+
+-int sd_rtnl_message_addrlabel_get_prefixlen(sd_netlink_message *m, unsigned char *prefixlen) {
++_public_ int sd_rtnl_message_addrlabel_get_prefixlen(sd_netlink_message *m, unsigned char *prefixlen) {
+ struct ifaddrlblmsg *addrlabel;
+
+ assert_return(m, -EINVAL);
+@@ -915,7 +915,7 @@ int sd_rtnl_message_addrlabel_get_prefixlen(sd_netlink_message *m, unsigned char
+ return 0;
+ }
+
+-int sd_rtnl_message_new_routing_policy_rule(
++_public_ int sd_rtnl_message_new_routing_policy_rule(
+ sd_netlink *rtnl,
+ sd_netlink_message **ret,
+ uint16_t nlmsg_type,
+@@ -940,7 +940,7 @@ int sd_rtnl_message_new_routing_policy_rule(
+ return 0;
+ }
+
+-int sd_rtnl_message_routing_policy_rule_set_tos(sd_netlink_message *m, uint8_t tos) {
++_public_ int sd_rtnl_message_routing_policy_rule_set_tos(sd_netlink_message *m, uint8_t tos) {
+ struct fib_rule_hdr *frh;
+
+ assert_return(m, -EINVAL);
+@@ -954,7 +954,7 @@ int sd_rtnl_message_routing_policy_rule_set_tos(sd_netlink_message *m, uint8_t t
+ return 0;
+ }
+
+-int sd_rtnl_message_routing_policy_rule_get_tos(sd_netlink_message *m, uint8_t *tos) {
++_public_ int sd_rtnl_message_routing_policy_rule_get_tos(sd_netlink_message *m, uint8_t *tos) {
+ struct fib_rule_hdr *frh;
+
+ assert_return(m, -EINVAL);
+@@ -968,7 +968,7 @@ int sd_rtnl_message_routing_policy_rule_get_tos(sd_netlink_message *m, uint8_t *
+ return 0;
+ }
+
+-int sd_rtnl_message_routing_policy_rule_set_table(sd_netlink_message *m, uint8_t table) {
++_public_ int sd_rtnl_message_routing_policy_rule_set_table(sd_netlink_message *m, uint8_t table) {
+ struct fib_rule_hdr *frh;
+
+ assert_return(m, -EINVAL);
+@@ -982,7 +982,7 @@ int sd_rtnl_message_routing_policy_rule_set_table(sd_netlink_message *m, uint8_t
+ return 0;
+ }
+
+-int sd_rtnl_message_routing_policy_rule_get_table(sd_netlink_message *m, uint8_t *table) {
++_public_ int sd_rtnl_message_routing_policy_rule_get_table(sd_netlink_message *m, uint8_t *table) {
+ struct fib_rule_hdr *frh;
+
+ assert_return(m, -EINVAL);
+@@ -996,7 +996,7 @@ int sd_rtnl_message_routing_policy_rule_get_table(sd_netlink_message *m, uint8_t
+ return 0;
+ }
+
+-int sd_rtnl_message_routing_policy_rule_set_flags(sd_netlink_message *m, uint32_t flags) {
++_public_ int sd_rtnl_message_routing_policy_rule_set_flags(sd_netlink_message *m, uint32_t flags) {
+ struct fib_rule_hdr *frh;
+
+ assert_return(m, -EINVAL);
+@@ -1009,7 +1009,7 @@ int sd_rtnl_message_routing_policy_rule_set_flags(sd_netlink_message *m, uint32_
+ return 0;
+ }
+
+-int sd_rtnl_message_routing_policy_rule_get_flags(sd_netlink_message *m, uint32_t *flags) {
++_public_ int sd_rtnl_message_routing_policy_rule_get_flags(sd_netlink_message *m, uint32_t *flags) {
+ struct fib_rule_hdr *frh;
+
+ assert_return(m, -EINVAL);
+@@ -1022,7 +1022,7 @@ int sd_rtnl_message_routing_policy_rule_get_flags(sd_netlink_message *m, uint32_
+ return 0;
+ }
+
+-int sd_rtnl_message_routing_policy_rule_set_fib_type(sd_netlink_message *m, uint8_t type) {
++_public_ int sd_rtnl_message_routing_policy_rule_set_fib_type(sd_netlink_message *m, uint8_t type) {
+ struct fib_rule_hdr *frh;
+
+ assert_return(m, -EINVAL);
+@@ -1036,7 +1036,7 @@ int sd_rtnl_message_routing_policy_rule_set_fib_type(sd_netlink_message *m, uint
+ return 0;
+ }
+
+-int sd_rtnl_message_routing_policy_rule_get_fib_type(sd_netlink_message *m, uint8_t *type) {
++_public_ int sd_rtnl_message_routing_policy_rule_get_fib_type(sd_netlink_message *m, uint8_t *type) {
+ struct fib_rule_hdr *frh;
+
+ assert_return(m, -EINVAL);
+@@ -1050,7 +1050,7 @@ int sd_rtnl_message_routing_policy_rule_get_fib_type(sd_netlink_message *m, uint
+ return 0;
+ }
+
+-int sd_rtnl_message_routing_policy_rule_set_fib_dst_prefixlen(sd_netlink_message *m, uint8_t len) {
++_public_ int sd_rtnl_message_routing_policy_rule_set_fib_dst_prefixlen(sd_netlink_message *m, uint8_t len) {
+ struct fib_rule_hdr *frh;
+
+ assert_return(m, -EINVAL);
+@@ -1064,7 +1064,7 @@ int sd_rtnl_message_routing_policy_rule_set_fib_dst_prefixlen(sd_netlink_message
+ return 0;
+ }
+
+-int sd_rtnl_message_routing_policy_rule_get_fib_dst_prefixlen(sd_netlink_message *m, uint8_t *len) {
++_public_ int sd_rtnl_message_routing_policy_rule_get_fib_dst_prefixlen(sd_netlink_message *m, uint8_t *len) {
+ struct fib_rule_hdr *frh;
+
+ assert_return(m, -EINVAL);
+@@ -1078,7 +1078,7 @@ int sd_rtnl_message_routing_policy_rule_get_fib_dst_prefixlen(sd_netlink_message
+ return 0;
+ }
+
+-int sd_rtnl_message_routing_policy_rule_set_fib_src_prefixlen(sd_netlink_message *m, uint8_t len) {
++_public_ int sd_rtnl_message_routing_policy_rule_set_fib_src_prefixlen(sd_netlink_message *m, uint8_t len) {
+ struct fib_rule_hdr *frh;
+
+ assert_return(m, -EINVAL);
+@@ -1092,7 +1092,7 @@ int sd_rtnl_message_routing_policy_rule_set_fib_src_prefixlen(sd_netlink_message
+ return 0;
+ }
+
+-int sd_rtnl_message_routing_policy_rule_get_fib_src_prefixlen(sd_netlink_message *m, uint8_t *len) {
++_public_ int sd_rtnl_message_routing_policy_rule_get_fib_src_prefixlen(sd_netlink_message *m, uint8_t *len) {
+ struct fib_rule_hdr *frh;
+
+ assert_return(m, -EINVAL);
+@@ -1106,7 +1106,7 @@ int sd_rtnl_message_routing_policy_rule_get_fib_src_prefixlen(sd_netlink_message
+ return 0;
+ }
+
+-int sd_rtnl_message_new_traffic_control(
++_public_ int sd_rtnl_message_new_traffic_control(
+ sd_netlink *rtnl,
+ sd_netlink_message **ret,
+ uint16_t nlmsg_type,
+@@ -1135,7 +1135,7 @@ int sd_rtnl_message_new_traffic_control(
+ return 0;
+ }
+
+-int sd_rtnl_message_traffic_control_get_ifindex(sd_netlink_message *m, int *ret) {
++_public_ int sd_rtnl_message_traffic_control_get_ifindex(sd_netlink_message *m, int *ret) {
+ struct tcmsg *tcm;
+
+ assert_return(m, -EINVAL);
+@@ -1149,7 +1149,7 @@ int sd_rtnl_message_traffic_control_get_ifindex(sd_netlink_message *m, int *ret)
+ return 0;
+ }
+
+-int sd_rtnl_message_traffic_control_get_handle(sd_netlink_message *m, uint32_t *ret) {
++_public_ int sd_rtnl_message_traffic_control_get_handle(sd_netlink_message *m, uint32_t *ret) {
+ struct tcmsg *tcm;
+
+ assert_return(m, -EINVAL);
+@@ -1163,7 +1163,7 @@ int sd_rtnl_message_traffic_control_get_handle(sd_netlink_message *m, uint32_t *
+ return 0;
+ }
+
+-int sd_rtnl_message_traffic_control_get_parent(sd_netlink_message *m, uint32_t *ret) {
++_public_ int sd_rtnl_message_traffic_control_get_parent(sd_netlink_message *m, uint32_t *ret) {
+ struct tcmsg *tcm;
+
+ assert_return(m, -EINVAL);
+@@ -1177,7 +1177,7 @@ int sd_rtnl_message_traffic_control_get_parent(sd_netlink_message *m, uint32_t *
+ return 0;
+ }
+
+-int sd_rtnl_message_new_mdb(
++_public_ int sd_rtnl_message_new_mdb(
+ sd_netlink *rtnl,
+ sd_netlink_message **ret,
+ uint16_t nlmsg_type,
+diff --git a/src/libsystemd/sd-netlink/netlink-message.c b/src/libsystemd/sd-netlink/netlink-message.c
+index 000a50ee3e..33bec2ac9b 100644
+--- a/src/libsystemd/sd-netlink/netlink-message.c
++++ b/src/libsystemd/sd-netlink/netlink-message.c
+@@ -113,7 +113,7 @@ int message_new_synthetic_error(sd_netlink *nl, int error, uint32_t serial, sd_n
+ return 0;
+ }
+
+-int sd_netlink_message_set_request_dump(sd_netlink_message *m, int dump) {
++_public_ int sd_netlink_message_set_request_dump(sd_netlink_message *m, int dump) {
+ assert_return(m, -EINVAL);
+ assert_return(m->hdr, -EINVAL);
+ assert_return(m->protocol != NETLINK_ROUTE ||
+@@ -129,7 +129,7 @@ int sd_netlink_message_set_request_dump(sd_netlink_message *m, int dump) {
+
+ DEFINE_TRIVIAL_REF_FUNC(sd_netlink_message, sd_netlink_message);
+
+-sd_netlink_message* sd_netlink_message_unref(sd_netlink_message *m) {
++_public_ sd_netlink_message* sd_netlink_message_unref(sd_netlink_message *m) {
+ while (m && --m->n_ref == 0) {
+ unsigned i;
+
+@@ -146,7 +146,7 @@ sd_netlink_message* sd_netlink_message_unref(sd_netlink_message *m) {
+ return NULL;
+ }
+
+-int sd_netlink_message_get_type(sd_netlink_message *m, uint16_t *ret) {
++_public_ int sd_netlink_message_get_type(sd_netlink_message *m, uint16_t *ret) {
+ assert_return(m, -EINVAL);
+ assert_return(ret, -EINVAL);
+
+@@ -155,7 +155,7 @@ int sd_netlink_message_get_type(sd_netlink_message *m, uint16_t *ret) {
+ return 0;
+ }
+
+-int sd_netlink_message_set_flags(sd_netlink_message *m, uint16_t flags) {
++_public_ int sd_netlink_message_set_flags(sd_netlink_message *m, uint16_t flags) {
+ assert_return(m, -EINVAL);
+ assert_return(flags != 0, -EINVAL);
+
+@@ -164,7 +164,7 @@ int sd_netlink_message_set_flags(sd_netlink_message *m, uint16_t flags) {
+ return 0;
+ }
+
+-int sd_netlink_message_is_broadcast(sd_netlink_message *m) {
++_public_ int sd_netlink_message_is_broadcast(sd_netlink_message *m) {
+ assert_return(m, -EINVAL);
+
+ return m->multicast_group != 0;
+@@ -230,7 +230,7 @@ static int message_attribute_has_type(sd_netlink_message *m, size_t *ret_size, u
+ return 0;
+ }
+
+-int sd_netlink_message_append_string(sd_netlink_message *m, uint16_t attr_type, const char *data) {
++_public_ int sd_netlink_message_append_string(sd_netlink_message *m, uint16_t attr_type, const char *data) {
+ size_t length, size;
+ int r;
+
+@@ -256,7 +256,7 @@ int sd_netlink_message_append_string(sd_netlink_message *m, uint16_t attr_type,
+ return 0;
+ }
+
+-int sd_netlink_message_append_strv(sd_netlink_message *m, uint16_t attr_type, const char* const *data) {
++_public_ int sd_netlink_message_append_strv(sd_netlink_message *m, uint16_t attr_type, const char* const *data) {
+ size_t length, size;
+ int r;
+
+@@ -284,7 +284,7 @@ int sd_netlink_message_append_strv(sd_netlink_message *m, uint16_t attr_type, co
+ return 0;
+ }
+
+-int sd_netlink_message_append_flag(sd_netlink_message *m, uint16_t attr_type) {
++_public_ int sd_netlink_message_append_flag(sd_netlink_message *m, uint16_t attr_type) {
+ size_t size;
+ int r;
+
+@@ -302,7 +302,7 @@ int sd_netlink_message_append_flag(sd_netlink_message *m, uint16_t attr_type) {
+ return 0;
+ }
+
+-int sd_netlink_message_append_u8(sd_netlink_message *m, uint16_t attr_type, uint8_t data) {
++_public_ int sd_netlink_message_append_u8(sd_netlink_message *m, uint16_t attr_type, uint8_t data) {
+ int r;
+
+ assert_return(m, -EINVAL);
+@@ -319,7 +319,7 @@ int sd_netlink_message_append_u8(sd_netlink_message *m, uint16_t attr_type, uint
+ return 0;
+ }
+
+-int sd_netlink_message_append_u16(sd_netlink_message *m, uint16_t attr_type, uint16_t data) {
++_public_ int sd_netlink_message_append_u16(sd_netlink_message *m, uint16_t attr_type, uint16_t data) {
+ int r;
+
+ assert_return(m, -EINVAL);
+@@ -336,7 +336,7 @@ int sd_netlink_message_append_u16(sd_netlink_message *m, uint16_t attr_type, uin
+ return 0;
+ }
+
+-int sd_netlink_message_append_u32(sd_netlink_message *m, uint16_t attr_type, uint32_t data) {
++_public_ int sd_netlink_message_append_u32(sd_netlink_message *m, uint16_t attr_type, uint32_t data) {
+ int r;
+
+ assert_return(m, -EINVAL);
+@@ -353,7 +353,7 @@ int sd_netlink_message_append_u32(sd_netlink_message *m, uint16_t attr_type, uin
+ return 0;
+ }
+
+-int sd_netlink_message_append_u64(sd_netlink_message *m, uint16_t attr_type, uint64_t data) {
++_public_ int sd_netlink_message_append_u64(sd_netlink_message *m, uint16_t attr_type, uint64_t data) {
+ int r;
+
+ assert_return(m, -EINVAL);
+@@ -370,7 +370,7 @@ int sd_netlink_message_append_u64(sd_netlink_message *m, uint16_t attr_type, uin
+ return 0;
+ }
+
+-int sd_netlink_message_append_s8(sd_netlink_message *m, uint16_t attr_type, int8_t data) {
++_public_ int sd_netlink_message_append_s8(sd_netlink_message *m, uint16_t attr_type, int8_t data) {
+ int r;
+
+ assert_return(m, -EINVAL);
+@@ -387,7 +387,7 @@ int sd_netlink_message_append_s8(sd_netlink_message *m, uint16_t attr_type, int8
+ return 0;
+ }
+
+-int sd_netlink_message_append_s16(sd_netlink_message *m, uint16_t attr_type, int16_t data) {
++_public_ int sd_netlink_message_append_s16(sd_netlink_message *m, uint16_t attr_type, int16_t data) {
+ int r;
+
+ assert_return(m, -EINVAL);
+@@ -404,7 +404,7 @@ int sd_netlink_message_append_s16(sd_netlink_message *m, uint16_t attr_type, int
+ return 0;
+ }
+
+-int sd_netlink_message_append_s32(sd_netlink_message *m, uint16_t attr_type, int32_t data) {
++_public_ int sd_netlink_message_append_s32(sd_netlink_message *m, uint16_t attr_type, int32_t data) {
+ int r;
+
+ assert_return(m, -EINVAL);
+@@ -421,7 +421,7 @@ int sd_netlink_message_append_s32(sd_netlink_message *m, uint16_t attr_type, int
+ return 0;
+ }
+
+-int sd_netlink_message_append_s64(sd_netlink_message *m, uint16_t attr_type, int64_t data) {
++_public_ int sd_netlink_message_append_s64(sd_netlink_message *m, uint16_t attr_type, int64_t data) {
+ int r;
+
+ assert_return(m, -EINVAL);
+@@ -438,7 +438,7 @@ int sd_netlink_message_append_s64(sd_netlink_message *m, uint16_t attr_type, int
+ return 0;
+ }
+
+-int sd_netlink_message_append_data(sd_netlink_message *m, uint16_t attr_type, const void *data, size_t len) {
++_public_ int sd_netlink_message_append_data(sd_netlink_message *m, uint16_t attr_type, const void *data, size_t len) {
+ int r;
+
+ assert_return(m, -EINVAL);
+@@ -451,7 +451,7 @@ int sd_netlink_message_append_data(sd_netlink_message *m, uint16_t attr_type, co
+ return 0;
+ }
+
+-int sd_netlink_message_append_container_data(
++_public_ int sd_netlink_message_append_container_data(
+ sd_netlink_message *m,
+ uint16_t container_type,
+ uint16_t attr_type,
+@@ -493,11 +493,11 @@ int netlink_message_append_in_addr_union(sd_netlink_message *m, uint16_t attr_ty
+ return 0;
+ }
+
+-int sd_netlink_message_append_in_addr(sd_netlink_message *m, uint16_t attr_type, const struct in_addr *data) {
++_public_ int sd_netlink_message_append_in_addr(sd_netlink_message *m, uint16_t attr_type, const struct in_addr *data) {
+ return netlink_message_append_in_addr_union(m, attr_type, AF_INET, (const union in_addr_union *) data);
+ }
+
+-int sd_netlink_message_append_in6_addr(sd_netlink_message *m, uint16_t attr_type, const struct in6_addr *data) {
++_public_ int sd_netlink_message_append_in6_addr(sd_netlink_message *m, uint16_t attr_type, const struct in6_addr *data) {
+ return netlink_message_append_in_addr_union(m, attr_type, AF_INET6, (const union in_addr_union *) data);
+ }
+
+@@ -520,15 +520,15 @@ int netlink_message_append_sockaddr_union(sd_netlink_message *m, uint16_t attr_t
+ return 0;
+ }
+
+-int sd_netlink_message_append_sockaddr_in(sd_netlink_message *m, uint16_t attr_type, const struct sockaddr_in *data) {
++_public_ int sd_netlink_message_append_sockaddr_in(sd_netlink_message *m, uint16_t attr_type, const struct sockaddr_in *data) {
+ return netlink_message_append_sockaddr_union(m, attr_type, (const union sockaddr_union *) data);
+ }
+
+-int sd_netlink_message_append_sockaddr_in6(sd_netlink_message *m, uint16_t attr_type, const struct sockaddr_in6 *data) {
++_public_ int sd_netlink_message_append_sockaddr_in6(sd_netlink_message *m, uint16_t attr_type, const struct sockaddr_in6 *data) {
+ return netlink_message_append_sockaddr_union(m, attr_type, (const union sockaddr_union *) data);
+ }
+
+-int sd_netlink_message_append_ether_addr(sd_netlink_message *m, uint16_t attr_type, const struct ether_addr *data) {
++_public_ int sd_netlink_message_append_ether_addr(sd_netlink_message *m, uint16_t attr_type, const struct ether_addr *data) {
+ int r;
+
+ assert_return(m, -EINVAL);
+@@ -565,7 +565,7 @@ int netlink_message_append_hw_addr(sd_netlink_message *m, uint16_t attr_type, co
+ return 0;
+ }
+
+-int sd_netlink_message_append_cache_info(sd_netlink_message *m, uint16_t attr_type, const struct ifa_cacheinfo *info) {
++_public_ int sd_netlink_message_append_cache_info(sd_netlink_message *m, uint16_t attr_type, const struct ifa_cacheinfo *info) {
+ int r;
+
+ assert_return(m, -EINVAL);
+@@ -583,7 +583,7 @@ int sd_netlink_message_append_cache_info(sd_netlink_message *m, uint16_t attr_ty
+ return 0;
+ }
+
+-int sd_netlink_message_open_container(sd_netlink_message *m, uint16_t attr_type) {
++_public_ int sd_netlink_message_open_container(sd_netlink_message *m, uint16_t attr_type) {
+ size_t size;
+ int r;
+
+@@ -632,7 +632,7 @@ int sd_netlink_message_open_container(sd_netlink_message *m, uint16_t attr_type)
+ return 0;
+ }
+
+-int sd_netlink_message_open_container_union(sd_netlink_message *m, uint16_t attr_type, const char *key) {
++_public_ int sd_netlink_message_open_container_union(sd_netlink_message *m, uint16_t attr_type, const char *key) {
+ const NLAPolicySetUnion *policy_set_union;
+ int r;
+
+@@ -671,7 +671,7 @@ int sd_netlink_message_open_container_union(sd_netlink_message *m, uint16_t attr
+ return 0;
+ }
+
+-int sd_netlink_message_close_container(sd_netlink_message *m) {
++_public_ int sd_netlink_message_close_container(sd_netlink_message *m) {
+ assert_return(m, -EINVAL);
+ assert_return(!m->sealed, -EPERM);
+ assert_return(m->n_containers > 0, -EINVAL);
+@@ -683,7 +683,7 @@ int sd_netlink_message_close_container(sd_netlink_message *m) {
+ return 0;
+ }
+
+-int sd_netlink_message_open_array(sd_netlink_message *m, uint16_t attr_type) {
++_public_ int sd_netlink_message_open_array(sd_netlink_message *m, uint16_t attr_type) {
+ int r;
+
+ assert_return(m, -EINVAL);
+@@ -701,7 +701,7 @@ int sd_netlink_message_open_array(sd_netlink_message *m, uint16_t attr_type) {
+ return 0;
+ }
+
+-int sd_netlink_message_cancel_array(sd_netlink_message *m) {
++_public_ int sd_netlink_message_cancel_array(sd_netlink_message *m) {
+ uint32_t rta_len;
+
+ assert_return(m, -EINVAL);
+@@ -757,7 +757,7 @@ static int netlink_message_read_internal(
+ return RTA_PAYLOAD(rta);
+ }
+
+-int sd_netlink_message_read(sd_netlink_message *m, uint16_t attr_type, size_t size, void *data) {
++_public_ int sd_netlink_message_read(sd_netlink_message *m, uint16_t attr_type, size_t size, void *data) {
+ void *attr_data;
+ int r;
+
+@@ -776,7 +776,7 @@ int sd_netlink_message_read(sd_netlink_message *m, uint16_t attr_type, size_t si
+ return r;
+ }
+
+-int sd_netlink_message_read_data(sd_netlink_message *m, uint16_t attr_type, size_t *ret_size, void **ret_data) {
++_public_ int sd_netlink_message_read_data(sd_netlink_message *m, uint16_t attr_type, size_t *ret_size, void **ret_data) {
+ void *attr_data;
+ int r;
+
+@@ -802,7 +802,7 @@ int sd_netlink_message_read_data(sd_netlink_message *m, uint16_t attr_type, size
+ return r;
+ }
+
+-int sd_netlink_message_read_data_suffix0(sd_netlink_message *m, uint16_t attr_type, size_t *ret_size, void **ret_data) {
++_public_ int sd_netlink_message_read_data_suffix0(sd_netlink_message *m, uint16_t attr_type, size_t *ret_size, void **ret_data) {
+ void *attr_data;
+ int r;
+
+@@ -828,7 +828,7 @@ int sd_netlink_message_read_data_suffix0(sd_netlink_message *m, uint16_t attr_ty
+ return r;
+ }
+
+-int sd_netlink_message_read_string_strdup(sd_netlink_message *m, uint16_t attr_type, char **data) {
++_public_ int sd_netlink_message_read_string_strdup(sd_netlink_message *m, uint16_t attr_type, char **data) {
+ void *attr_data;
+ int r;
+
+@@ -855,7 +855,7 @@ int sd_netlink_message_read_string_strdup(sd_netlink_message *m, uint16_t attr_t
+ return 0;
+ }
+
+-int sd_netlink_message_read_string(sd_netlink_message *m, uint16_t attr_type, const char **data) {
++_public_ int sd_netlink_message_read_string(sd_netlink_message *m, uint16_t attr_type, const char **data) {
+ void *attr_data;
+ int r;
+
+@@ -878,7 +878,7 @@ int sd_netlink_message_read_string(sd_netlink_message *m, uint16_t attr_type, co
+ return 0;
+ }
+
+-int sd_netlink_message_read_u8(sd_netlink_message *m, uint16_t attr_type, uint8_t *data) {
++_public_ int sd_netlink_message_read_u8(sd_netlink_message *m, uint16_t attr_type, uint8_t *data) {
+ void *attr_data;
+ int r;
+
+@@ -901,7 +901,7 @@ int sd_netlink_message_read_u8(sd_netlink_message *m, uint16_t attr_type, uint8_
+ return 0;
+ }
+
+-int sd_netlink_message_read_u16(sd_netlink_message *m, uint16_t attr_type, uint16_t *data) {
++_public_ int sd_netlink_message_read_u16(sd_netlink_message *m, uint16_t attr_type, uint16_t *data) {
+ void *attr_data;
+ bool net_byteorder;
+ int r;
+@@ -929,7 +929,7 @@ int sd_netlink_message_read_u16(sd_netlink_message *m, uint16_t attr_type, uint1
+ return 0;
+ }
+
+-int sd_netlink_message_read_u32(sd_netlink_message *m, uint16_t attr_type, uint32_t *data) {
++_public_ int sd_netlink_message_read_u32(sd_netlink_message *m, uint16_t attr_type, uint32_t *data) {
+ void *attr_data;
+ bool net_byteorder;
+ int r;
+@@ -957,7 +957,7 @@ int sd_netlink_message_read_u32(sd_netlink_message *m, uint16_t attr_type, uint3
+ return 0;
+ }
+
+-int sd_netlink_message_read_ether_addr(sd_netlink_message *m, uint16_t attr_type, struct ether_addr *data) {
++_public_ int sd_netlink_message_read_ether_addr(sd_netlink_message *m, uint16_t attr_type, struct ether_addr *data) {
+ void *attr_data;
+ int r;
+
+@@ -1005,7 +1005,7 @@ int netlink_message_read_hw_addr(sd_netlink_message *m, uint16_t attr_type, stru
+ return 0;
+ }
+
+-int sd_netlink_message_read_cache_info(sd_netlink_message *m, uint16_t attr_type, struct ifa_cacheinfo *info) {
++_public_ int sd_netlink_message_read_cache_info(sd_netlink_message *m, uint16_t attr_type, struct ifa_cacheinfo *info) {
+ void *attr_data;
+ int r;
+
+@@ -1052,7 +1052,7 @@ int netlink_message_read_in_addr_union(sd_netlink_message *m, uint16_t attr_type
+ return 0;
+ }
+
+-int sd_netlink_message_read_in_addr(sd_netlink_message *m, uint16_t attr_type, struct in_addr *data) {
++_public_ int sd_netlink_message_read_in_addr(sd_netlink_message *m, uint16_t attr_type, struct in_addr *data) {
+ union in_addr_union u;
+ int r;
+
+@@ -1063,7 +1063,7 @@ int sd_netlink_message_read_in_addr(sd_netlink_message *m, uint16_t attr_type, s
+ return r;
+ }
+
+-int sd_netlink_message_read_in6_addr(sd_netlink_message *m, uint16_t attr_type, struct in6_addr *data) {
++_public_ int sd_netlink_message_read_in6_addr(sd_netlink_message *m, uint16_t attr_type, struct in6_addr *data) {
+ union in_addr_union u;
+ int r;
+
+@@ -1074,7 +1074,7 @@ int sd_netlink_message_read_in6_addr(sd_netlink_message *m, uint16_t attr_type,
+ return r;
+ }
+
+-int sd_netlink_message_has_flag(sd_netlink_message *m, uint16_t attr_type) {
++_public_ int sd_netlink_message_has_flag(sd_netlink_message *m, uint16_t attr_type) {
+ void *attr_data;
+ int r;
+
+@@ -1095,7 +1095,7 @@ int sd_netlink_message_has_flag(sd_netlink_message *m, uint16_t attr_type) {
+ return 1;
+ }
+
+-int sd_netlink_message_read_strv(sd_netlink_message *m, uint16_t container_type, uint16_t attr_type, char ***ret) {
++_public_ int sd_netlink_message_read_strv(sd_netlink_message *m, uint16_t container_type, uint16_t attr_type, char ***ret) {
+ _cleanup_strv_free_ char **s = NULL;
+ const NLAPolicySet *policy_set;
+ const NLAPolicy *policy;
+@@ -1192,7 +1192,7 @@ static int netlink_container_parse(
+ return 0;
+ }
+
+-int sd_netlink_message_enter_container(sd_netlink_message *m, uint16_t attr_type) {
++_public_ int sd_netlink_message_enter_container(sd_netlink_message *m, uint16_t attr_type) {
+ const NLAPolicy *policy;
+ const NLAPolicySet *policy_set;
+ void *container;
+@@ -1279,7 +1279,7 @@ int sd_netlink_message_enter_container(sd_netlink_message *m, uint16_t attr_type
+ return 0;
+ }
+
+-int sd_netlink_message_enter_array(sd_netlink_message *m, uint16_t attr_type) {
++_public_ int sd_netlink_message_enter_array(sd_netlink_message *m, uint16_t attr_type) {
+ void *container;
+ size_t size;
+ int r;
+@@ -1308,7 +1308,7 @@ int sd_netlink_message_enter_array(sd_netlink_message *m, uint16_t attr_type) {
+ return 0;
+ }
+
+-int sd_netlink_message_exit_container(sd_netlink_message *m) {
++_public_ int sd_netlink_message_exit_container(sd_netlink_message *m) {
+ assert_return(m, -EINVAL);
+ assert_return(m->sealed, -EINVAL);
+ assert_return(m->n_containers > 0, -EINVAL);
+@@ -1322,7 +1322,7 @@ int sd_netlink_message_exit_container(sd_netlink_message *m) {
+ return 0;
+ }
+
+-int sd_netlink_message_get_max_attribute(sd_netlink_message *m, uint16_t *ret) {
++_public_ int sd_netlink_message_get_max_attribute(sd_netlink_message *m, uint16_t *ret) {
+ assert_return(m, -EINVAL);
+ assert_return(m->sealed, -EINVAL);
+ assert_return(ret, -EINVAL);
+@@ -1331,14 +1331,14 @@ int sd_netlink_message_get_max_attribute(sd_netlink_message *m, uint16_t *ret) {
+ return 0;
+ }
+
+-int sd_netlink_message_is_error(sd_netlink_message *m) {
++_public_ int sd_netlink_message_is_error(sd_netlink_message *m) {
+ assert_return(m, 0);
+ assert_return(m->hdr, 0);
+
+ return m->hdr->nlmsg_type == NLMSG_ERROR;
+ }
+
+-int sd_netlink_message_get_errno(sd_netlink_message *m) {
++_public_ int sd_netlink_message_get_errno(sd_netlink_message *m) {
+ struct nlmsgerr *err;
+
+ assert_return(m, -EINVAL);
+@@ -1373,7 +1373,7 @@ static int netlink_message_parse_error(sd_netlink_message *m) {
+ NLMSG_PAYLOAD(m->hdr, hlen));
+ }
+
+-int sd_netlink_message_rewind(sd_netlink_message *m, sd_netlink *nl) {
++_public_ int sd_netlink_message_rewind(sd_netlink_message *m, sd_netlink *nl) {
+ size_t size;
+ int r;
+
+diff --git a/src/libsystemd/sd-netlink/sd-netlink.c b/src/libsystemd/sd-netlink/sd-netlink.c
+index ce0687eb57..fbebcf301b 100644
+--- a/src/libsystemd/sd-netlink/sd-netlink.c
++++ b/src/libsystemd/sd-netlink/sd-netlink.c
+@@ -65,7 +65,7 @@ static int netlink_new(sd_netlink **ret) {
+ return 0;
+ }
+
+-int sd_netlink_open_fd(sd_netlink **ret, int fd) {
++_public_ int sd_netlink_open_fd(sd_netlink **ret, int fd) {
+ _cleanup_(sd_netlink_unrefp) sd_netlink *nl = NULL;
+ int r, protocol;
+
+@@ -103,11 +103,11 @@ int sd_netlink_open_fd(sd_netlink **ret, int fd) {
+ return 0;
+ }
+
+-int sd_netlink_open(sd_netlink **ret) {
++_public_ int sd_netlink_open(sd_netlink **ret) {
+ return netlink_open_family(ret, NETLINK_ROUTE);
+ }
+
+-int sd_netlink_increase_rxbuf(sd_netlink *nl, size_t size) {
++_public_ int sd_netlink_increase_rxbuf(sd_netlink *nl, size_t size) {
+ assert_return(nl, -EINVAL);
+ assert_return(!netlink_pid_changed(nl), -ECHILD);
+
+@@ -145,7 +145,7 @@ static sd_netlink *netlink_free(sd_netlink *nl) {
+
+ DEFINE_TRIVIAL_REF_UNREF_FUNC(sd_netlink, sd_netlink, netlink_free);
+
+-int sd_netlink_send(
++_public_ int sd_netlink_send(
+ sd_netlink *nl,
+ sd_netlink_message *message,
+ uint32_t *serial) {
+@@ -451,7 +451,7 @@ static int timeout_compare(const void *a, const void *b) {
+ return CMP(x->timeout, y->timeout);
+ }
+
+-int sd_netlink_call_async(
++_public_ int sd_netlink_call_async(
+ sd_netlink *nl,
+ sd_netlink_slot **ret_slot,
+ sd_netlink_message *m,
+@@ -516,7 +516,7 @@ int sd_netlink_call_async(
+ return k;
+ }
+
+-int sd_netlink_read(
++_public_ int sd_netlink_read(
+ sd_netlink *nl,
+ uint32_t serial,
+ uint64_t usec,
+@@ -586,7 +586,7 @@ int sd_netlink_read(
+ }
+ }
+
+-int sd_netlink_call(
++_public_ int sd_netlink_call(
+ sd_netlink *nl,
+ sd_netlink_message *message,
+ uint64_t usec,
+@@ -606,14 +606,14 @@ int sd_netlink_call(
+ return sd_netlink_read(nl, serial, usec, ret);
+ }
+
+-int sd_netlink_get_events(sd_netlink *nl) {
++_public_ int sd_netlink_get_events(sd_netlink *nl) {
+ assert_return(nl, -EINVAL);
+ assert_return(!netlink_pid_changed(nl), -ECHILD);
+
+ return ordered_set_size(nl->rqueue) == 0 ? POLLIN : 0;
+ }
+
+-int sd_netlink_get_timeout(sd_netlink *nl, uint64_t *timeout_usec) {
++_public_ int sd_netlink_get_timeout(sd_netlink *nl, uint64_t *timeout_usec) {
+ struct reply_callback *c;
+
+ assert_return(nl, -EINVAL);
+@@ -689,7 +689,7 @@ static int prepare_callback(sd_event_source *s, void *userdata) {
+ return 1;
+ }
+
+-int sd_netlink_attach_event(sd_netlink *nl, sd_event *event, int64_t priority) {
++_public_ int sd_netlink_attach_event(sd_netlink *nl, sd_event *event, int64_t priority) {
+ int r;
+
+ assert_return(nl, -EINVAL);
+@@ -741,7 +741,7 @@ fail:
+ return r;
+ }
+
+-int sd_netlink_detach_event(sd_netlink *nl) {
++_public_ int sd_netlink_detach_event(sd_netlink *nl) {
+ assert_return(nl, -EINVAL);
+ assert_return(nl->event, -ENXIO);
+
+@@ -804,7 +804,7 @@ int netlink_add_match_internal(
+ return 0;
+ }
+
+-int sd_netlink_add_match(
++_public_ int sd_netlink_add_match(
+ sd_netlink *rtnl,
+ sd_netlink_slot **ret_slot,
+ uint16_t type,
+@@ -874,7 +874,7 @@ int sd_netlink_add_match(
+ destroy_callback, userdata, description);
+ }
+
+-int sd_netlink_attach_filter(sd_netlink *nl, size_t len, const struct sock_filter *filter) {
++_public_ int sd_netlink_attach_filter(sd_netlink *nl, size_t len, const struct sock_filter *filter) {
+ assert_return(nl, -EINVAL);
+ assert_return(len == 0 || filter, -EINVAL);
+
+diff --git a/src/systemd/meson.build b/src/systemd/meson.build
+index a9cdcd24a0..03ef60f92a 100644
+--- a/src/systemd/meson.build
++++ b/src/systemd/meson.build
+@@ -13,6 +13,7 @@ _systemd_headers = [
+ 'sd-journal.h',
+ 'sd-login.h',
+ 'sd-messages.h',
++ 'sd-netlink.h',
+ 'sd-path.h',
+ ]
+
+@@ -35,7 +36,6 @@ _not_installed_headers = [
+ 'sd-lldp-tx.h',
+ 'sd-lldp.h',
+ 'sd-ndisc.h',
+- 'sd-netlink.h',
+ 'sd-network.h',
+ 'sd-radv.h',
+ 'sd-resolve.h',
+--
+2.39.2
+
diff --git a/systemd/systemd.nm b/systemd/systemd.nm
index 3981082ed..984a1c026 100644
--- a/systemd/systemd.nm
+++ b/systemd/systemd.nm
@@ -5,7 +5,7 @@
name = systemd
version = 254
-release = 1
+release = 2
maintainer = Stefan Schantl <stefan.schantl(a)ipfire.org>
groups = System/Base
@@ -131,6 +131,7 @@ build
# Run the testsuite.
ninja test -v %{PARALLELISMFLAGS} -C build || true
+
end
install
--
2.39.2
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2023-09-19 12:57 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-09-19 12:57 [PATCH] systemd: Built with systemd sd-netlink Jonatan Schlag
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox