chiark / gitweb /
Extract looping over /proc/cmdline into a shared function
[elogind.git] / src / shared / net-util.h
index c7edfb96f03ab54074d25a118c85e62975a4d6b4..0ec04db87e657cff3568b798ebc1c3d9edb162c2 100644 (file)
@@ -22,6 +22,7 @@
 #pragma once
 
 #include <netinet/ether.h>
+#include <netinet/in.h>
 #include <stdbool.h>
 
 bool net_match_config(const struct ether_addr *match_mac,
@@ -35,6 +36,8 @@ bool net_match_config(const struct ether_addr *match_mac,
                       const char *dev_type,
                       const char *dev_name);
 
+unsigned net_netmask_to_prefixlen(const struct in_addr *netmask);
+
 int config_parse_hwaddr(const char *unit, const char *filename, unsigned line,
                         const char *section, unsigned section_line, const char *lvalue,
                         int ltype, const char *rvalue, void *data, void *userdata);