Buffer limit on server listings.
Christopher R. Hertel
crh at ubiqx.mn.org
Sat Mar 27 18:32:05 GMT 2004
I know about the NetrShareEnum() call (note the 'r'), which is an RPC call
that compensates for the 12-byte name limitation in share listings when
using the RAP NetShareEnum() call (no 'r').
In the older RAP category, there's the
- Outdated NetServerEnum() (no 'r', no '2') call. That was used, I
with early versions of the Browse Service.
- The NetServerEnum2() (with '2', no 'r'), which is still used today to
gather copies of the Browse List.
I have *not* heard of NetServerEnum3(), and when I google for it the top
reference is jCIFS code. I would love to see some doco or, better, a
trace. This would be a nifty thing to add to my browse service
documentation (as an annotation).
I have also never heard of a NetrServerEnum() RPC call, and googling turns
up nothing. Can you point me at any documentation?
Michael B Allen wrote:
> Rakesh Patel said:
> > When using smbclient -L to list servers from a browse master, the list
> > returned is not complete. Using "net view" under XP will return the full
> > listing for large domains, however smbclient does not properly handle
> > partial results as expected by the Windows environment.
> Smbclient uses NetServerEnum RAP function which is limited to 64K of data.
> XP is probably using the equivalent RPC call.
> > I looked at the code and attempted to utilize cli_receive_trans to cause
> > the next packet to be sent by the Windows browse master, but unfortunately
> > it simply errors out. Adjusting buffer sizes seems to be a futile
> > attempt,
> > as the packet is complete and processed properly, however there are no
> > examples of code in 3.0.2rc1 that check for a result code of ERRmoredata
> > and actually processing the next data to be sent. Attempting to use
> > cli_receive_trans and cli_send_trans proved futile.
> It's not a RAP transaction limitation -- it's a browser protocol limit.
> Either the NetrServerEnum RPC must be used or I hear there is a
> NetServerEnum3 that can get the secondary buffers.
> I'm not sure (someone will correct me if I'm wrong) but I beleive the
> rpcclient utility can perform the NetrServerEnum call. Perhaps you can use
> It would be a little smoother if smbclient/libsmbclient would just use the
> appropriate call depending on wheather or not the server supports rpcs but
> for some reason that doesn't appear to be the case.
"Implementing CIFS - the Common Internet FileSystem" ISBN: 013047116X
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 samba-technical