[comp.unix.misc] /dev/nit bound to "le0" interface

jice@chorus.fr (Christophe Hugly) (09/07/90)

Hello,
Is there any guru out there who tryed to use /dev/nit to send/receive
frames through
the "le0" interface under sunOs ?

Here is my problem.

I am working under sunOs 4.0.3 and I trying  to send/receive frames
through le0 w/o
disturbing the operation of tcp/ip.

I do the following :

- open the /dev/nit pseudo device 
- issue the streams ioctl to bind it to le0
- set the stream in message-discard mode
- send frames with putmsg : ctrl block is the header, data block is the
body.
- receive frames with read (the unread part of the frame is discarded).


I found out the following :

1 - the "src" field of the header is always overWritten by the nit
driver
    (this may seem normal as it prevents a hacker faking frames from
some other machine)

2 - when sending broadcast messages, the nit driver gently copies the
message to the
    read queue so that i can receive my own broadcast (this is less
normal as a true
    ethernet board can never receive its own broadcast frames, but ok it
may be convenient
    in some cases)

The trouble is that the protocol that relies on my software does not
expect to receive
its own broadcasts, so I must filter incoming frames wich come from
myself.
BUT it appears that those "looped-back" frames present a totally
corrupted "src" field,
Therefore I cannot filter them.

- I am wrong somewhere ?
- Is it a known bug ?
- Is there a fix ?
- Is there a way to configure nit so that it doesn't loop-back broadcast
frames ?


Many thanks for any help.
Answer here or by mail, as you think will be better.