From: Stas Sergeev <stssppnn@yahoo.com>
To: linux-msdos@vger.kernel.org
Subject: Re: DOSEMU does not pick up all packets
Date: Fri, 29 Nov 2002 00:06:46 +0300 [thread overview]
Message-ID: <3DE68566.2020805@yahoo.com> (raw)
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:) ]
next reply other threads:[~2002-11-28 21:06 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-11-28 21:06 Stas Sergeev [this message]
2002-11-28 21:59 ` DOSEMU does not pick up all packets 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-29 0:40 Stas Sergeev
2002-11-29 19:26 ` 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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=3DE68566.2020805@yahoo.com \
--to=stssppnn@yahoo.com \
--cc=linux-msdos@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox