mirror of
https://github.com/kanjitalk755/macemu.git
synced 2024-11-26 10:49:21 +00:00
fix for new packet interface
This commit is contained in:
parent
63015fd6d3
commit
4bf4a1d2b0
@ -163,14 +163,15 @@ void EtherInterrupt(void)
|
||||
{
|
||||
#if SUPPORTS_UDP_TUNNEL
|
||||
if (udp_tunnel_active) {
|
||||
uint8 packet[1514];
|
||||
EthernetPacket ether_packet;
|
||||
uint32 packet = ether_packet.addr();
|
||||
ssize_t length;
|
||||
|
||||
// Read packets from socket and hand to ether_udp_read() for processing
|
||||
while (true) {
|
||||
struct sockaddr_in from;
|
||||
socklen_t from_len = sizeof(from);
|
||||
length = recvfrom(fd, packet, 1514, 0, (struct sockaddr *)&from, &from_len);
|
||||
length = recvfrom(fd, Mac2HostAddr(packet), 1514, 0, (struct sockaddr *)&from, &from_len);
|
||||
if (length < 14)
|
||||
break;
|
||||
ether_udp_read(packet, length, &from);
|
||||
|
Loading…
Reference in New Issue
Block a user