[jcifs] no name with type 0x00 with no scope for host

Michael B Allen mballen at erols.com
Thu Feb 21 07:05:47 EST 2002


On Wed, 20 Feb 2002 11:09:30 -0800
"ashish" <ashishn at ntechra.com> wrote:

> hey, I called "getAllByAddress( "10.0.100.114" )" .
> OK,  even if I don't set "jcifs.smb.client.laddr" property, it works for
> some dial up boxes.
> Just now I have put windows 98 box in dial up mode and it works fine and I
> have not set laddr property.

I'm not sure but you will have to set laddr to reliably get the right
interface for a PPP connection. Otherwise how whould a Java program
know what interface to use? Windows probably has some special corner
case code to ensure the netbios layer works. Or maybe it tries both. I
think PPP becomes the default when you dialup but a Java program started
*before* you dialup might not catch wind of that. I don't know a lot
about this. You'd be better off looking into Java networking over PPP
on desktops type of issues. This has nothing to do with jCIFS (unless
it's a bug but I have seen no evidence to that effect yet).

> 
> Now some fuzzy observation. hey, don't blame me for confusing u further :-)
> Actually yday I was trying with XP box.and it did not work for sometime.
> "nbtstat -A" was working fine though..
> After sometime, even jcifs code started working.And to be frank, I am also
> confused thoroughly..
> I made no change in the code... except that I set "jcifs.smb.client.laddr"
> property to ip address of WAN interface.
> It did not work then too.

You want to set laddr to the LOCAL interface of the network that you
want to connunicate with. If for example you want to contact a host at
the other end of a dialup connection you would set this to the local
interface of your PPP connection.

> then i removed the setting for "jcifs.smb.client.laddr". and after sometime,
> it started working..

See first paragraph.

> 
> Now one more question.. if I am polling all IP Addresses of a subnet , i
> really don't know which IP is a dial up .
> So how do i differentiate between IPs and set "jcifs.smb.client.laddr"
> property accordingly.

You want to set the LOCAL ip of PPP.

> I know I need not do such things for "nbtstat -A"...

That's because it is in a much better position to know what interfaces
to try then a Java program. You need to learn more about PPP and how it
interacts with a LAN connection.

You're proabably going to have to do System.exec:

C:\> ipconfig -a

and snarf the ppp interface IP out of that output.

It would also be much more effective to just download MP3s using Morpheous
than breaking into dialup connections.

Mike




More information about the jcifs mailing list