diff --git a/repos/os/src/server/nic_router/ipv4_config.cc b/repos/os/src/server/nic_router/ipv4_config.cc index 46542461f..520032714 100644 --- a/repos/os/src/server/nic_router/ipv4_config.cc +++ b/repos/os/src/server/nic_router/ipv4_config.cc @@ -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"); } +} diff --git a/repos/os/src/server/nic_router/ipv4_config.h b/repos/os/src/server/nic_router/ipv4_config.h index e52e0deff..e6e060bc5 100644 --- a/repos/os/src/server/nic_router/ipv4_config.h +++ b/repos/os/src/server/nic_router/ipv4_config.h @@ -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_ */