[jcifs] problem with NbtAddress.getAllByAddress()

ashish ashishn at ntechra.com
Tue May 14 07:24:14 EST 2002


In that C program,
status request packet is like this

#define STATUS_REQ
"\xa2\x48\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x20\x43\x4b\x41\x41\x41
\x41\x41\x41\x41\x41\x41\x41\x41\x41\x41\x41\x41\x41\x41\x41\x41\x41\x41\x41
\x41\x41\x41\x41
\x41\x41\x41\x41\x00\x00\x21\x00\x01"

this seems to work...

----- Original Message -----
From: ashish <ashishn at ntechra.com>
To: <crh at ubiqx.mn.org>
Cc: <jcifs at samba.org>
Sent: Monday, May 13, 2002 1:54 PM
Subject: Re: [jcifs] problem with NbtAddress.getAllByAddress()


> Ok, here's full dump.
> Yeah, actually that IP is not part of my local subnet.So I am forced not
to
> divulge the IP..
> I am not sending this query to a broadcast address.
> destination IP is a unicast address.
> Interestingly, I have written a small program in C which does nbtstat and
it
> is able to get all the info.
>
>
>
> ETHER:  ----- Ether Header -----
> ETHER:
> ETHER:  Packet 30 arrived at 11:26:8.93
> ETHER:  Packet size = 92 bytes
> ETHER:  Destination = 0:50:54:ff:88:64,
> ETHER:  Source      = 0:3:ba:c:ac:e,
> ETHER:  Ethertype = 0800 (IP)
> ETHER:
> IP:   ----- IP Header -----
> IP:
> IP:   Version = 4
> IP:   Header length = 20 bytes
> IP:   Type of service = 0x00
> IP:         xxx. .... = 0 (precedence)
> IP:         ...0 .... = normal delay
> IP:         .... 0... = normal throughput
> IP:         .... .0.. = normal reliability
> IP:   Total length = 78 bytes
> IP:   Identification = 9921
> IP:   Flags = 0x4
> IP:         .1.. .... = do not fragment
> IP:         ..0. .... = last fragment
> IP:   Fragment offset = 0 bytes
> IP:   Time to live = 255 seconds/hops
> IP:   Protocol = 17 (UDP)
> IP:   Header checksum = 8768
> IP:   Source address = 10.0.100.79, sunblade
> IP:   Destination address = XX.XX.XX, XX.XX.XX
> IP:   No options
> IP:
> UDP:  ----- UDP Header -----
> UDP:
> UDP:  Source port = 61764
> UDP:  Destination port = 137 (NBNS)
> UDP:  Length = 58
> UDP:  Checksum = 00EA
> UDP:
> NBT:  ----- Netbios Name Service Header -----
> NBT:
> NBT:  Type = Query Request
> NBT:  Status = Success
> NBT:  Transaction ID = 0x0004
> NBT:  Flags Summary = 0x0110
> NBT:     - Broadcast
> NBT:     - Recursion Desired
> NBT:  Question count = 1
> NBT:  Answer Count = 0
> NBT:  Name Service Count = 0
> NBT:  Additional Record Count = 0
> NBT:  Question Name = *..............[0]
> NBT:  Question Type = 0x0021
> NBT:  Question Class = 0x0001
> NBT:
> ----- Original Message -----
> From: Christopher R.Hertel <crh at ubiqx.mn.org>
> To: ashish <ashishn at ntechra.com>
> Cc: <jcifs at samba.org>
> Sent: Monday, May 13, 2002 12:33 PM
> Subject: Re: [jcifs] problem with NbtAddress.getAllByAddress()
>
>
> > Ashish,
> >
> > Mike has already talked about the amount of information required to
debug
> > a problem.  It seems that you are very sensitive about privacy, which I
> > can understand, but it is *very* difficult to debug problems without
> > enough information to do comparisons.
> >
> > In the dump below, the only potential problem I see is that the B
> > (broadcast) bit is set, which is typically not the case for Node Status
> > queries.  On the other hand, I'm not sure that it makes any difference.
> > I tested against a pair of W/95 boxes at home and did not have any
> > trouble.  I don't have W/XP to test against.
> >
> > Are you sending this query to a broadcast address?  Have you tried
sending
> > unicast queries using jCIFS?  If so, any difference?
> >
> > I know you don't want to give out IP addresses, but that is a bit of a
> > problem too.  I can't see the IP header to know if you are sending to a
> > broadcast address.  This is really very confusing.
> >
> > The other thing I would look for is a trace of the nbtstat exchange.  I
> > can't see any differences (other than the B bit) between the trace below
> > and what I would expect.  It would be worth-while to see what nbtstat
> > sends in order to see if there *are* any differences.
> >
> > Chris -)-----
> >
> > On Mon, May 13, 2002 at 11:48:34AM -0700, ashish wrote:
> > > Ok, here's sniffer output... when Node Status Request is send.
> > > And I don't see any reply for this request from the remote
machine......
> > >
> > >
> > >
> > > UDP:  ----- UDP Header -----
> > > UDP:
> > > UDP:  Source port = 61764
> > > UDP:  Destination port = 137 (NBNS)
> > > UDP:  Length = 58
> > > UDP:  Checksum = 00EA
> > > UDP:
> > > NBT:  ----- Netbios Name Service Header -----
> > > NBT:
> > > NBT:  Type = Query Request
> > > NBT:  Status = Success
> > > NBT:  Transaction ID = 0x0004
> > > NBT:  Flags Summary = 0x0110
> > > NBT:     - Broadcast
> > > NBT:     - Recursion Desired
> > > NBT:  Question count = 1
> > > NBT:  Answer Count = 0
> > > NBT:  Name Service Count = 0
> > > NBT:  Additional Record Count = 0
> > > NBT:  Question Name = *..............[0]
> > > NBT:  Question Type = 0x0021
> > > NBT:  Question Class = 0x0001
> > > NBT:
> >
> > --
> > 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
> >
>





More information about the jcifs mailing list