chiark / gitweb /
networkd: rename Address and Route list fields
authorTom Gundersen <teg@jklm.no>
Thu, 15 May 2014 18:10:33 +0000 (20:10 +0200)
committerTom Gundersen <teg@jklm.no>
Fri, 16 May 2014 12:52:02 +0000 (14:52 +0200)
src/network/networkd-address.c
src/network/networkd-link.c
src/network/networkd-network.c
src/network/networkd-route.c
src/network/networkd.h

index 87688a5ae60db115dbc465963a3f50f986ed33aa..e6e3f8f06788bff8f58abb36fe7b19345ea3d398 100644 (file)
@@ -59,7 +59,7 @@ int address_new_static(Network *network, unsigned section, Address **ret) {
 
         address->network = network;
 
-        LIST_PREPEND(static_addresses, network->static_addresses, address);
+        LIST_PREPEND(addresses, network->static_addresses, address);
 
         if (section) {
                 address->section = section;
@@ -92,7 +92,7 @@ void address_free(Address *address) {
                 return;
 
         if (address->network) {
-                LIST_REMOVE(static_addresses, address->network->static_addresses, address);
+                LIST_REMOVE(addresses, address->network->static_addresses, address);
 
                 if (address->section)
                         hashmap_remove(address->network->addresses_by_section,
index 8dd742a3faeee867653b97329afdc9f9ddffed8e..34b8d616bb1cde9557805574097ef9f76ee97515 100644 (file)
@@ -291,7 +291,7 @@ static int link_enter_set_routes(Link *link) {
 
         log_debug_link(link, "setting routes");
 
-        LIST_FOREACH(static_routes, rt, link->network->static_routes) {
+        LIST_FOREACH(routes, rt, link->network->static_routes) {
                 r = route_configure(rt, link, &route_handler);
                 if (r < 0) {
                         log_warning_link(link,
@@ -487,7 +487,7 @@ static int link_enter_set_addresses(Link *link) {
 
         log_debug_link(link, "setting addresses");
 
-        LIST_FOREACH(static_addresses, ad, link->network->static_addresses) {
+        LIST_FOREACH(addresses, ad, link->network->static_addresses) {
                 r = address_configure(ad, link, &address_handler);
                 if (r < 0) {
                         log_warning_link(link,
index 76381c4f6c576b3d6807cca4252262751f26f702..2a68d3ec50f63fd5e4c772ea3326cb01c3751be0 100644 (file)
@@ -98,7 +98,7 @@ static int network_load_one(Manager *manager, const char *filename) {
 
         LIST_PREPEND(networks, manager->networks, network);
 
-        LIST_FOREACH(static_routes, route, network->static_routes) {
+        LIST_FOREACH(routes, route, network->static_routes) {
                 if (!route->family) {
                         log_warning("Route section without Gateway field configured in %s. "
                                     "Ignoring", filename);
@@ -106,7 +106,7 @@ static int network_load_one(Manager *manager, const char *filename) {
                 }
         }
 
-        LIST_FOREACH(static_addresses, address, network->static_addresses) {
+        LIST_FOREACH(addresses, address, network->static_addresses) {
                 if (!address->family) {
                         log_warning("Address section without Address field configured in %s. "
                                     "Ignoring", filename);
index 8b020adba469a29739357262e8e362a8bae6b659..d0a04ecfeebcd3388469cda35e22e083101c7b5d 100644 (file)
@@ -52,7 +52,7 @@ int route_new_static(Network *network, unsigned section, Route **ret) {
 
         route->network = network;
 
-        LIST_PREPEND(static_routes, network->static_routes, route);
+        LIST_PREPEND(routes, network->static_routes, route);
 
         if (section) {
                 route->section = section;
@@ -86,7 +86,7 @@ void route_free(Route *route) {
                 return;
 
         if (route->network) {
-                LIST_REMOVE(static_routes, route->network->static_routes, route);
+                LIST_REMOVE(routes, route->network->static_routes, route);
 
                 if (route->section)
                         hashmap_remove(route->network->routes_by_section,
index f250f197424064021ad7eb226bb859150e667975..e2e15b56bb7bd88b58083bc805f8e1a5e3ea87fd 100644 (file)
@@ -172,7 +172,7 @@ struct Address {
                 struct in6_addr in6;
         } in_addr;
 
-        LIST_FIELDS(Address, static_addresses);
+        LIST_FIELDS(Address, addresses);
 };
 
 struct Route {
@@ -194,7 +194,7 @@ struct Route {
                 struct in6_addr in6;
         } dst_addr;
 
-        LIST_FIELDS(Route, static_routes);
+        LIST_FIELDS(Route, routes);
 };
 
 typedef enum LinkState {