]> git.ipfire.org Git - thirdparty/systemd.git/blobdiff - src/libsystemd-network/test-ipv4ll-manual.c
util-lib: split our string related calls from util.[ch] into its own file string...
[thirdparty/systemd.git] / src / libsystemd-network / test-ipv4ll-manual.c
index ad664cba5143684b4226ea4389c04a34a0274f8d..08421c3575162acc356cb567d23fc93e1e33fcc6 100644 (file)
   along with systemd; If not, see <http://www.gnu.org/licenses/>.
 ***/
 
-#include <stdlib.h>
 #include <errno.h>
+#include <net/if.h>
+#include <stdlib.h>
 #include <unistd.h>
-
 #include <linux/veth.h>
-#include <net/if.h>
 
 #include "sd-event.h"
-#include "sd-netlink.h"
 #include "sd-ipv4ll.h"
+#include "sd-netlink.h"
 
-#include "util.h"
 #include "event-util.h"
-#include "netlink-util.h"
 #include "in-addr-util.h"
+#include "netlink-util.h"
+#include "string-util.h"
+#include "util.h"
 
 static void ll_handler(sd_ipv4ll *ll, int event, void *userdata) {
         _cleanup_free_ char *address = NULL;
@@ -45,13 +45,13 @@ static void ll_handler(sd_ipv4ll *ll, int event, void *userdata) {
                 assert_se(in_addr_to_string(AF_INET, (const union in_addr_union*) &addr, &address) >= 0);
 
         switch (event) {
-        case IPV4LL_EVENT_BIND:
+        case SD_IPV4LL_EVENT_BIND:
                 log_info("bound %s", strna(address));
                 break;
-        case IPV4LL_EVENT_CONFLICT:
+        case SD_IPV4LL_EVENT_CONFLICT:
                 log_info("conflict on %s", strna(address));
                 break;
-        case IPV4LL_EVENT_STOP:
+        case SD_IPV4LL_EVENT_STOP:
                 log_error("the client was stopped with address %s", strna(address));
                 break;
         default: