|
Re: Batching command in CIFS: msg#00134network.samba.java
On Fri, Jan 28, 2005 at 01:15:33AM +0800, Cellina Lin wrote: > Thanks. I looked into the internal API, but had one problem for now.... > The method, > SmbComReadAndX( int fid, long offset, int maxCount, ServerMessageBlock andx ), > needs fid as parameter, but it seems that fid is available only after > sending the SmbComNTCreateAndX and thus get the response from > SmbComNTCreateAndXResponse....... > > What should I put in the first parameter of SmbComReadAndX() call if I > want to batch it with SmbComNTCreateAndX ()? Try zero. As you correctly point out, there is no FID until the first chained command completes. That's okay, though, because the whole point of the AndX is to avoid a round-trip back the client and then to the server again. This is done by using values generated by the first chained request to fill in the blanks of the second request. Consider the SMB_COM_SESSION_SETUP_ANDX + SMB_COM_TREE_CONNECT_ANDX coimbination. Assuming user-level authentication, a valid UID is required for the second command--the SMB_COM_TREE_CONNECT_ANDX--to proceed. The UID is generated as a result of the first command, the SMB_COM_SESSION_SETUP_ANDX, and is passed along to the second. I'm not promising that it will work in your case. If you've seen it on the wire, then you would just use whatever you saw in the trace (that is, do what Windows does). If you haven't seen it on the wire, it may be because it's a combination that Microsoft never implemented. If they haven't implement it, then they probably haven't tested it. ...keep in mind that I'm the theory guy. Chris -)----- PS. See: http://ubiqx.org/cifs/SMB.html#SMB.4.4 -- "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@xxxxxxxxxxxx OnLineBook -- http://ubiqx.org/cifs/ -)----- crh@xxxxxxxxx |
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | Re: Hung threads accessing domain controller: 00134, Scott Christensen |
|---|---|
| Next by Date: | soft datcmtm: 00134, Damien Farley |
| Previous by Thread: | Re: Batching command in CIFSi: 00134, Cellina Lin |
| Next by Thread: | Re: Batching command in CIFS: 00134, Michael B Allen |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |