chiark / gitweb /
networkd: address - add support for broadcast
[elogind.git] / src / network / networkd.h
index 2323e3db856810735d7bcbadde0323bbb35c2f0f..01a8a7f681a448a261def0db5483b92f1c4f8b49 100644 (file)
@@ -53,6 +53,7 @@ struct netdev_enslave_callback {
 typedef enum NetdevKind {
         NETDEV_KIND_BRIDGE,
         NETDEV_KIND_BOND,
+        NETDEV_KIND_VLAN,
         _NETDEV_KIND_MAX,
         _NETDEV_KIND_INVALID = -1
 } NetdevKind;
@@ -74,6 +75,8 @@ struct Netdev {
         char *name;
         NetdevKind kind;
 
+        int vlanid;
+
         Link *link;
         NetdevState state;
 
@@ -94,11 +97,13 @@ struct Network {
         char *description;
         Netdev *bridge;
         Netdev *bond;
+        Netdev *vlan;
         bool dhcp;
         bool dhcp_dns;
         bool dhcp_mtu;
         bool dhcp_hostname;
         bool dhcp_domainname;
+        bool dhcp_critical;
 
         LIST_HEAD(Address, static_addresses);
         LIST_HEAD(Route, static_routes);
@@ -118,7 +123,7 @@ struct Address {
         unsigned char prefixlen;
         char *label;
 
-        struct in_addr netmask;
+        struct in_addr broadcast;
 
         union {
                 struct in_addr in;
@@ -133,7 +138,6 @@ struct Route {
         uint64_t section;
 
         unsigned char family;
-        unsigned char dst_family;
         unsigned char dst_prefixlen;
 
         union {
@@ -258,6 +262,10 @@ int config_parse_bond(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_vlan(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);
+
 /* gperf */
 
 const struct ConfigPerfItem* network_gperf_lookup(const char *key, unsigned length);
@@ -297,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);