1 |
|
/* |
2 |
|
* ether_amiga.cpp - Ethernet device driver, AmigaOS specific stuff |
3 |
|
* |
4 |
< |
* Basilisk II (C) 1997-1999 Christian Bauer |
4 |
> |
* Basilisk II (C) 1997-2000 Christian Bauer |
5 |
|
* |
6 |
|
* This program is free software; you can redistribute it and/or modify |
7 |
|
* it under the terms of the GNU General Public License as published by |
451 |
|
|
452 |
|
case MSG_ADD_MULTI: |
453 |
|
control_io->ios2_Req.io_Command = S2_ADDMULTICASTADDRESS; |
454 |
< |
memcpy(control_io->ios2_SrcAddr, Mac2HostAddr(msg->pointer + eMultiAddr), 6); |
454 |
> |
Mac2Host_memcpy(control_io->ios2_SrcAddr, msg->pointer + eMultiAddr, 6); |
455 |
|
DoIO((struct IORequest *)control_io); |
456 |
|
if (control_io->ios2_Req.io_Error == S2ERR_NOT_SUPPORTED) { |
457 |
|
WarningAlert(GetString(STR_NO_MULTICAST_WARN)); |
464 |
|
|
465 |
|
case MSG_DEL_MULTI: |
466 |
|
control_io->ios2_Req.io_Command = S2_DELMULTICASTADDRESS; |
467 |
< |
memcpy(control_io->ios2_SrcAddr, Mac2HostAddr(msg->pointer + eMultiAddr), 6); |
467 |
> |
Mac2Host_memcpy(control_io->ios2_SrcAddr, msg->pointer + eMultiAddr, 6); |
468 |
|
DoIO((struct IORequest *)control_io); |
469 |
|
if (control_io->ios2_Req.io_Error) |
470 |
|
msg->result = eMultiErr; |
550 |
|
|
551 |
|
// Get destination address, set source address |
552 |
|
uint32 hdr = ReadMacInt32(wds + 2); |
553 |
< |
memcpy(write_io->ios2_DstAddr, Mac2HostAddr(hdr), 6); |
554 |
< |
memcpy(Mac2HostAddr(hdr + 6), ether_addr, 6); |
553 |
> |
Mac2Host_memcpy(write_io->ios2_DstAddr, hdr, 6); |
554 |
> |
Host2Mac_memcpy(hdr + 6, ether_addr, 6); |
555 |
|
|
556 |
|
// Get packet type |
557 |
|
uint32 type = ReadMacInt16(hdr + 12); |
651 |
|
continue; |
652 |
|
|
653 |
|
// Copy header to RHA |
654 |
< |
memcpy(Mac2HostAddr(ether_data + ed_RHA), io->ios2_Data, 14); |
654 |
> |
Host2Mac_memcpy(ether_data + ed_RHA, io->ios2_Data, 14); |
655 |
|
D(bug(" header %08lx%04lx %08lx%04lx %04lx\n", ReadMacInt32(ether_data + ed_RHA), ReadMacInt16(ether_data + ed_RHA + 4), ReadMacInt32(ether_data + ed_RHA + 6), ReadMacInt16(ether_data + ed_RHA + 10), ReadMacInt16(ether_data + ed_RHA + 12))); |
656 |
|
|
657 |
|
// Call protocol handler |