mirror of
https://github.com/kanjitalk755/macemu.git
synced 2025-01-13 08:29:43 +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 SUPPORTS_UDP_TUNNEL
|
||||||
if (udp_tunnel_active) {
|
if (udp_tunnel_active) {
|
||||||
uint8 packet[1514];
|
EthernetPacket ether_packet;
|
||||||
|
uint32 packet = ether_packet.addr();
|
||||||
ssize_t length;
|
ssize_t length;
|
||||||
|
|
||||||
// Read packets from socket and hand to ether_udp_read() for processing
|
// Read packets from socket and hand to ether_udp_read() for processing
|
||||||
while (true) {
|
while (true) {
|
||||||
struct sockaddr_in from;
|
struct sockaddr_in from;
|
||||||
socklen_t from_len = sizeof(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)
|
if (length < 14)
|
||||||
break;
|
break;
|
||||||
ether_udp_read(packet, length, &from);
|
ether_udp_read(packet, length, &from);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user