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:) ]

-
To unsubscribe from this list: send the line "unsubscribe linux-msdos" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to