diff options
author | Sascha Hauer <s.hauer@pengutronix.de> | 2017-11-17 21:47:40 +0100 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2017-12-01 12:33:33 +0100 |
commit | 46f7781d361b2b4768c0a56c4fd6a9b11fe4157c (patch) | |
tree | 44e95caa85e5398cf42ef067e2c7228c24a3c637 /include | |
parent | 48a58879d18a21007cb7d6863c1bd569a54a5c03 (diff) | |
download | barebox-46f7781d361b2b4768c0a56c4fd6a9b11fe4157c.tar.gz barebox-46f7781d361b2b4768c0a56c4fd6a9b11fe4157c.tar.xz |
net: Use a single gateway
There is not much point in having a network device specific
gateway. If barebox really is part of such a complicated network
in which it needs multiple gateways, then we probably need a
real routing table. Until this happens, a single gateway should
be enough.
This introduces global.net.gateway which holds the gateway ip. The
previously used device specific <ethx>.gateway variables still exist,
but are only aliases for the single gateway.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'include')
-rw-r--r-- | include/net.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/net.h b/include/net.h index 06390732fb..95fa828e84 100644 --- a/include/net.h +++ b/include/net.h @@ -59,7 +59,6 @@ struct eth_device { IPaddr_t ipaddr; IPaddr_t netmask; - IPaddr_t gateway; char ethaddr[6]; char *bootarg; }; @@ -224,6 +223,7 @@ void net_set_nameserver(IPaddr_t ip); void net_set_domainname(const char *name); IPaddr_t net_get_ip(void); IPaddr_t net_get_serverip(void); +IPaddr_t net_get_gateway(void); IPaddr_t net_get_nameserver(void); const char *net_get_domainname(void); |