From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jonatan Schlag To: development@lists.ipfire.org Subject: [PATCH] systemd: Built with systemd sd-netlink Date: Tue, 19 Sep 2023 12:57:34 +0000 Message-ID: <20230919125734.511013-1-jonatan.schlag@ipfire.org> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============5908466648033344283==" List-Id: --===============5908466648033344283== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable 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 --- ...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-netlin= k.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 +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; +=20 + 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; +=20 + LIBSYSTEMD_253 { +diff --git a/src/libsystemd/sd-netlink/netlink-genl.c b/src/libsystemd/sd-ne= tlink/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; + } +=20 +-int sd_genl_message_new(sd_netlink *nl, const char *family_name, uint8_t cm= d, sd_netlink_message **ret) { ++_public_ int sd_genl_message_new(sd_netlink *nl, const char *family_name, u= int8_t cmd, sd_netlink_message **ret) { + const GenericNetlinkFamily *family; + int r; +=20 +@@ -381,7 +381,7 @@ int sd_genl_message_new(sd_netlink *nl, const char *fami= ly_name, uint8_t cmd, sd + return genl_message_new(nl, family, cmd, ret); + } +=20 +-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_mes= sage *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_n= etlink_message *m, const + return 0; + } +=20 +-int sd_genl_message_get_command(sd_netlink *nl, sd_netlink_message *m, uint= 8_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(co= nst GenericNetlinkFamily + return 0; + } +=20 +-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, userd= ata, description); + } +=20 +-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/libsyste= md/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); + } +=20 +-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; +=20 + assert_return(m, -EINVAL); +@@ -74,7 +74,7 @@ int sd_rtnl_message_route_set_dst_prefixlen(sd_netlink_mes= sage *m, unsigned char + return 0; + } +=20 +-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; +=20 + assert_return(m, -EINVAL); +@@ -92,7 +92,7 @@ int sd_rtnl_message_route_set_src_prefixlen(sd_netlink_mes= sage *m, unsigned char + return 0; + } +=20 +-int sd_rtnl_message_route_set_scope(sd_netlink_message *m, unsigned char sc= ope) { ++_public_ int sd_rtnl_message_route_set_scope(sd_netlink_message *m, unsigne= d char scope) { + struct rtmsg *rtm; +=20 + assert_return(m, -EINVAL); +@@ -106,7 +106,7 @@ int sd_rtnl_message_route_set_scope(sd_netlink_message *= m, unsigned char scope) + return 0; + } +=20 +-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, unsigne= d flags) { + struct rtmsg *rtm; +=20 + assert_return(m, -EINVAL); +@@ -120,7 +120,7 @@ int sd_rtnl_message_route_set_flags(sd_netlink_message *= m, unsigned flags) { + return 0; + } +=20 +-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, unsigne= d *flags) { + struct rtmsg *rtm; +=20 + assert_return(m, -EINVAL); +@@ -135,7 +135,7 @@ int sd_rtnl_message_route_get_flags(sd_netlink_message *= m, unsigned *flags) { + return 0; + } +=20 +-int sd_rtnl_message_route_set_table(sd_netlink_message *m, unsigned char ta= ble) { ++_public_ int sd_rtnl_message_route_set_table(sd_netlink_message *m, unsigne= d char table) { + struct rtmsg *rtm; +=20 + assert_return(m, -EINVAL); +@@ -149,7 +149,7 @@ int sd_rtnl_message_route_set_table(sd_netlink_message *= m, unsigned char table) + return 0; + } +=20 +-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 *f= amily) { + struct rtmsg *rtm; +=20 + assert_return(m, -EINVAL); +@@ -164,7 +164,7 @@ int sd_rtnl_message_route_get_family(sd_netlink_message = *m, int *family) { + return 0; + } +=20 +-int sd_rtnl_message_route_get_type(sd_netlink_message *m, unsigned char *ty= pe) { ++_public_ int sd_rtnl_message_route_get_type(sd_netlink_message *m, unsigned= char *type) { + struct rtmsg *rtm; +=20 + assert_return(m, -EINVAL); +@@ -179,7 +179,7 @@ int sd_rtnl_message_route_get_type(sd_netlink_message *m= , unsigned char *type) { + return 0; + } +=20 +-int sd_rtnl_message_route_set_type(sd_netlink_message *m, unsigned char typ= e) { ++_public_ int sd_rtnl_message_route_set_type(sd_netlink_message *m, unsigned= char type) { + struct rtmsg *rtm; +=20 + assert_return(m, -EINVAL); +@@ -193,7 +193,7 @@ int sd_rtnl_message_route_set_type(sd_netlink_message *m= , unsigned char type) { + return 0; + } +=20 +-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, unsi= gned char *protocol) { + struct rtmsg *rtm; +=20 + assert_return(m, -EINVAL); +@@ -208,7 +208,7 @@ int sd_rtnl_message_route_get_protocol(sd_netlink_messag= e *m, unsigned char *pro + return 0; + } +=20 +-int sd_rtnl_message_route_get_scope(sd_netlink_message *m, unsigned char *s= cope) { ++_public_ int sd_rtnl_message_route_get_scope(sd_netlink_message *m, unsigne= d char *scope) { + struct rtmsg *rtm; +=20 + assert_return(m, -EINVAL); +@@ -223,7 +223,7 @@ int sd_rtnl_message_route_get_scope(sd_netlink_message *= m, unsigned char *scope) + return 0; + } +=20 +-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; +=20 + assert_return(m, -EINVAL); +@@ -238,7 +238,7 @@ int sd_rtnl_message_route_get_tos(sd_netlink_message *m,= uint8_t *tos) { + return 0; + } +=20 +-int sd_rtnl_message_route_get_table(sd_netlink_message *m, unsigned char *t= able) { ++_public_ int sd_rtnl_message_route_get_table(sd_netlink_message *m, unsigne= d char *table) { + struct rtmsg *rtm; +=20 + assert_return(m, -EINVAL); +@@ -253,7 +253,7 @@ int sd_rtnl_message_route_get_table(sd_netlink_message *= m, unsigned char *table) + return 0; + } +=20 +-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; +=20 + assert_return(m, -EINVAL); +@@ -268,7 +268,7 @@ int sd_rtnl_message_route_get_dst_prefixlen(sd_netlink_m= essage *m, unsigned char + return 0; + } +=20 +-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; +=20 + assert_return(m, -EINVAL); +@@ -283,7 +283,7 @@ int sd_rtnl_message_route_get_src_prefixlen(sd_netlink_m= essage *m, unsigned char + return 0; + } +=20 +-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_netli= nk_message **ret, + return 0; + } +=20 +-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_messa= ge **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_net= link_message **ret, + return 0; + } +=20 +-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; +=20 + assert_return(m, -EINVAL); +@@ -360,7 +360,7 @@ int sd_rtnl_message_nexthop_set_flags(sd_netlink_message= *m, uint8_t flags) { + return 0; + } +=20 +-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; +=20 + assert_return(m, -EINVAL); +@@ -374,7 +374,7 @@ int sd_rtnl_message_nexthop_get_flags(sd_netlink_message= *m, uint8_t *ret) { + return 0; + } +=20 +-int sd_rtnl_message_nexthop_get_family(sd_netlink_message *m, uint8_t *fami= ly) { ++_public_ int sd_rtnl_message_nexthop_get_family(sd_netlink_message *m, uint= 8_t *family) { + struct nhmsg *nhm; +=20 + assert_return(m, -EINVAL); +@@ -388,7 +388,7 @@ int sd_rtnl_message_nexthop_get_family(sd_netlink_messag= e *m, uint8_t *family) { + return 0; + } +=20 +-int sd_rtnl_message_nexthop_get_protocol(sd_netlink_message *m, uint8_t *pr= otocol) { ++_public_ int sd_rtnl_message_nexthop_get_protocol(sd_netlink_message *m, ui= nt8_t *protocol) { + struct nhmsg *nhm; +=20 + assert_return(m, -EINVAL); +@@ -402,7 +402,7 @@ int sd_rtnl_message_nexthop_get_protocol(sd_netlink_mess= age *m, uint8_t *protoco + return 0; + } +=20 +-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; +=20 + assert_return(m, -EINVAL); +@@ -415,7 +415,7 @@ int sd_rtnl_message_neigh_set_flags(sd_netlink_message *= m, uint8_t flags) { + return 0; + } +=20 +-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; +=20 + assert_return(m, -EINVAL); +@@ -428,7 +428,7 @@ int sd_rtnl_message_neigh_set_state(sd_netlink_message *= m, uint16_t state) { + return 0; + } +=20 +-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; +=20 + assert_return(m, -EINVAL); +@@ -441,7 +441,7 @@ int sd_rtnl_message_neigh_get_flags(sd_netlink_message *= m, uint8_t *flags) { + return 0; + } +=20 +-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; +=20 + assert_return(m, -EINVAL); +@@ -454,7 +454,7 @@ int sd_rtnl_message_neigh_get_state(sd_netlink_message *= m, uint16_t *state) { + return 0; + } +=20 +-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 *f= amily) { + struct ndmsg *ndm; +=20 + assert_return(m, -EINVAL); +@@ -469,7 +469,7 @@ int sd_rtnl_message_neigh_get_family(sd_netlink_message = *m, int *family) { + return 0; + } +=20 +-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; +=20 + assert_return(m, -EINVAL); +@@ -484,7 +484,7 @@ int sd_rtnl_message_neigh_get_ifindex(sd_netlink_message= *m, int *index) { + return 0; + } +=20 +-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; + } +=20 +-int sd_rtnl_message_link_set_flags(sd_netlink_message *m, unsigned flags, u= nsigned change) { ++_public_ int sd_rtnl_message_link_set_flags(sd_netlink_message *m, unsigned= flags, unsigned change) { + struct ifinfomsg *ifi; +=20 + assert_return(m, -EINVAL); +@@ -533,7 +533,7 @@ int sd_rtnl_message_link_set_flags(sd_netlink_message *m= , unsigned flags, unsign + return 0; + } +=20 +-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; +=20 + assert_return(m, -EINVAL); +@@ -547,7 +547,7 @@ int sd_rtnl_message_link_set_type(sd_netlink_message *m,= unsigned type) { + return 0; + } +=20 +-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, unsigne= d family) { + struct ifinfomsg *ifi; +=20 + assert_return(m, -EINVAL); +@@ -561,7 +561,7 @@ int sd_rtnl_message_link_set_family(sd_netlink_message *= m, unsigned family) { + return 0; + } +=20 +-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_netlin= k_message **ret, + return 0; + } +=20 +-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, unsi= gned char prefixlen) { + struct ifaddrmsg *ifa; +=20 + assert_return(m, -EINVAL); +@@ -604,7 +604,7 @@ int sd_rtnl_message_addr_set_prefixlen(sd_netlink_messag= e *m, unsigned char pref + return 0; + } +=20 +-int sd_rtnl_message_addr_set_flags(sd_netlink_message *m, unsigned char fla= gs) { ++_public_ int sd_rtnl_message_addr_set_flags(sd_netlink_message *m, unsigned= char flags) { + struct ifaddrmsg *ifa; +=20 + assert_return(m, -EINVAL); +@@ -618,7 +618,7 @@ int sd_rtnl_message_addr_set_flags(sd_netlink_message *m= , unsigned char flags) { + return 0; + } +=20 +-int sd_rtnl_message_addr_set_scope(sd_netlink_message *m, unsigned char sco= pe) { ++_public_ int sd_rtnl_message_addr_set_scope(sd_netlink_message *m, unsigned= char scope) { + struct ifaddrmsg *ifa; +=20 + assert_return(m, -EINVAL); +@@ -632,7 +632,7 @@ int sd_rtnl_message_addr_set_scope(sd_netlink_message *m= , unsigned char scope) { + return 0; + } +=20 +-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 *re= t_family) { + struct ifaddrmsg *ifa; +=20 + assert_return(m, -EINVAL); +@@ -647,7 +647,7 @@ int sd_rtnl_message_addr_get_family(sd_netlink_message *= m, int *ret_family) { + return 0; + } +=20 +-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, unsi= gned char *ret_prefixlen) { + struct ifaddrmsg *ifa; +=20 + assert_return(m, -EINVAL); +@@ -662,7 +662,7 @@ int sd_rtnl_message_addr_get_prefixlen(sd_netlink_messag= e *m, unsigned char *ret + return 0; + } +=20 +-int sd_rtnl_message_addr_get_scope(sd_netlink_message *m, unsigned char *re= t_scope) { ++_public_ int sd_rtnl_message_addr_get_scope(sd_netlink_message *m, unsigned= char *ret_scope) { + struct ifaddrmsg *ifa; +=20 + 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; + } +=20 +-int sd_rtnl_message_addr_get_flags(sd_netlink_message *m, unsigned char *re= t_flags) { ++_public_ int sd_rtnl_message_addr_get_flags(sd_netlink_message *m, unsigned= char *ret_flags) { + struct ifaddrmsg *ifa; +=20 + 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; + } +=20 +-int sd_rtnl_message_addr_get_ifindex(sd_netlink_message *m, int *ret_ifinde= x) { ++_public_ int sd_rtnl_message_addr_get_ifindex(sd_netlink_message *m, int *r= et_ifindex) { + struct ifaddrmsg *ifa; +=20 + assert_return(m, -EINVAL); +@@ -707,7 +707,7 @@ int sd_rtnl_message_addr_get_ifindex(sd_netlink_message = *m, int *ret_ifindex) { + return 0; + } +=20 +-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; + } +=20 +-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; + } +=20 +-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 *i= findex) { + struct ifinfomsg *ifi; +=20 + assert_return(m, -EINVAL); +@@ -767,7 +767,7 @@ int sd_rtnl_message_link_get_ifindex(sd_netlink_message = *m, int *ifindex) { + return 0; + } +=20 +-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; +=20 + assert_return(m, -EINVAL); +@@ -782,7 +782,7 @@ int sd_rtnl_message_link_get_flags(sd_netlink_message *m= , unsigned *flags) { + return 0; + } +=20 +-int sd_rtnl_message_link_get_type(sd_netlink_message *m, unsigned short *ty= pe) { ++_public_ int sd_rtnl_message_link_get_type(sd_netlink_message *m, unsigned = short *type) { + struct ifinfomsg *ifi; +=20 + assert_return(m, -EINVAL); +@@ -797,7 +797,7 @@ int sd_rtnl_message_link_get_type(sd_netlink_message *m,= unsigned short *type) { + return 0; + } +=20 +-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); +=20 +@@ -856,7 +856,7 @@ int sd_rtnl_message_get_family(sd_netlink_message *m, in= t *family) { + return -EOPNOTSUPP; + } +=20 +-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; + } +=20 +-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; +=20 + assert_return(m, -EINVAL); +@@ -901,7 +901,7 @@ int sd_rtnl_message_addrlabel_set_prefixlen(sd_netlink_m= essage *m, unsigned char + return 0; + } +=20 +-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; +=20 + assert_return(m, -EINVAL); +@@ -915,7 +915,7 @@ int sd_rtnl_message_addrlabel_get_prefixlen(sd_netlink_m= essage *m, unsigned char + return 0; + } +=20 +-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; + } +=20 +-int sd_rtnl_message_routing_policy_rule_set_tos(sd_netlink_message *m, uint= 8_t tos) { ++_public_ int sd_rtnl_message_routing_policy_rule_set_tos(sd_netlink_message= *m, uint8_t tos) { + struct fib_rule_hdr *frh; +=20 + assert_return(m, -EINVAL); +@@ -954,7 +954,7 @@ int sd_rtnl_message_routing_policy_rule_set_tos(sd_netli= nk_message *m, uint8_t t + return 0; + } +=20 +-int sd_rtnl_message_routing_policy_rule_get_tos(sd_netlink_message *m, uint= 8_t *tos) { ++_public_ int sd_rtnl_message_routing_policy_rule_get_tos(sd_netlink_message= *m, uint8_t *tos) { + struct fib_rule_hdr *frh; +=20 + assert_return(m, -EINVAL); +@@ -968,7 +968,7 @@ int sd_rtnl_message_routing_policy_rule_get_tos(sd_netli= nk_message *m, uint8_t * + return 0; + } +=20 +-int sd_rtnl_message_routing_policy_rule_set_table(sd_netlink_message *m, ui= nt8_t table) { ++_public_ int sd_rtnl_message_routing_policy_rule_set_table(sd_netlink_messa= ge *m, uint8_t table) { + struct fib_rule_hdr *frh; +=20 + assert_return(m, -EINVAL); +@@ -982,7 +982,7 @@ int sd_rtnl_message_routing_policy_rule_set_table(sd_net= link_message *m, uint8_t + return 0; + } +=20 +-int sd_rtnl_message_routing_policy_rule_get_table(sd_netlink_message *m, ui= nt8_t *table) { ++_public_ int sd_rtnl_message_routing_policy_rule_get_table(sd_netlink_messa= ge *m, uint8_t *table) { + struct fib_rule_hdr *frh; +=20 + assert_return(m, -EINVAL); +@@ -996,7 +996,7 @@ int sd_rtnl_message_routing_policy_rule_get_table(sd_net= link_message *m, uint8_t + return 0; + } +=20 +-int sd_rtnl_message_routing_policy_rule_set_flags(sd_netlink_message *m, ui= nt32_t flags) { ++_public_ int sd_rtnl_message_routing_policy_rule_set_flags(sd_netlink_messa= ge *m, uint32_t flags) { + struct fib_rule_hdr *frh; +=20 + assert_return(m, -EINVAL); +@@ -1009,7 +1009,7 @@ int sd_rtnl_message_routing_policy_rule_set_flags(sd_n= etlink_message *m, uint32_ + return 0; + } +=20 +-int sd_rtnl_message_routing_policy_rule_get_flags(sd_netlink_message *m, ui= nt32_t *flags) { ++_public_ int sd_rtnl_message_routing_policy_rule_get_flags(sd_netlink_messa= ge *m, uint32_t *flags) { + struct fib_rule_hdr *frh; +=20 + assert_return(m, -EINVAL); +@@ -1022,7 +1022,7 @@ int sd_rtnl_message_routing_policy_rule_get_flags(sd_n= etlink_message *m, uint32_ + return 0; + } +=20 +-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_me= ssage *m, uint8_t type) { + struct fib_rule_hdr *frh; +=20 + assert_return(m, -EINVAL); +@@ -1036,7 +1036,7 @@ int sd_rtnl_message_routing_policy_rule_set_fib_type(s= d_netlink_message *m, uint + return 0; + } +=20 +-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_me= ssage *m, uint8_t *type) { + struct fib_rule_hdr *frh; +=20 + assert_return(m, -EINVAL); +@@ -1050,7 +1050,7 @@ int sd_rtnl_message_routing_policy_rule_get_fib_type(s= d_netlink_message *m, uint + return 0; + } +=20 +-int sd_rtnl_message_routing_policy_rule_set_fib_dst_prefixlen(sd_netlink_me= ssage *m, uint8_t len) { ++_public_ int sd_rtnl_message_routing_policy_rule_set_fib_dst_prefixlen(sd_n= etlink_message *m, uint8_t len) { + struct fib_rule_hdr *frh; +=20 + assert_return(m, -EINVAL); +@@ -1064,7 +1064,7 @@ int sd_rtnl_message_routing_policy_rule_set_fib_dst_pr= efixlen(sd_netlink_message + return 0; + } +=20 +-int sd_rtnl_message_routing_policy_rule_get_fib_dst_prefixlen(sd_netlink_me= ssage *m, uint8_t *len) { ++_public_ int sd_rtnl_message_routing_policy_rule_get_fib_dst_prefixlen(sd_n= etlink_message *m, uint8_t *len) { + struct fib_rule_hdr *frh; +=20 + assert_return(m, -EINVAL); +@@ -1078,7 +1078,7 @@ int sd_rtnl_message_routing_policy_rule_get_fib_dst_pr= efixlen(sd_netlink_message + return 0; + } +=20 +-int sd_rtnl_message_routing_policy_rule_set_fib_src_prefixlen(sd_netlink_me= ssage *m, uint8_t len) { ++_public_ int sd_rtnl_message_routing_policy_rule_set_fib_src_prefixlen(sd_n= etlink_message *m, uint8_t len) { + struct fib_rule_hdr *frh; +=20 + assert_return(m, -EINVAL); +@@ -1092,7 +1092,7 @@ int sd_rtnl_message_routing_policy_rule_set_fib_src_pr= efixlen(sd_netlink_message + return 0; + } +=20 +-int sd_rtnl_message_routing_policy_rule_get_fib_src_prefixlen(sd_netlink_me= ssage *m, uint8_t *len) { ++_public_ int sd_rtnl_message_routing_policy_rule_get_fib_src_prefixlen(sd_n= etlink_message *m, uint8_t *len) { + struct fib_rule_hdr *frh; +=20 + assert_return(m, -EINVAL); +@@ -1106,7 +1106,7 @@ int sd_rtnl_message_routing_policy_rule_get_fib_src_pr= efixlen(sd_netlink_message + return 0; + } +=20 +-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; + } +=20 +-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; +=20 + assert_return(m, -EINVAL); +@@ -1149,7 +1149,7 @@ int sd_rtnl_message_traffic_control_get_ifindex(sd_net= link_message *m, int *ret) + return 0; + } +=20 +-int sd_rtnl_message_traffic_control_get_handle(sd_netlink_message *m, uint3= 2_t *ret) { ++_public_ int sd_rtnl_message_traffic_control_get_handle(sd_netlink_message = *m, uint32_t *ret) { + struct tcmsg *tcm; +=20 + assert_return(m, -EINVAL); +@@ -1163,7 +1163,7 @@ int sd_rtnl_message_traffic_control_get_handle(sd_netl= ink_message *m, uint32_t * + return 0; + } +=20 +-int sd_rtnl_message_traffic_control_get_parent(sd_netlink_message *m, uint3= 2_t *ret) { ++_public_ int sd_rtnl_message_traffic_control_get_parent(sd_netlink_message = *m, uint32_t *ret) { + struct tcmsg *tcm; +=20 + assert_return(m, -EINVAL); +@@ -1177,7 +1177,7 @@ int sd_rtnl_message_traffic_control_get_parent(sd_netl= ink_message *m, uint32_t * + return 0; + } +=20 +-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 erro= r, uint32_t serial, sd_n + return 0; + } +=20 +-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 !=3D NETLINK_ROUTE || +@@ -129,7 +129,7 @@ int sd_netlink_message_set_request_dump(sd_netlink_messa= ge *m, int dump) { +=20 + DEFINE_TRIVIAL_REF_FUNC(sd_netlink_message, sd_netlink_message); +=20 +-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 =3D=3D 0) { + unsigned i; +=20 +@@ -146,7 +146,7 @@ sd_netlink_message* sd_netlink_message_unref(sd_netlink_= message *m) { + return NULL; + } +=20 +-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 *r= et) { + assert_return(m, -EINVAL); + assert_return(ret, -EINVAL); +=20 +@@ -155,7 +155,7 @@ int sd_netlink_message_get_type(sd_netlink_message *m, u= int16_t *ret) { + return 0; + } +=20 +-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 f= lags) { + assert_return(m, -EINVAL); + assert_return(flags !=3D 0, -EINVAL); +=20 +@@ -164,7 +164,7 @@ int sd_netlink_message_set_flags(sd_netlink_message *m, = uint16_t flags) { + return 0; + } +=20 +-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); +=20 + return m->multicast_group !=3D 0; +@@ -230,7 +230,7 @@ static int message_attribute_has_type(sd_netlink_message= *m, size_t *ret_size, u + return 0; + } +=20 +-int sd_netlink_message_append_string(sd_netlink_message *m, uint16_t attr_t= ype, 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; +=20 +@@ -256,7 +256,7 @@ int sd_netlink_message_append_string(sd_netlink_message = *m, uint16_t attr_type, + return 0; + } +=20 +-int sd_netlink_message_append_strv(sd_netlink_message *m, uint16_t attr_typ= e, 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; +=20 +@@ -284,7 +284,7 @@ int sd_netlink_message_append_strv(sd_netlink_message *m= , uint16_t attr_type, co + return 0; + } +=20 +-int sd_netlink_message_append_flag(sd_netlink_message *m, uint16_t attr_typ= e) { ++_public_ int sd_netlink_message_append_flag(sd_netlink_message *m, uint16_t= attr_type) { + size_t size; + int r; +=20 +@@ -302,7 +302,7 @@ int sd_netlink_message_append_flag(sd_netlink_message *m= , uint16_t attr_type) { + return 0; + } +=20 +-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 a= ttr_type, uint8_t data) { + int r; +=20 + 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; + } +=20 +-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; +=20 + 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; + } +=20 +-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; +=20 + 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; + } +=20 +-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; +=20 + 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; + } +=20 +-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 a= ttr_type, int8_t data) { + int r; +=20 + 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; + } +=20 +-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; +=20 + 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; + } +=20 +-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; +=20 + 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; + } +=20 +-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; +=20 + 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; + } +=20 +-int sd_netlink_message_append_data(sd_netlink_message *m, uint16_t attr_typ= e, 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; +=20 + 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; + } +=20 +-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_me= ssage *m, uint16_t attr_ty + return 0; + } +=20 +-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, uint1= 6_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); + } +=20 +-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, uint= 16_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); + } +=20 +@@ -520,15 +520,15 @@ int netlink_message_append_sockaddr_union(sd_netlink_m= essage *m, uint16_t attr_t + return 0; + } +=20 +-int sd_netlink_message_append_sockaddr_in(sd_netlink_message *m, uint16_t a= ttr_type, const struct sockaddr_in *data) { ++_public_ int sd_netlink_message_append_sockaddr_in(sd_netlink_message *m, u= int16_t attr_type, const struct sockaddr_in *data) { + return netlink_message_append_sockaddr_union(m, attr_type, (const u= nion sockaddr_union *) data); + } +=20 +-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 u= nion sockaddr_union *) data); + } +=20 +-int sd_netlink_message_append_ether_addr(sd_netlink_message *m, uint16_t at= tr_type, const struct ether_addr *data) { ++_public_ int sd_netlink_message_append_ether_addr(sd_netlink_message *m, ui= nt16_t attr_type, const struct ether_addr *data) { + int r; +=20 + 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; + } +=20 +-int sd_netlink_message_append_cache_info(sd_netlink_message *m, uint16_t at= tr_type, const struct ifa_cacheinfo *info) { ++_public_ int sd_netlink_message_append_cache_info(sd_netlink_message *m, ui= nt16_t attr_type, const struct ifa_cacheinfo *info) { + int r; +=20 + assert_return(m, -EINVAL); +@@ -583,7 +583,7 @@ int sd_netlink_message_append_cache_info(sd_netlink_mess= age *m, uint16_t attr_ty + return 0; + } +=20 +-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, uint1= 6_t attr_type) { + size_t size; + int r; +=20 +@@ -632,7 +632,7 @@ int sd_netlink_message_open_container(sd_netlink_message= *m, uint16_t attr_type) + return 0; + } +=20 +-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; +=20 +@@ -671,7 +671,7 @@ int sd_netlink_message_open_container_union(sd_netlink_m= essage *m, uint16_t attr + return 0; + } +=20 +-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_messag= e *m) { + return 0; + } +=20 +-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; +=20 + assert_return(m, -EINVAL); +@@ -701,7 +701,7 @@ int sd_netlink_message_open_array(sd_netlink_message *m,= uint16_t attr_type) { + return 0; + } +=20 +-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; +=20 + assert_return(m, -EINVAL); +@@ -757,7 +757,7 @@ static int netlink_message_read_internal( + return RTA_PAYLOAD(rta); + } +=20 +-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_t= ype, size_t size, void *data) { + void *attr_data; + int r; +=20 +@@ -776,7 +776,7 @@ int sd_netlink_message_read(sd_netlink_message *m, uint1= 6_t attr_type, size_t si + return r; + } +=20 +-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 a= ttr_type, size_t *ret_size, void **ret_data) { + void *attr_data; + int r; +=20 +@@ -802,7 +802,7 @@ int sd_netlink_message_read_data(sd_netlink_message *m, = uint16_t attr_type, size + return r; + } +=20 +-int sd_netlink_message_read_data_suffix0(sd_netlink_message *m, uint16_t at= tr_type, size_t *ret_size, void **ret_data) { ++_public_ int sd_netlink_message_read_data_suffix0(sd_netlink_message *m, ui= nt16_t attr_type, size_t *ret_size, void **ret_data) { + void *attr_data; + int r; +=20 +@@ -828,7 +828,7 @@ int sd_netlink_message_read_data_suffix0(sd_netlink_mess= age *m, uint16_t attr_ty + return r; + } +=20 +-int sd_netlink_message_read_string_strdup(sd_netlink_message *m, uint16_t a= ttr_type, char **data) { ++_public_ int sd_netlink_message_read_string_strdup(sd_netlink_message *m, u= int16_t attr_type, char **data) { + void *attr_data; + int r; +=20 +@@ -855,7 +855,7 @@ int sd_netlink_message_read_string_strdup(sd_netlink_mes= sage *m, uint16_t attr_t + return 0; + } +=20 +-int sd_netlink_message_read_string(sd_netlink_message *m, uint16_t attr_typ= e, 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; +=20 +@@ -878,7 +878,7 @@ int sd_netlink_message_read_string(sd_netlink_message *m= , uint16_t attr_type, co + return 0; + } +=20 +-int sd_netlink_message_read_u8(sd_netlink_message *m, uint16_t attr_type, u= int8_t *data) { ++_public_ int sd_netlink_message_read_u8(sd_netlink_message *m, uint16_t att= r_type, uint8_t *data) { + void *attr_data; + int r; +=20 +@@ -901,7 +901,7 @@ int sd_netlink_message_read_u8(sd_netlink_message *m, ui= nt16_t attr_type, uint8_ + return 0; + } +=20 +-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 at= tr_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, u= int16_t attr_type, uint1 + return 0; + } +=20 +-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 at= tr_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, u= int16_t attr_type, uint3 + return 0; + } +=20 +-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, uint= 16_t attr_type, struct ether_addr *data) { + void *attr_data; + int r; +=20 +@@ -1005,7 +1005,7 @@ int netlink_message_read_hw_addr(sd_netlink_message *m= , uint16_t attr_type, stru + return 0; + } +=20 +-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, uint= 16_t attr_type, struct ifa_cacheinfo *info) { + void *attr_data; + int r; +=20 +@@ -1052,7 +1052,7 @@ int netlink_message_read_in_addr_union(sd_netlink_mess= age *m, uint16_t attr_type + return 0; + } +=20 +-int sd_netlink_message_read_in_addr(sd_netlink_message *m, uint16_t attr_ty= pe, 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; +=20 +@@ -1063,7 +1063,7 @@ int sd_netlink_message_read_in_addr(sd_netlink_message= *m, uint16_t attr_type, s + return r; + } +=20 +-int sd_netlink_message_read_in6_addr(sd_netlink_message *m, uint16_t attr_t= ype, 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; +=20 +@@ -1074,7 +1074,7 @@ int sd_netlink_message_read_in6_addr(sd_netlink_messag= e *m, uint16_t attr_type, + return r; + } +=20 +-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 at= tr_type) { + void *attr_data; + int r; +=20 +@@ -1095,7 +1095,7 @@ int sd_netlink_message_has_flag(sd_netlink_message *m,= uint16_t attr_type) { + return 1; + } +=20 +-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 c= ontainer_type, uint16_t attr_type, char ***ret) { + _cleanup_strv_free_ char **s =3D NULL; + const NLAPolicySet *policy_set; + const NLAPolicy *policy; +@@ -1192,7 +1192,7 @@ static int netlink_container_parse( + return 0; + } +=20 +-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, uint= 16_t attr_type) { + const NLAPolicy *policy; + const NLAPolicySet *policy_set; + void *container; +@@ -1279,7 +1279,7 @@ int sd_netlink_message_enter_container(sd_netlink_mess= age *m, uint16_t attr_type + return 0; + } +=20 +-int sd_netlink_message_enter_array(sd_netlink_message *m, uint16_t attr_typ= e) { ++_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; + } +=20 +-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_messa= ge *m) { + return 0; + } +=20 +-int sd_netlink_message_get_max_attribute(sd_netlink_message *m, uint16_t *r= et) { ++_public_ int sd_netlink_message_get_max_attribute(sd_netlink_message *m, ui= nt16_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; + } +=20 +-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); +=20 + return m->hdr->nlmsg_type =3D=3D NLMSG_ERROR; + } +=20 +-int sd_netlink_message_get_errno(sd_netlink_message *m) { ++_public_ int sd_netlink_message_get_errno(sd_netlink_message *m) { + struct nlmsgerr *err; +=20 + assert_return(m, -EINVAL); +@@ -1373,7 +1373,7 @@ static int netlink_message_parse_error(sd_netlink_mess= age *m) { + NLMSG_PAYLOAD(m->hdr, hlen)); + } +=20 +-int sd_netlink_message_rewind(sd_netlink_message *m, sd_netlink *nl) { ++_public_ int sd_netlink_message_rewind(sd_netlink_message *m, sd_netlink *n= l) { + size_t size; + int r; +=20 +diff --git a/src/libsystemd/sd-netlink/sd-netlink.c b/src/libsystemd/sd-netl= ink/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; + } +=20 +-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 =3D NULL; + int r, protocol; +=20 +@@ -103,11 +103,11 @@ int sd_netlink_open_fd(sd_netlink **ret, int fd) { + return 0; + } +=20 +-int sd_netlink_open(sd_netlink **ret) { ++_public_ int sd_netlink_open(sd_netlink **ret) { + return netlink_open_family(ret, NETLINK_ROUTE); + } +=20 +-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); +=20 +@@ -145,7 +145,7 @@ static sd_netlink *netlink_free(sd_netlink *nl) { +=20 + DEFINE_TRIVIAL_REF_UNREF_FUNC(sd_netlink, sd_netlink, netlink_free); +=20 +-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); + } +=20 +-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; + } +=20 +-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( + } + } +=20 +-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); + } +=20 +-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); +=20 + return ordered_set_size(nl->rqueue) =3D=3D 0 ? POLLIN : 0; + } +=20 +-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; +=20 + assert_return(nl, -EINVAL); +@@ -689,7 +689,7 @@ static int prepare_callback(sd_event_source *s, void *us= erdata) { + return 1; + } +=20 +-int sd_netlink_attach_event(sd_netlink *nl, sd_event *event, int64_t priori= ty) { ++_public_ int sd_netlink_attach_event(sd_netlink *nl, sd_event *event, int64= _t priority) { + int r; +=20 + assert_return(nl, -EINVAL); +@@ -741,7 +741,7 @@ fail: + return r; + } +=20 +-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); +=20 +@@ -804,7 +804,7 @@ int netlink_add_match_internal( + return 0; + } +=20 +-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, descr= iption); + } +=20 +-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 str= uct sock_filter *filter) { + assert_return(nl, -EINVAL); + assert_return(len =3D=3D 0 || filter, -EINVAL); +=20 +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 =3D [ + 'sd-journal.h', + 'sd-login.h', + 'sd-messages.h', ++ 'sd-netlink.h', + 'sd-path.h', + ] +=20 +@@ -35,7 +36,6 @@ _not_installed_headers =3D [ + 'sd-lldp-tx.h', + 'sd-lldp.h', + 'sd-ndisc.h', +- 'sd-netlink.h', + 'sd-network.h', + 'sd-radv.h', + 'sd-resolve.h', +--=20 +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 @@ =20 name =3D systemd version =3D 254 -release =3D 1 +release =3D 2 =20 maintainer =3D Stefan Schantl groups =3D System/Base @@ -131,6 +131,7 @@ build =20 # Run the testsuite. ninja test -v %{PARALLELISMFLAGS} -C build || true + end =20 install --=20 2.39.2 --===============5908466648033344283==--