nic_router: Ipv4_config::print method

Issue #2815
This commit is contained in:
Martin Stein 2018-05-17 17:48:55 +02:00 committed by Christian Helmuth
parent 6de79ad703
commit 1cfcab536c
2 changed files with 17 additions and 0 deletions

View File

@ -30,3 +30,13 @@ Ipv4_config::Ipv4_config(Ipv4_address_prefix interface,
error("Bad IP configuration");
}
}
void Ipv4_config::print(Output &output) const
{
if (valid) {
Genode::print(output, "interface ", interface, ", gateway ", gateway,
", DNS server ", dns_server); }
else {
Genode::print(output, "none"); }
}

View File

@ -42,6 +42,13 @@ struct Net::Ipv4_config
gateway != other.gateway ||
dns_server != other.dns_server;
}
/*********
** log **
*********/
void print(Genode::Output &output) const;
};
#endif /* _IPV4_CONFIG_H_ */