--- nono/host/netdriver_afpacket.cpp 2026/04/29 17:05:47 1.1.1.4 +++ nono/host/netdriver_afpacket.cpp 2026/04/29 17:06:02 1.1.1.5 @@ -169,7 +169,7 @@ NetDriverAFPacket::Close() // モニタ (ドライバ依存情報のみ) void -NetDriverAFPacket::MonitorUpdateMD(TextScreen& screen, int y) +NetDriverAFPacket::MonitorScreenMD(TextScreen& screen, int y) { screen.Print(0, y, "Interface: %s", ifname.c_str()); } @@ -182,11 +182,11 @@ NetDriverAFPacket::Write(const void *buf n = sendto(fd, buf, buflen, 0, (const sockaddr *)&sll, sizeof(sll)); if (n < 0) { - putmsg(0, "write: %s", strerror(errno)); + putmsg(0, "sendto(%d): %s", buflen, strerror(errno)); return; } if (n < buflen) { - putmsg(0, "write: short"); + putmsg(0, "sendto(%d): short(%zd)", buflen, n); return; } } @@ -195,14 +195,15 @@ NetDriverAFPacket::Write(const void *buf int NetDriverAFPacket::Read(NetPacket *p) { + uint8 buf[1600]; int n; - n = recv(fd, p->data(), p->size(), 0); + n = recv(fd, buf, sizeof(buf), 0); if (n < 0) { putmsg(0, "recv: %s", strerror(errno)); return NODATA; } - p->length = n; + p->Assign(buf, n); return 0; }