chiark / gitweb /
networkd: monopolize in_addr utility functions in shared/in-addr-util.h
[elogind.git] / src / network / networkd-manager.c
index 46b803fee5d82a907e8bf2c9c85e9cfde44ee694..223cb2a75aa5e7de77f8afaecc3c3dc51b0b3d1d 100644 (file)
@@ -25,6 +25,7 @@
 #include "conf-parser.h"
 #include "path-util.h"
 #include "networkd.h"
+#include "networkd-netdev.h"
 #include "network-internal.h"
 #include "libudev-private.h"
 #include "udev-util.h"
@@ -113,10 +114,6 @@ int manager_new(Manager **ret) {
                         return -ENOMEM;
         }
 
-        m->links = hashmap_new(uint64_hash_func, uint64_compare_func);
-        if (!m->links)
-                return -ENOMEM;
-
         m->netdevs = hashmap_new(string_hash_func, string_compare_func);
         if (!m->netdevs)
                 return -ENOMEM;
@@ -226,7 +223,7 @@ static int manager_rtnl_process_link(sd_rtnl *rtnl, sd_rtnl_message *message, vo
         Link *link = NULL;
         NetDev *netdev = NULL;
         uint16_t type;
-        char *name;
+        const char *name;
         int r, ifindex;
 
         assert(rtnl);
@@ -466,7 +463,7 @@ finish:
         return r;
 }
 
-int manager_address_pool_acquire(Manager *m, unsigned family, unsigned prefixlen, union in_addr_union *found) {
+int manager_address_pool_acquire(Manager *m, int family, unsigned prefixlen, union in_addr_union *found) {
         AddressPool *p;
         int r;