[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[ns] Patch to enable emulation on linux



Hello all,

I have been trying to use the plain nse under linux (RedHat 7.1) but found
that packets were only sent to the loopback interface. For some mysterious
reasons beyond my understanding, linux requires the use of sendto(..)
instead of send(..) on a RAW socket, also MUST the socket be closed in that
situation.

The attached patch file represents the changes I made to the emulation code.
I haven't done extensive testing but the emping.tcl script works for me
(Used a windows client PC, added a static ARP entry linking a fake IP number
to the hardware address of the ethernet addapter, and changed the filter to
the same IP number)

They should be easy to incorporate in the main distribution, however , as I
don't run BSD, it is advisable to check if all still is well under BSD. I
tried to shield the altered code completely with #ifdefs, but I can imagine
that the linux code is also correct under BSD (except for some host order,
network order differences).

How to go from here? Who can incorporate it in the main distribution? Who
can verify it is Ok in BSD, who can check some other linux flavours like
e.g. SuSe?

All best of luck,

Ruud Schramp
KPN Research
[email protected]
+31-70-4462341


 <<patch_ns>> 

patch_ns