[jcifs] problem with NbtAddress.getAllByAddress()

ashish ashishn at ntechra.com
Tue May 14 03:32:14 EST 2002


ok, this time it's a different story.
I am polling a remote subnet to see what type of boxes are there.. sort of
asset tracking..
So I really cannot tell you whether it is dial up or not.

here's output of nbtstat -A

   Name               Type         Status
---------------------------------------------
XXXXXX <00>  UNIQUE      Registered
WORKGROUP      <00>  GROUP       Registered
XXXXXXX <20>  UNIQUE      Registered
WORKGROUP      <1E>  GROUP       Registered
XXXXXXX <03>  UNIQUE      Registered
XXXXXXX <01>  UNIQUE      Registered

MAC Address = YY-YY-YY-YY-YY-YY


I have changed the name and mac address in this output.

I agree that XP may have a problem or dial up may have problems...
My only point is what so unique about Nbtstat that it works.

You wrote that nbtstat may be getting information from other means. What are
those means.

Thanks,
Ashish


----- Original Message -----
From: Michael B. Allen <miallen at eskimo.com>
To: <ashishn at ntechra.com>
Cc: <jcifs at samba.org>; <crh at ubiqx.mn.org>
Sent: Sunday, May 12, 2002 12:29 AM
Subject: Re: [jcifs] problem with NbtAddress.getAllByAddress()


> On Sat, 11 May 2002 17:42:52 -0500
> "Christopher R. Hertel" <crh at ubiqx.mn.org> wrote:
>
> > Two things.
> >
> > 1) Please don't send mail in HTML format.
> >
> > 2) I'd like to see the output of nbtstat -A.
> >
> > Chris -)-----
> >
> > > ashish wrote:
> > >
> > > I am again back with the same problem.. but with more details....
> > >
> > > nbtstat -A works fine.
> > > but NbtAddress.getAllByAddress() or NbtAddress.getByName() fails.
> > > Here's stack trace... I have set
> > >
> > >  Config.setProperty("jcifs.util.log","ALL")
> > >
> > >
> > >
> > > trying first nbtstat
> > > tried first nbtstat
> > > java.net.UnknownHostException: no name with type 0x00 with no scope
for
> > > host XX.XX.XX.XX
> > >         at
jcifs.netbios.NbtAddress.getAllByAddress(NbtAddress.java:484)
> > >         at
> > > jcifs.netbios.NbtAddress.checkNodeStatusData(NbtAddress.java:627,
Compiled
> > > Code)
> > >         at jcifs.netbios.NbtAddress.getMacAddress(NbtAddress.java:711,
> > > Compiled Code)
> > >         at CheckMac.main(CheckMac.java:54, Compiled Code)
> > > press any key to exit...
> > >
> > >
> > > Here's code snippet
> > >
> > >                 String ip = "XX.XX.XX.XX";
> > >                     System.out.println("trying first nbtstat");
> > >                     NbtAddress addr1 = NbtAddress.getByName(ip) ;
> > >                     System.out.println("tried first nbtstat");
> > >                     byte[] array = addr1.getMacAddress() ;
> > >                         String mac =
StringUtils.bytesToHexString(array);
> > >                         System.out.println("mac = "+mac);
> > >
> > > I have replaced actual IP with "XX.XX.XX.XX"...
>
> Ashish,
>
> You're building a bit of a reputation for not giving enough
> information. The last time we talked about this, it took you three
> round trips to tell us you were trying to do this over PPP and that
> it worked on your local LAN. I don't care if your trying to hack into
> dialup connections but don't post half-truths when we know the code
> works. It's up to you to tell us what is uniqe about your setup that
> causes the code to fail. Just because you can do nbtstat doesn't mean
> that XP will respond to node status. It could be getting that information
> via other means. And if XP does not respond to node status on port 139
> you are SOL. Did you try setting jcifs.netbios.laddr or whatever it was
> that I said to do the last time?
>
> > >
> > >
> > >
> > >
> >
> > --
> > Samba Team -- http://www.samba.org/     -)-----   Christopher R. Hertel
> > jCIFS Team -- http://jcifs.samba.org/   -)-----   ubiqx development,
uninq.
> > ubiqx Team -- http://www.ubiqx.org/     -)-----   crh at ubiqx.mn.org
> > OnLineBook -- http://ubiqx.org/cifs/    -)-----   crh at ubiqx.org
> >
>
>
> --
> May The Source be with you.
>
>





More information about the jcifs mailing list