]> git.ipfire.org Git - thirdparty/systemd.git/blobdiff - src/network/networkd-link.h
Merge pull request #30284 from YHNdnzj/fstab-wantedby-defaultdeps
[thirdparty/systemd.git] / src / network / networkd-link.h
index dfe43bb3a017ea7d3a38120866bcafbc3a5f5243..cad9fa8410685fa20b968c66ef34d7623945012a 100644 (file)
@@ -21,6 +21,7 @@
 #include "log-link.h"
 #include "netif-util.h"
 #include "network-util.h"
+#include "networkd-bridge-vlan.h"
 #include "networkd-ipv6ll.h"
 #include "networkd-util.h"
 #include "ordered-set.h"
@@ -52,6 +53,9 @@ typedef struct Link {
         int ifindex;
         int master_ifindex;
         int dsa_master_ifindex;
+        int sr_iov_phys_port_ifindex;
+        Set *sr_iov_virt_port_ifindices;
+
         char *ifname;
         char **alternative_names;
         char *kind;
@@ -69,6 +73,15 @@ typedef struct Link {
         sd_device *dev;
         char *driver;
 
+        /* bridge vlan */
+        uint16_t bridge_vlan_pvid;
+        bool bridge_vlan_pvid_is_untagged;
+        uint32_t bridge_vlan_bitmap[BRIDGE_VLAN_BITMAP_LEN];
+
+        /* to prevent multiple ethtool calls */
+        bool ethtool_driver_read;
+        bool ethtool_permanent_hw_addr_read;
+
         /* link-local addressing */
         IPv6LinkLocalAddressGenMode ipv6ll_address_gen_mode;
 
@@ -112,7 +125,6 @@ typedef struct Link {
         Set *addresses;
         Set *neighbors;
         Set *routes;
-        Set *nexthops;
         Set *qdiscs;
         Set *tclasses;
 
@@ -120,9 +132,11 @@ typedef struct Link {
         sd_dhcp_lease *dhcp_lease;
         char *lease_file;
         unsigned dhcp4_messages;
-        bool dhcp4_configured:1;
+        bool dhcp4_configured;
         char *dhcp4_6rd_tunnel_name;
 
+        Hashmap *ipv4acd_by_address;
+
         sd_ipv4ll *ipv4ll;
         bool ipv4ll_address_configured:1;
 
@@ -140,12 +154,16 @@ typedef struct Link {
         bool activated:1;
         bool master_set:1;
         bool stacked_netdevs_created:1;
+        bool bridge_vlan_set:1;
 
         sd_dhcp_server *dhcp_server;
 
         sd_ndisc *ndisc;
+        sd_event_source *ndisc_expire;
         Set *ndisc_rdnss;
         Set *ndisc_dnssl;
+        Set *ndisc_captive_portals;
+        Set *ndisc_pref64;
         unsigned ndisc_messages;
         bool ndisc_configured:1;
 
@@ -224,16 +242,15 @@ static inline bool link_has_carrier(Link *link) {
 
 bool link_ipv6_enabled(Link *link);
 int link_ipv6ll_gained(Link *link);
-
-bool link_ipv4ll_enabled(Link *link);
+bool link_has_ipv6_connectivity(Link *link);
 
 int link_stop_engines(Link *link, bool may_keep_dhcp);
 
 const char* link_state_to_string(LinkState s) _const_;
 LinkState link_state_from_string(const char *s) _pure_;
 
+int link_reconfigure_impl(Link *link, bool force);
 int link_reconfigure(Link *link, bool force);
-int link_reconfigure_after_sleep(Link *link);
 
 int manager_udev_process_link(Manager *m, sd_device *device, sd_device_action_t action);
 int manager_rtnl_process_link(sd_netlink *rtnl, sd_netlink_message *message, Manager *m);