public inbox for linux-msdos@vger.kernel.org
 help / color / mirror / Atom feed
* Re: DOSEMU does not pick up all packets
@ 2002-11-29  0:40 Stas Sergeev
  2002-11-29 19:26 ` Stian Sletner
  0 siblings, 1 reply; 10+ messages in thread
From: Stas Sergeev @ 2002-11-29  0:40 UTC (permalink / raw)
  To: linux-msdos

Hello.

Stian Sletner wrote:
> The incoming IPX
> packets _are_ to broadcast address, but DOSEMU does not pick them up
> because (I assume) they originate from the same interface, eth0.
Well, all the outgoing packets have
the PACKET_OUTGOING type. They are
not intended to be received on the
same interface.
ETH_P_ALL is a special case, it seem
to allow to break that rule (probably
only for broadcast, I don't know).

> Using my hack, DOSEMU picks up the tunneled packets, and is able to 
> link to both the other side and my local DOS box
Can you, for example, run 2 instances
of dosemu and play a network Doom on a
single machine using your hack?

> It seems to me that DOSEMU _should_ be able to pick up these packets,
> since, again, they're aimed to broadcast
And if they are not?
Anyway, don't try to establish a virtual
network on a single ethernet interface.
There are other possibilities of doing that
without breaking a dosemu functionality.

> (all Doom IPX traffic is,
> AFAIK).
Not true, Doom uses broadcast only when
it searches for another node, and after
that it uses a directded traffic (produce
a +P log and check that out).

> Any clearer?
No, the problem is clear.
Now what I would probably try in that case.
Note that I never actually tried something
like that, so it would be interesting to
hear if it works, or what am I missing.
I think you have to do bridging to your
eth0 device *and* to dsn0 device.
Then your other DOS machine will receive
the traffic via the real Ethernet and also
you can run an arbitrary amount of dosemu
sessions, which will work in their separate
virtual network, to which you also do a
bridging on the same machine.
Does this work?


^ permalink raw reply	[flat|nested] 10+ messages in thread
* Re: DOSEMU does not pick up all packets
@ 2002-11-29 20:27 Stas Sergeev
  2002-11-29 20:48 ` Stian Sletner
  0 siblings, 1 reply; 10+ messages in thread
From: Stas Sergeev @ 2002-11-29 20:27 UTC (permalink / raw)
  To: linux-msdos

Hello.

Stian Sletner wrote:
> I thought I had a clever idea, ifconfig'd up a virtual interface eth0:0
> and set $_netdev = "eth0:0", but that made dosemu crash so it probably
How exactly the crash looks like?

> I'm having problems compiling the dosnet module in RH8.
It was already reported that there
are problems compiling dosnet under
RH8. The fix is to get the fresh
kernel sources and make a proper
symlinks for /usr/include/linux and
/usr/include/asm

> I'd paste only I think I fucked with the file 
> already.
Btw, to get the trick working, you'll
(most likely) need the latest dosnet
(ie from dosemu > 1.1.3.4).

> | I think you have to do bridging to your eth0 device *and* to dsn0
> | device.
> I don't know if this is doable.  Would I need some sort of program to
> "tee" them together?
Hmm, but I supposed your bridging
software can do that. Why are you
limited with bridging between only
2 interfaces?


^ permalink raw reply	[flat|nested] 10+ messages in thread
* Re: DOSEMU does not pick up all packets
@ 2002-11-28 21:06 Stas Sergeev
  2002-11-28 21:59 ` Stian Sletner
  0 siblings, 1 reply; 10+ messages in thread
From: Stas Sergeev @ 2002-11-28 21:06 UTC (permalink / raw)
  To: linux-msdos

Hello.

Stian Sletner wrote:
> 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.
Dosnet have nothing to do with IP.
It's goal is to emulate an Ethernet
network on a single machine.
This is accomplished by:
1. Assigning an unique MAC address
(fake) to each dosemu session (done
in libpacket.c);
2. Ensuring that each dosemu receives
only the packets directed to it, and
the broadcast ones. (done in dosnet
module). This is achieved by manipulating
the "protocol" field of skb, and your
patch breaks this.

> There's no end to what one
> can achieve with an all-nighter of source hacking, eh?
I think you'd better spent some efforts
to rethink your needs:) as what you are
doing, seems out of curiosity (to me at
least).

> After tons of
> experimenting and code-writing (and Coke drinking), it boiled down to a
> one-line change (of course :) to get it working.
To get working what? If you want to put
the packets to the interface and pick them
back immediately, then why not just use
a loopback lo interface (for example)?

> Here's the patch.  
You could probably achieve the same with
just ETH_P_LOOP instead of ETH_P_ALL.

> I'd like to know if this could be applied or if that'd break something 
> else?
It breaks everything.
It breaks dosnet for already described
reason (all dosemus will receive all the
packets, and not only the ones directed to
them).
It breaks also a packet driver, as the DOS
software will now receive every ethernet
frames, even if it requested a particular
type.

Well, before anything else, please just
explain (to yourself and to me:) what do you
*actually* need?
How something can work correctly, if you
use an interface the way it is not intended
to be used?
What is a dest. address of the frames you
are going to pick up? If the dest. address
doesn't match the addr. of the interface
you are picking it from (and the dest is not
a broadcast), then you are already doing
something wrong.
 From what I have currently, it seems to me
that you have to think again about a dosnet
(reverting your patch at first of course,
otherwise don't think about dosnet anymore:),
because dosnet was specially designed for
the tricks like that and it's functionality
is very close to TAP interface (maybe one
day I'll make dosemu to use TAP so that we
throw dosnet away).

I don't have an internet connection from
my LAN now because the admins changed the
net mask on their routers from 255.255.255.0
to 255.255.0.0 in order to "make all the
subnets visible to each other", but actually
they got a clash of an IP ranges on every
router's interfaces, so whenever my station
sends an ARP request with my IP, the router
answers with it's own MAC, because it thinks
this IP exists in another subnet.
This incident definitely have some similarities
with your patch:)
[OK, gone to duel with admins:) ]


^ permalink raw reply	[flat|nested] 10+ messages in thread
* Re: DOSEMU does not pick up all packets
@ 2002-11-26 20:57 Stas Sergeev
  2002-11-26 22:02 ` Stian Sletner
  2002-11-28  5:26 ` Stian Sletner
  0 siblings, 2 replies; 10+ messages in thread
From: Stas Sergeev @ 2002-11-26 20:57 UTC (permalink / raw)
  To: linux-msdos

Hello.

Stian Sletner 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?

> 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.


^ permalink raw reply	[flat|nested] 10+ messages in thread
* DOSEMU does not pick up all packets
@ 2002-11-26 19:01 Stian Sletner
  0 siblings, 0 replies; 10+ messages in thread
From: Stian Sletner @ 2002-11-26 19:01 UTC (permalink / raw)
  To: linux-msdos

Hi.

Thanks to Osvaldo Marques Junior and Ross Vandegrift for answering my
previous question.

I'm trying to use an IPX tunnel to connect my network to another over
IP, but I have a problem with that it seems DOSEMU does not pick up
packets that originate on its listening interface.  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.  I assume this is something
that must be changed in the packet driver to allow it to look at packets
that originate on the same interface?  I tried to hack around in
libpacket.c without achieving much success.  Gurus, come forth. :)

-- 
Stian Sletner

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2002-11-29 20:48 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-11-29  0:40 DOSEMU does not pick up all packets Stas Sergeev
2002-11-29 19:26 ` Stian Sletner
  -- strict thread matches above, loose matches on Subject: below --
2002-11-29 20:27 Stas Sergeev
2002-11-29 20:48 ` Stian Sletner
2002-11-28 21:06 Stas Sergeev
2002-11-28 21:59 ` Stian Sletner
2002-11-26 20:57 Stas Sergeev
2002-11-26 22:02 ` Stian Sletner
2002-11-28  5:26 ` Stian Sletner
2002-11-26 19:01 Stian Sletner

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox