diff --git a/os/src/server/nic_bridge/component.cc b/os/src/server/nic_bridge/component.cc index 1048222ed..d3e8fbc82 100644 --- a/os/src/server/nic_bridge/component.cc +++ b/os/src/server/nic_bridge/component.cc @@ -139,9 +139,9 @@ Session_component::Session_component(Genode::Allocator *allocator, set_ipv4_address(ip); if (verbose) - PDBG("\nmac=%02x.%02x.%02x.%02x.%02x.%02x ip=%d.%d.%d.%d", + PLOG("vmac=%02x:%02x:%02x:%02x:%02x:%02x ip=%d.%d.%d.%d", vmac.addr[0], vmac.addr[1], vmac.addr[2], - vmac.addr[3], vmac.addr[4], vmac.addr[5], + vmac.addr[3], vmac.addr[4], vmac.addr[5], ip.addr[0], ip.addr[1], ip.addr[2], ip.addr[3]); } } diff --git a/os/src/server/nic_bridge/component.h b/os/src/server/nic_bridge/component.h index e509ae60e..41ff3d1f8 100644 --- a/os/src/server/nic_bridge/component.h +++ b/os/src/server/nic_bridge/component.h @@ -183,11 +183,11 @@ namespace Net { Session_policy policy(label); policy.attribute("ip_addr").value(ip_addr, sizeof(ip_addr)); - if (verbose) PDBG("policy: %s ip_addr = %s", label.string(), ip_addr); + if (verbose) PLOG("policy: %s ip_addr = %s", label.string(), ip_addr); } catch (Xml_node::Nonexistent_attribute) { - if (verbose) PDBG("Missing \"ip_addr\" attribute in policy definition"); + if (verbose) PLOG("Missing \"ip_addr\" attribute in policy definition"); } catch (Session_policy::No_policy_defined) { - if (verbose) PDBG("Invalid session request, no matching policy");; + if (verbose) PLOG("Invalid session request, no matching policy");; } size_t ram_quota = diff --git a/os/src/server/nic_bridge/main.cc b/os/src/server/nic_bridge/main.cc index f7ed0453a..b04cbda5e 100644 --- a/os/src/server/nic_bridge/main.cc +++ b/os/src/server/nic_bridge/main.cc @@ -21,6 +21,7 @@ /* local includes */ #include "component.h" +#include "nic.h" #include "env.h" @@ -45,6 +46,12 @@ int main(int, char **) /* announce NIC service */ env()->parent()->announce(ep.manage(&nic_root)); + /* connect to NIC backend to actually see incoming traffic */ + Net::Ethernet_frame::Mac_address mac(Net::Env::nic()->mac()); + printf("--- NIC bridge started (mac=%02x:%02x:%02x:%02x:%02x:%02x) ---\n", + mac.addr[0], mac.addr[1], mac.addr[2], + mac.addr[3], mac.addr[4], mac.addr[5]); + while (true) { Signal s = Net::Env::receiver()->wait_for_signal(); static_cast(s.context())->dispatch(s.num());