[jcifs] name resolving

Eric Glass eric.glass at gmail.com
Wed Sep 8 12:49:20 GMT 2004


> We need to find address for our network, and for that we need to have local
> IP(laddr) and netmask. I think, it not possible to find address only by baddr
> correctly.
> But we can calculate baddr by local IP and netmask. Seems to we need to add
> netmask property instead baddr.
> We can calculate which address more equal for baddr, and use this address,
> but it is not a right way.

This is true; using the broadcast address would not discriminate among
overlapping subnets.  Introducing a netmask parameter would be
optimal, but there would be more changes introduced (e.g., setting
jcifs.netbios.baddr based on the netmask, unless the user also
specifies baddr, etc.).

Note that you could take the "cheap and easy" way out by specifying an
lmhosts entry for the desired address and resolve it that way instead;
but that's not really viable if this scenario occurs on a large number
of hosts in your network.


Eric


More information about the jcifs mailing list