From 1ee757fb521376f8909a37bcc74ea792879966eb Mon Sep 17 00:00:00 2001 From: Marvin Borner Date: Mon, 2 Nov 2020 18:12:25 +0100 Subject: Better logging --- kernel/drivers/rtl8139.c | 2 +- kernel/features/net.c | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'kernel') diff --git a/kernel/drivers/rtl8139.c b/kernel/drivers/rtl8139.c index 7550c75..3205e80 100644 --- a/kernel/drivers/rtl8139.c +++ b/kernel/drivers/rtl8139.c @@ -71,7 +71,7 @@ void rtl8139_send_packet(void *data, u32 len) if (!rtl_device_pci) return; - printf("Sending packet %d\n\n", len); + printf("RTL8139 send packet (size: %d)\n\n", len); outl(rtl_iobase + tsad_array[tx_current], (u32)data); outl(rtl_iobase + tsd_array[tx_current++], len); if (tx_current > 3) diff --git a/kernel/features/net.c b/kernel/features/net.c index 90d7bab..01cbb47 100644 --- a/kernel/features/net.c +++ b/kernel/features/net.c @@ -129,8 +129,8 @@ void ip_send_packet(u32 dst, void *data, int len, int prot) } } cli(); - printf("%x:%x:%x:%x:%x:%x\n", dst_mac[0], dst_mac[1], dst_mac[2], dst_mac[3], dst_mac[4], - dst_mac[5]); + printf("Destination: %x:%x:%x:%x:%x:%x\n", dst_mac[0], dst_mac[1], dst_mac[2], dst_mac[3], + dst_mac[4], dst_mac[5]); ethernet_send_packet(dst_mac, (u8 *)packet, htons(packet->length), ETHERNET_TYPE_IP4); free(packet); @@ -191,7 +191,7 @@ void dhcp_handle_packet(struct dhcp_packet *packet) dhcp_request(); } else if (*type == 5) { // ACK ip_addr = packet->your_ip; - printf("ACK! %x\n", ip_addr); + printf("ACK! New IP: %x\n", ip_addr); } free(type); } -- cgit v1.2.3