--- BasiliskII/src/AmigaOS/ether_amiga.cpp 2000/08/20 14:08:41 1.5 +++ BasiliskII/src/AmigaOS/ether_amiga.cpp 2001/07/13 18:49:27 1.9 @@ -1,7 +1,7 @@ /* * ether_amiga.cpp - Ethernet device driver, AmigaOS specific stuff * - * Basilisk II (C) 1997-1999 Christian Bauer + * Basilisk II (C) 1997-2001 Christian Bauer * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -116,11 +116,11 @@ static int16 send_to_proc(uint32 what, u * Initialization */ -void EtherInit(void) +bool ether_init(void) { // Do nothing if no Ethernet device specified if (PrefsFindString("ether") == NULL) - return; + return false; // Initialize protocol list NewList(&prot_list); @@ -151,8 +151,7 @@ void EtherInit(void) goto open_error; // Everything OK - net_open = true; - return; + return true; open_error: net_proc = NULL; @@ -160,6 +159,7 @@ open_error: DeleteMsgPort(reply_port); reply_port = NULL; } + return false; } @@ -167,7 +167,7 @@ open_error: * Deinitialization */ -void EtherExit(void) +void ether_exit(void) { // Stop process if (net_proc) { @@ -188,10 +188,10 @@ void EtherExit(void) * Reset */ -void EtherReset(void) +void ether_reset(void) { // Remove all protocols - if (net_open) + if (net_proc) send_to_proc(MSG_CLEANUP); } @@ -585,10 +585,9 @@ static __saveds void net_func(void) } write_io->ios2_DataLength = len; - // Get destination address, set source address + // Get destination address uint32 hdr = ReadMacInt32(wds + 2); Mac2Host_memcpy(write_io->ios2_DstAddr, hdr, 6); - Host2Mac_memcpy(hdr + 6, ether_addr, 6); // Get packet type uint32 type = ReadMacInt16(hdr + 12);