[jcifs] JCIFS ignoring WINS properties and only performing broadcast requests

Abhinay Mehta abhinay at netusage.net
Thu Jul 12 10:12:02 GMT 2007


Michael B Allen wrote:
> On Wed, 11 Jul 2007 16:39:34 +0100
> Abhinay Mehta <abhinay at netusage.net> wrote:
> 
>> Hi all,
>>
>> This is my test code:
>>
>>
>>     public static void main(String[] args) {
>>        jcifs.Config.setProperty( "jcifs.netbios.wins", "192.168.1.8" );
>>        jcifs.Config.setProperty("jcifs.resolveOrder", "WINS,DNS" );
>>
>>        try {
>>           String hostName = 
>> UniAddress.getByName("192.168.1.10").getHostName();
>>           System.out.println("Host Name = " + hostName);
>>        } catch (UnknownHostException e) {
>>           e.printStackTrace();
>>        }
>>     }
>>
>>
>> I am doing TCP DUMP and am seeing that only broadcast requests are being 
>> sent, why so?
>>
>> I would very much appreciate it if someone could point me in the right 
>> direction.
>>
>> I was reading UniAddress' source code and noticed that in UniAddress' 
>> getByName method there's a method call to isDotQuadIP, and as far as I 
>> can see, that method forces all IP address requests to perform broadcast 
>> requests. Is that right?
> 
> If that's true it sounds like a bug. If BCAST isn't in jcifs.resolveOrder
> it should never do broadcast lookups AND if the hostname is an IP it
> shouldn't do any lookup at all. I'll add this to The List for checking.
> 
> Mike
> 

I think it's probably me doing something or the other wrong.
This is such a simple scenario that if it was a bug, more people would 
be complaining, no?

I'm using JCIFS 1.2.14. And if someone does know what that 'isDotQuadIP' 
method in UniAddress is for, please could you clear that up for me.

Thanks.

Abs


More information about the jcifs mailing list