/* * \brief Ethernet protocol * \author Stefan Kalkowski * \date 2010-08-19 */ /* * Copyright (C) 2010-2017 Genode Labs GmbH * * This file is part of the Genode OS framework, which is distributed * under the terms of the GNU Affero General Public License version 3. */ /* Genode includes */ #include #include #include #include void Net::Ethernet_frame::print(Genode::Output &output) const { Genode::print(output, "\033[32mETH\033[0m ", src(), " > ", dst(), " "); switch (type()) { case Ethernet_frame::Type::ARP: Genode::print(output, *reinterpret_cast(_data)); break; case Ethernet_frame::Type::IPV4: Genode::print(output, *reinterpret_cast(_data)); break; default: ; } }