mirror of
https://github.com/genodelabs/genode.git
synced 2025-01-29 15:44:02 +00:00
lib/net: no color coding in packet print methods
This commit is contained in:
parent
bf18ffbbdd
commit
434a4db637
@ -175,10 +175,10 @@ append qemu_args " -nographic "
|
||||
append_qemu_nic_args
|
||||
|
||||
append done_string {.*?\[init -> client_3] .\[31mError: Nic-session creation failed}
|
||||
append done_string {.*?\[client_1 -> lwip] rcv .\[32mETH.\[0m 02:02:02:02:42:0.}
|
||||
append done_string {.*?\[client_2 -> lwip] rcv .\[32mETH.\[0m 02:02:02:02:79:00}
|
||||
append done_string {.*?\[server_1 -> lwip] rcv .\[32mETH.\[0m 02:02:02:02:42:0.}
|
||||
append done_string {.*?\[server_2 -> lwip] rcv .\[32mETH.\[0m 02:02:02:02:23:00}
|
||||
append done_string {.*?\[client_1 -> lwip] rcv ETH 02:02:02:02:42:0.}
|
||||
append done_string {.*?\[client_2 -> lwip] rcv ETH 02:02:02:02:79:00}
|
||||
append done_string {.*?\[server_1 -> lwip] rcv ETH 02:02:02:02:42:0.}
|
||||
append done_string {.*?\[server_2 -> lwip] rcv ETH 02:02:02:02:23:00}
|
||||
append done_string {.*?"client_." exited with exit value 0}
|
||||
append done_string {.*?"client_." exited with exit value 0}
|
||||
append done_string {.*?\n}
|
||||
|
@ -22,6 +22,6 @@
|
||||
void Net::Arp_packet::print(Genode::Output &output) const
|
||||
{
|
||||
if (!ethernet_ipv4()) { return; }
|
||||
Genode::print(output, "\033[32mARP\033[0m ", src_mac(), " ", src_ip(),
|
||||
Genode::print(output, "ARP ", src_mac(), " ", src_ip(),
|
||||
" > ", dst_mac(), " ", dst_ip(), " cmd ", opcode());
|
||||
}
|
||||
|
@ -60,14 +60,14 @@ void Net::Dhcp_packet::print(Genode::Output &output) const
|
||||
Message_type_option const &msg_type {
|
||||
*reinterpret_cast<Message_type_option const *>(&opt) };
|
||||
|
||||
Genode::print(output, "\033[32mDHCP ",
|
||||
msg_type_to_string(msg_type.value()), "\033[0m ",
|
||||
Genode::print(output, "DHCP ",
|
||||
msg_type_to_string(msg_type.value()), " ",
|
||||
client_mac(), " > ", siaddr());
|
||||
}
|
||||
});
|
||||
if (!msg_type_found) {
|
||||
|
||||
Genode::print(output, "\033[32mDHCP ", opcode_to_string(op()),
|
||||
"\033[0m ", client_mac(), " > ", siaddr());
|
||||
Genode::print(output, "DHCP ", opcode_to_string(op()),
|
||||
" ", client_mac(), " > ", siaddr());
|
||||
}
|
||||
}
|
||||
|
@ -20,7 +20,7 @@
|
||||
|
||||
void Net::Ethernet_frame::print(Genode::Output &output) const
|
||||
{
|
||||
Genode::print(output, "\033[32mETH\033[0m ", src(), " > ", dst(), " ");
|
||||
Genode::print(output, "ETH ", src(), " > ", dst(), " ");
|
||||
switch (type()) {
|
||||
case Ethernet_frame::Type::ARP:
|
||||
Genode::print(output, *reinterpret_cast<Arp_packet const *>(_data));
|
||||
|
@ -22,8 +22,7 @@ using namespace Genode;
|
||||
|
||||
void Net::Icmp_packet::print(Output &output) const
|
||||
{
|
||||
Genode::print(output, "\033[32mICMP\033[0m ", (unsigned)type(), " ",
|
||||
(unsigned)code());
|
||||
Genode::print(output, "ICMP ", (unsigned)type(), " ", (unsigned)code());
|
||||
}
|
||||
|
||||
|
||||
|
@ -26,7 +26,7 @@ using namespace Net;
|
||||
|
||||
void Net::Ipv4_packet::print(Genode::Output &output) const
|
||||
{
|
||||
Genode::print(output, "\033[32mIPV4\033[0m ", src(), " > ", dst(), " ");
|
||||
Genode::print(output, "IPV4 ", src(), " > ", dst(), " ");
|
||||
switch (protocol()) {
|
||||
case Protocol::TCP:
|
||||
Genode::print(output, *reinterpret_cast<Tcp_packet const *>(_data));
|
||||
|
@ -22,8 +22,7 @@ using namespace Genode;
|
||||
|
||||
void Net::Tcp_packet::print(Genode::Output &output) const
|
||||
{
|
||||
Genode::print(output, "\033[32mTCP\033[0m ", src_port(),
|
||||
" > ", dst_port(), " flags '");
|
||||
Genode::print(output, "TCP ", src_port(), " > ", dst_port(), " flags '");
|
||||
|
||||
if (fin()) { Genode::print(output, "f"); }
|
||||
if (syn()) { Genode::print(output, "s"); }
|
||||
|
@ -24,8 +24,7 @@ using namespace Genode;
|
||||
|
||||
void Net::Udp_packet::print(Genode::Output &output) const
|
||||
{
|
||||
Genode::print(output, "\033[32mUDP\033[0m ", src_port(),
|
||||
" > ", dst_port(), " ");
|
||||
Genode::print(output, "UDP ", src_port(), " > ", dst_port(), " ");
|
||||
if (Dhcp_packet::is_dhcp(this)) {
|
||||
Genode::print(output, *reinterpret_cast<Dhcp_packet const *>(_data));
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user