sharing port with nmdb

Andrew Tridgell tridge at
Tue Oct 19 02:35:29 GMT 1999

> If I understand how SOCK_REUSEADDR works, I think there would still be
> problems with the wrong application reading in a packet, wouldn't there?

indeed. It would break nmbd badly. It would also need root privileges!

> Therefore, I suggest an alternate solution.  Using Unix sockets, or
> something similar, support could be added to nmbd so that other applications
> (e.g., nmblookup) could ask nmbd to send a query for them.
> Of course, the devil's in the details. :)

indeed it is, I think that is too complex.

My plan instead is to have a small shared memory region (say 16k),
which would be used a a ring buffer and would hold any unexpected
messages that nmbd gets. Clients would then attach to this buffer
(which would be read-only to non-root processes) and could look for
packets having the correct opcode for replies they are expecting.

The nice thing about this is that it involves no extra sockets etc and
keeps the interaction between nmbd and nmblookup to a minimum.

I won't do this for 2.0.6, but maybe after that ;)

Cheers, Tridge

More information about the samba-technical mailing list