Skip to contentSkip to conversation

DOSEMU does not pick up all packets

DISCUSSION Stas Sergeev 2 participants 3 messages Nov 26, 2002 – Nov 28, 2002

lore
Share & tools
lore
#0 lore raw

Hello.

Quoted 3 lines · Stian Sletner

I.e. the IPX tunnel
runs on the same box and puts its IPX packets out on eth0 and DOSEMU listens on eth0 but doesn't pick them up.

Ethernet interface is a kind of not a
loop-back, why are you expecting it to
work that way?

Quoted 2 lines

that originate on the same interface? I tried to hack around in libpacket.c without achieving much success.

Using dosnet dsn0 will give you much
more of a success with this I think.

#1 lore raw

* At 2002-11-26T23:57+0300, Stas Sergeev wrote:
:
| Ethernet interface is a kind of not a loop-back, why are you expecting | it to work that way?

Seems logical that, at least, it would be possible, given that it works the other way around (packets from DOSEMU gets picked up by the IPX tunnel).

| Using dosnet dsn0 will give you much more of a success with this I | think.

Ok, I'll try it.

Signature · 1 line
Stian Sletner
#2 lore raw
In reply to Stas Sergeev

* At 2002-11-26T23:57+0300, Stas Sergeev wrote:
:

| >I.e. the IPX tunnel runs on the same box and puts its IPX packets out
| >on eth0 and DOSEMU listens on eth0 but doesn't pick them up.
| 
| Ethernet interface is a kind of not a loop-back, why are you expecting
| it to work that way?

I experimented some more with this, since it seemed to be the right thing to do, the dosnet stuff is IP oriented after all, and shouldn't be necessary to achieve this, I would think. There's no end to what one can achieve with an all-nighter of source hacking, eh? After tons of experimenting and code-writing (and Coke drinking), it boiled down to a one-line change (of course :) to get it working. Here's the patch. I'd like to know if this could be applied or if that'd break something else?

libpacket.c renamed from libpacket.orig +1 -1
@@ -83,7 +83,7 @@
 	if (!config.secure) enter_priv_on();
 #ifdef AF_PACKET
 	if (running_kversion >= 2001000)
-		s = socket(AF_PACKET, SOCK_PACKET, proto);
+		s = socket(AF_PACKET, SOCK_PACKET, htons(ETH_P_ALL));
 	else
 		s = socket(AF_INET, SOCK_PACKET, proto);
 #else
Signature · 1 line
Stian Sletner