chiark / gitweb /
networkd: netdev - reduce chance of race when receiving netdev's ifindex
[elogind.git] / src / network / networkd.h
index 968edf6a70d5b925808e5dfd89329e430105e904..831a9cbdd951ff6a6b45e6b21a12ccb143741139 100644 (file)
@@ -77,7 +77,7 @@ struct Netdev {
 
         int vlanid;
 
-        Link *link;
+        int ifindex;
         NetdevState state;
 
         LIST_HEAD(netdev_enslave_callback, callbacks);
@@ -123,7 +123,7 @@ struct Address {
         unsigned char prefixlen;
         char *label;
 
-        struct in_addr netmask;
+        struct in_addr broadcast;
 
         union {
                 struct in_addr in;
@@ -138,7 +138,6 @@ struct Route {
         uint64_t section;
 
         unsigned char family;
-        unsigned char dst_family;
         unsigned char dst_prefixlen;
 
         union {
@@ -235,7 +234,7 @@ DEFINE_TRIVIAL_CLEANUP_FUNC(Netdev*, netdev_free);
 #define _cleanup_netdev_free_ _cleanup_(netdev_freep)
 
 int netdev_get(Manager *manager, const char *name, Netdev **ret);
-int netdev_set_link(Manager *m, NetdevKind kind, Link *link);
+int netdev_set_ifindex(Netdev *netdev, int ifindex);
 int netdev_enslave(Netdev *netdev, Link *link, sd_rtnl_message_handler_t cb);
 
 const char *netdev_kind_to_string(NetdevKind d) _const_;
@@ -306,6 +305,10 @@ int config_parse_address(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);
 
+int config_parse_broadcast(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);
+
 int config_parse_label(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);