chiark / gitweb /
networkd: rename netdev variables
authorSusant Sahani <susant@redhat.com>
Mon, 16 Jun 2014 06:24:32 +0000 (11:54 +0530)
committerTom Gundersen <teg@jklm.no>
Mon, 16 Jun 2014 18:38:22 +0000 (20:38 +0200)
Rename the netdev variables. Remove tunnel_
so that it can be reused .

src/network/networkd-netdev-gperf.gperf
src/network/networkd-tunnel.c
src/network/networkd.h

index 82cc8583dc7e4f3f48e4098b616389ff7bdd413a..784f0f468556ff89338b2f92a07c1259b52eff0a 100644 (file)
@@ -26,10 +26,10 @@ NetDev.MTUBytes,         config_parse_iec_size,              0,
 NetDev.MACAddress,       config_parse_hwaddr,                0,                             offsetof(NetDev, mac)
 VLAN.Id,                 config_parse_uint64,                0,                             offsetof(NetDev, vlanid)
 MACVLAN.Mode,            config_parse_macvlan_mode,          0,                             offsetof(NetDev, macvlan_mode)
-Tunnel.Local,            config_parse_tunnel_address,        0,                             offsetof(NetDev, tunnel_local)
-Tunnel.Remote,           config_parse_tunnel_address,        0,                             offsetof(NetDev, tunnel_remote)
-Tunnel.TOS,              config_parse_unsigned,              0,                             offsetof(NetDev, tunnel_tos)
-Tunnel.TTL,              config_parse_unsigned,              0,                             offsetof(NetDev, tunnel_ttl)
+Tunnel.Local,            config_parse_tunnel_address,        0,                             offsetof(NetDev, local)
+Tunnel.Remote,           config_parse_tunnel_address,        0,                             offsetof(NetDev, remote)
+Tunnel.TOS,              config_parse_unsigned,              0,                             offsetof(NetDev, tos)
+Tunnel.TTL,              config_parse_unsigned,              0,                             offsetof(NetDev, ttl)
 Tunnel.DiscoverPathMTU,  config_parse_bool,                  0,                             offsetof(NetDev, tunnel_pmtudisc)
 Peer.Name,               config_parse_ifname,                0,                             offsetof(NetDev, ifname_peer)
 Peer.MACAddress,         config_parse_hwaddr,                0,                             offsetof(NetDev, mac_peer)
index 885347ab2599818c7c384a1d46893eeb66d653cc..202c089c4330713de2fab64e3084b5869c5aa285 100644 (file)
@@ -95,7 +95,7 @@ static int netdev_fill_ipip_rtnl_message(Link *link, sd_rtnl_message *m) {
                 return r;
         }
 
-        r = sd_rtnl_message_append_in_addr(m, IFLA_IPTUN_LOCAL, &netdev->tunnel_local);
+        r = sd_rtnl_message_append_in_addr(m, IFLA_IPTUN_LOCAL, &netdev->local);
         if (r < 0) {
                 log_error_netdev(netdev,
                                  "Could not append IFLA_IPTUN_LOCAL attribute: %s",
@@ -103,7 +103,7 @@ static int netdev_fill_ipip_rtnl_message(Link *link, sd_rtnl_message *m) {
                 return r;
         }
 
-        r = sd_rtnl_message_append_in_addr(m, IFLA_IPTUN_REMOTE, &netdev->tunnel_remote);
+        r = sd_rtnl_message_append_in_addr(m, IFLA_IPTUN_REMOTE, &netdev->remote);
         if (r < 0) {
                 log_error_netdev(netdev,
                                  "Could not append IFLA_IPTUN_REMOTE attribute: %s",
@@ -111,7 +111,7 @@ static int netdev_fill_ipip_rtnl_message(Link *link, sd_rtnl_message *m) {
                 return r;
         }
 
-        r = sd_rtnl_message_append_u8(m, IFLA_IPTUN_TTL, netdev->tunnel_ttl);
+        r = sd_rtnl_message_append_u8(m, IFLA_IPTUN_TTL, netdev->ttl);
         if (r < 0) {
                 log_error_netdev(netdev,
                                  "Could not append IFLA_IPTUN_TTL  attribute: %s",
@@ -202,7 +202,7 @@ static int netdev_fill_sit_rtnl_message(Link *link, sd_rtnl_message *m) {
                 return r;
         }
 
-        r = sd_rtnl_message_append_in_addr(m, IFLA_IPTUN_LOCAL, &netdev->tunnel_local);
+        r = sd_rtnl_message_append_in_addr(m, IFLA_IPTUN_LOCAL, &netdev->local);
         if (r < 0) {
                 log_error_netdev(netdev,
                                  "Could not append IFLA_IPTUN_LOCAL attribute: %s",
@@ -210,7 +210,7 @@ static int netdev_fill_sit_rtnl_message(Link *link, sd_rtnl_message *m) {
                 return r;
         }
 
-        r = sd_rtnl_message_append_in_addr(m, IFLA_IPTUN_REMOTE, &netdev->tunnel_remote);
+        r = sd_rtnl_message_append_in_addr(m, IFLA_IPTUN_REMOTE, &netdev->remote);
         if (r < 0) {
                 log_error_netdev(netdev,
                                  "Could not append IFLA_IPTUN_REMOTE attribute: %s",
@@ -218,7 +218,7 @@ static int netdev_fill_sit_rtnl_message(Link *link, sd_rtnl_message *m) {
                 return r;
         }
 
-        r = sd_rtnl_message_append_u8(m, IFLA_IPTUN_TOS, netdev->tunnel_tos);
+        r = sd_rtnl_message_append_u8(m, IFLA_IPTUN_TOS, netdev->tos);
         if (r < 0) {
                 log_error_netdev(netdev,
                                  "Could not append IFLA_IPTUN_TOS attribute: %s",
@@ -317,7 +317,7 @@ static int netdev_fill_ipgre_rtnl_message(Link *link, sd_rtnl_message *m) {
                 return r;
         }
 
-        r = sd_rtnl_message_append_in_addr(m, IFLA_GRE_LOCAL, &netdev->tunnel_local);
+        r = sd_rtnl_message_append_in_addr(m, IFLA_GRE_LOCAL, &netdev->local);
         if (r < 0) {
                 log_error_netdev(netdev,
                                  "Could not append IFLA_GRE_LOCAL attribute: %s",
@@ -325,7 +325,7 @@ static int netdev_fill_ipgre_rtnl_message(Link *link, sd_rtnl_message *m) {
                 return r;
         }
 
-        r = sd_rtnl_message_append_in_addr(m, IFLA_GRE_REMOTE, &netdev->tunnel_remote);
+        r = sd_rtnl_message_append_in_addr(m, IFLA_GRE_REMOTE, &netdev->remote);
         if (r < 0) {
                 log_error_netdev(netdev,
                                  "Could not append IFLA_GRE_REMOTE attribute: %s",
@@ -333,7 +333,7 @@ static int netdev_fill_ipgre_rtnl_message(Link *link, sd_rtnl_message *m) {
                 return r;
         }
 
-        r = sd_rtnl_message_append_u8(m, IFLA_GRE_TTL, netdev->tunnel_ttl);
+        r = sd_rtnl_message_append_u8(m, IFLA_GRE_TTL, netdev->ttl);
         if (r < 0) {
                 log_error_netdev(netdev,
                                  "Could not append IFLA_GRE_TTL attribute: %s",
@@ -341,7 +341,7 @@ static int netdev_fill_ipgre_rtnl_message(Link *link, sd_rtnl_message *m) {
                 return r;
         }
 
-        r = sd_rtnl_message_append_u8(m, IFLA_GRE_TOS, netdev->tunnel_tos);
+        r = sd_rtnl_message_append_u8(m, IFLA_GRE_TOS, netdev->tos);
         if (r < 0) {
                 log_error_netdev(netdev,
                                  "Could not append IFLA_GRE_TOS attribute: %s",
@@ -432,7 +432,7 @@ static int netdev_fill_vti_rtnl_message(Link *link, sd_rtnl_message *m) {
                 return r;
         }
 
-        r = sd_rtnl_message_append_in_addr(m, IFLA_VTI_LOCAL, &netdev->tunnel_local);
+        r = sd_rtnl_message_append_in_addr(m, IFLA_VTI_LOCAL, &netdev->local);
         if (r < 0) {
                 log_error_netdev(netdev,
                                  "Could not append IFLA_IPTUN_LOCAL attribute: %s",
@@ -440,7 +440,7 @@ static int netdev_fill_vti_rtnl_message(Link *link, sd_rtnl_message *m) {
                 return r;
         }
 
-        r = sd_rtnl_message_append_in_addr(m, IFLA_VTI_REMOTE, &netdev->tunnel_remote);
+        r = sd_rtnl_message_append_in_addr(m, IFLA_VTI_REMOTE, &netdev->remote);
         if (r < 0) {
                 log_error_netdev(netdev,
                                  "Could not append IFLA_IPTUN_REMOTE attribute: %s",
index f079473758dda02904de637b7afd98198ae80c25..799fd591062fadef4141477f367d62c76baa97bf 100644 (file)
@@ -114,10 +114,10 @@ struct NetDev {
         NetDevState state;
 
         bool tunnel_pmtudisc;
-        unsigned tunnel_ttl;
-        unsigned tunnel_tos;
-        struct in_addr tunnel_local;
-        struct in_addr tunnel_remote;
+        unsigned ttl;
+        unsigned tos;
+        struct in_addr local;
+        struct in_addr remote;
 
         LIST_HEAD(netdev_enslave_callback, callbacks);
 };