Hello
Just as a remark: you actually don't need to implement the *whole* NetBIOS
stack, the only thing you want to do is to reply to naming messages that
contain the name of your device.
We've already implemented that solution in our system, and it's working as a
marvel:
- The source code (in C++ since we use Thread classes) is 380 lines long
(including comments describing packets)
- In Windows, when you use any program that calls gethostbyaddr (ping,
IE, Firefox, Telnet, LabVIEW, ...) Windows will automagically send out a
broadcast for that NetBIOS name and find your device, even if there's no DNS
or DHCP server (note that distinguishing between DNS names and NetBIOS names
is trivial: a NetBIOS name cannot contain a dot, a DNS name has to contain a
dot).
- In Linux/OS X, a manual call to "nblookup" is required (that'll return
the IP address for that name). We've actually done a Java class that does
that resolution automatically (if it contains a dot ask DNS, otherwise call
nblookup).
Cheers
S. Ali Tokmen
http://ali.tokmen.com