]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
sd-dhcp6-client: expose client_parse_message()
authorYu Watanabe <watanabe.yu+github@gmail.com>
Thu, 13 Jan 2022 11:19:01 +0000 (20:19 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Thu, 13 Jan 2022 11:20:19 +0000 (20:20 +0900)
To introduce tests for the function in later commits.

src/libsystemd-network/dhcp6-internal.h
src/libsystemd-network/sd-dhcp6-client.c

index 31482d7717594c7923f96577f054ffd2bd927727..f9434098566aae57bdcf8518a2c2c0953a25f129 100644 (file)
@@ -11,6 +11,7 @@
 #include "sd-event.h"
 #include "sd-dhcp6-client.h"
 
+#include "dhcp6-protocol.h"
 #include "hashmap.h"
 #include "list.h"
 #include "macro.h"
@@ -130,6 +131,12 @@ int dhcp6_network_bind_udp_socket(int ifindex, struct in6_addr *address);
 int dhcp6_network_send_udp_socket(int s, struct in6_addr *address,
                                   const void *packet, size_t len);
 
+int client_parse_message(
+                sd_dhcp6_client *client,
+                DHCP6Message *message,
+                size_t len,
+                sd_dhcp6_lease *lease);
+
 const char *dhcp6_message_type_to_string(int s) _const_;
 int dhcp6_message_type_from_string(const char *s) _pure_;
 const char *dhcp6_message_status_to_string(int s) _const_;
index 8150227d7e18a88aceb0418d4e158e84728be75d..706904c7202cefe4dcd9a6d05eda695fa90d2102 100644 (file)
@@ -1124,7 +1124,7 @@ static int client_ensure_iaid(sd_dhcp6_client *client) {
         return 0;
 }
 
-static int client_parse_message(
+int client_parse_message(
                 sd_dhcp6_client *client,
                 DHCP6Message *message,
                 size_t len,