]> git.ipfire.org Git - thirdparty/systemd.git/blobdiff - src/network/networkd-neighbor.h
importd: unify setup of bus connectivity in one place
[thirdparty/systemd.git] / src / network / networkd-neighbor.h
index 7ac2f90eb388e33e0b5bbad4f8e00c6a507c001d..7917930bcdb844cc458a5f8ee28d157c83476ef2 100644 (file)
 typedef struct Link Link;
 typedef struct Manager Manager;
 typedef struct Network Network;
-typedef struct Request Request;
-
-union lladdr_union {
-        struct ether_addr mac;
-        union in_addr_union ip;
-};
 
 typedef struct Neighbor {
         Network *network;
         Link *link;
-        NetworkConfigSection *section;
+        ConfigSection *section;
+        NetworkConfigSource source;
+        NetworkConfigState state;
+
+        unsigned n_ref;
 
         int family;
         union in_addr_union in_addr;
-        union lladdr_union lladdr;
-        size_t lladdr_size;
+        struct hw_addr_data ll_addr;
 } Neighbor;
 
-Neighbor *neighbor_free(Neighbor *neighbor);
+Neighbor* neighbor_ref(Neighbor *neighbor);
+Neighbor* neighbor_unref(Neighbor *neighbor);
 
-void network_drop_invalid_neighbors(Network *network);
+int neighbor_get(Link *link, const Neighbor *in, Neighbor **ret);
+int neighbor_remove(Neighbor *neighbor, Link *link);
 
-int link_drop_neighbors(Link *link);
+int network_drop_invalid_neighbors(Network *network);
+
+int link_drop_static_neighbors(Link *link);
 int link_drop_foreign_neighbors(Link *link);
+void link_foreignize_neighbors(Link *link);
 
 int link_request_static_neighbors(Link *link);
-int request_process_neighbor(Request *req);
 
 int manager_rtnl_process_neighbor(sd_netlink *rtnl, sd_netlink_message *message, Manager *m);
 
+DEFINE_NETWORK_CONFIG_STATE_FUNCTIONS(Neighbor, neighbor);
+
 CONFIG_PARSER_PROTOTYPE(config_parse_neighbor_address);
-CONFIG_PARSER_PROTOTYPE(config_parse_neighbor_hwaddr);
 CONFIG_PARSER_PROTOTYPE(config_parse_neighbor_lladdr);