281 |
|
|
282 |
|
int16 ether_add_multicast(uint32 pb) |
283 |
|
{ |
284 |
– |
uint8 *addr = Mac2HostAddr(pb + eMultiAddr); |
284 |
|
net_packet *p = &net_buffer_ptr->write[wr_pos]; |
285 |
|
if (p->cmd & IN_USE) { |
286 |
|
D(bug("WARNING: Couldn't enable multicast address\n")); |
287 |
|
} else { |
288 |
< |
memcpy(p->data, addr, 6); |
288 |
> |
Mac2Host_memcpy(p->data, pb + eMultiAddr, 6); |
289 |
|
p->length = 6; |
290 |
|
p->cmd = IN_USE | (ADD_MULTICAST << 8); |
291 |
|
wr_pos = (wr_pos + 1) % WRITE_PACKET_COUNT; |
301 |
|
|
302 |
|
int16 ether_del_multicast(uint32 pb) |
303 |
|
{ |
305 |
– |
uint8 *addr = Mac2HostAddr(pb + eMultiAddr); |
304 |
|
net_packet *p = &net_buffer_ptr->write[wr_pos]; |
305 |
|
if (p->cmd & IN_USE) { |
306 |
|
D(bug("WARNING: Couldn't enable multicast address\n")); |
307 |
|
} else { |
308 |
< |
memcpy(p->data, addr, 6); |
308 |
> |
Mac2Host_memcpy(p->data, pb + eMultiAddr, 6); |
309 |
|
p->length = 6; |
310 |
|
p->cmd = IN_USE | (REMOVE_MULTICAST << 8); |
311 |
|
wr_pos = (wr_pos + 1) % WRITE_PACKET_COUNT; |
370 |
|
int len = ReadMacInt16(wds); |
371 |
|
if (len == 0) |
372 |
|
break; |
373 |
< |
memcpy(bp, Mac2HostAddr(ReadMacInt32(wds + 2)), len); |
373 |
> |
Mac2Host_memcpy(bp, ReadMacInt32(wds + 2), len); |
374 |
|
bp += len; |
375 |
|
wds += 6; |
376 |
|
} |
446 |
|
goto next; |
447 |
|
|
448 |
|
// Copy header to RHA |
449 |
< |
memcpy(Mac2HostAddr(ether_data + ed_RHA), p->data, 14); |
449 |
> |
Host2Mac_memcpy(ether_data + ed_RHA, p->data, 14); |
450 |
|
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))); |
451 |
|
|
452 |
|
// Call protocol handler |