sharing port with nmdb
brodun at aston.ac.uk
Tue Oct 19 11:24:08 GMT 1999
Andrew Tridgell wrote:
> > 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.
I wonder if the same idea could be used for other parts of the SMB
For nmb lookup, this approach should be enough. But would it be possible
same trick to send domain logon packets, and get the answer ?
At present I'm looking for an alternative solution for my C++ library,
build the hierachy of masters on each subnet by broadcasting and asking
then log on each server), but it's a bit awkward.
> The nice thing about this is that it involves no extra sockets etc and
> keeps the interaction between nmbd and nmblookup to a minimum.
Right. But maybe the jCIFS guys would prefer a socket based solution
> I won't do this for 2.0.6, but maybe after that ;)
> Cheers, Tridge
Nicolas Brodu, brodun at aston.ac.uk, brodu at kde.org
Student Engineer, 3rd year, at the IIE (Institut d'Informatique
MSc by research at Aston University (Birmingham)
More information about the samba-technical