[OpenAFS-win32-devel] Queries to understand OpenAFS as a Remote File System

Bharat Kulkarni bharat.pict@gmail.com
Thu, 21 Jun 2007 11:27:25 +0530


------=_Part_97900_20209022.1182405445735
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

Hi,

As the name suggests the function "smb_ReceiveNegotiate" looks like to
choose a dialect for communication between SMB client/server.
>From the snippet as follows

if (strcmp("PC NETWORK PROGRAM 1.0", namep+1) == 0) {
            coreProtoIndex = tcounter;
        }
        else if (smb_useV3 && strcmp("LM1.2X002", namep+1) == 0) {
            v3ProtoIndex = tcounter;
        }
        else if (smb_useV3 && strcmp("NT LM 0.12", namep+1) == 0) {
            NTProtoIndex = tcounter;
        }
        else if (smb_useV3 && strcmp("SMB 2.001", namep+1) == 0) {
            VistaProtoIndex = tcounter;
        }

Because I have read in CIFS documents that some of the dialects are "PC
NETWORK PROGRAM 1.0", "MICROSOFT NETWORKS 3.0", "DOS LM1.2X002", "DOS
LANMAN2.1", "Windows for Workgroups 3.1a", "NT LM 0.12".

So is SMB 2.001 is a new dialect necessary  for VISTA?

Also could you kindly tell me what is the role of 'kVista_WLA_MAC' and
'kWLA_MAC'?

Thanks and Regards,
Bharat.

On 6/6/07, Jeffrey Altman <jaltman@secure-endpoints.com> wrote:
>
> The entire SMB/CIFS server is located in the src/WINNT/afs/smb*.[ch]
> files.  Searching the files for keywords such as "receive", "register",
> "listen", etc. should point you in the right direction.
>
> Jeffrey Altman
> Secure Endpoints Inc.
>
>
> Bharat Kulkarni wrote:
> > Hi,
> >
> > Thanks for your reply,
> >
> > I was going through the OpenAFS code, but I am unable to figure out
> > where exactly in the code ( which function of )  OpenAFS is receiving
> > SMB packets from the CIFS client.?
> >
> > Is OpenAFS listening on any port ??  relatively I was unable to locate
> > any listening on ports like 138 or 139.
> >
> > Can you kindly help me with these queries.
> >
> > Thanks and Regards,
> > Bharat.
> >
> > On 6/4/07, *Jeffrey Altman* <jaltman@secure-endpoints.com
> > <mailto: jaltman@secure-endpoints.com>> wrote:
> >
> >     OpenAFS is a user mode service that registers its own NetBIOS name.
> >     It is not a kernel service and is not a Windows remote file system.
> >     The CIFS client talks to OpenAFS exactly the same way it talks to a
> >     Windows file share or Samba server.
> >
> >     Jeffrey Altman
> >     Secure Endpoints Inc.
> >
> >     Bharat Kulkarni wrote:
> >     > Hi,
> >     >
> >     > Thanks a lot your responses.
> >     >
> >     > I have some further queries,
> >     >
> >     > Can you kindly tell me, how does the Windows CIFS client using
> >     SMB, talk
> >     > to OpenAFS? Have you registered any DLL or is the entry put in the
>
> >     > registry. How does OpenAFS accept the SMB packets from Windows and
> >     carry
> >     > on further tasks. What role does NetBios play?
> >     >
> >     > Does MPR.DLL and MUP.sys come into the picture to make OpenAFS
> >     work as a
> >     > n/w redirector when operations are carried out on the drive
> mapped? As
> >     > per Vista WDK Docs, MUP.sys is now used even when a mapped drive
> (Not
> >     > local) is accessed.. Have you also made OpenAFS changes to work
> >     > according to Vista guidelines?
> >     >
> >     > I also have a query regarding the way in which command prompt
> >     executes a
> >     > request as compared to windows explorer. What i mean is, does it
> >     follow
> >     > the same path when we access OpenAFS drive using explorer and when
> we
> >     > access the drive from command prompt? Is it the code path for both
>
> >     ways
> >     > of accessing the drive? Does MUP.sys play any role in this? Are
> you
> >     > registering OpenAFS with MUP.sys to work as per the Vista Docs?
> >     >
> >     > Can you also kindly guide me as to how I can further understand
> the
> >     > working of OpenAFS in terms of the SMB protocol, and communication
> >     > between OpenAFS and windows
> >     >
> >     > Thanks and Regards,
> >     > Bharat.
> >
> >
>
>

------=_Part_97900_20209022.1182405445735
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

<span class="gmail_quote"><br></span>Hi,<br><br>As the name suggests the function &quot;smb_ReceiveNegotiate&quot; looks like to choose a dialect for communication between SMB client/server.<br>From the snippet as follows 
<br><br>if (strcmp(&quot;PC NETWORK PROGRAM 
1.0&quot;, namep+1) == 0) {<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; coreProtoIndex = tcounter;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; else if (smb_useV3 &amp;&amp; strcmp(&quot;LM1.2X002&quot;, namep+1) == 0) {<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; v3ProtoIndex = tcounter;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; else if (smb_useV3 &amp;&amp; strcmp(&quot;NT LM 0.12&quot;, namep+1) == 0) {<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; NTProtoIndex = tcounter;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; else if (smb_useV3 &amp;&amp; strcmp(&quot;SMB 2.001&quot;, namep+1) == 0) {
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; VistaProtoIndex = tcounter;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<br><br>Because I have read in CIFS documents that some of the dialects are &quot;PC NETWORK PROGRAM 1.0&quot;, &quot;MICROSOFT NETWORKS 3.0&quot;, &quot;DOS LM1.2X002
&quot;, &quot;DOS LANMAN2.1&quot;, &quot;Windows for Workgroups 
3.1a&quot;, &quot;NT LM 0.12&quot;.<br>&nbsp;<br>So is SMB 2.001 is a new dialect necessary&nbsp; for VISTA? <br><br>Also could you kindly tell me what is the role of &#39;kVista_WLA_MAC&#39; and &#39;kWLA_MAC&#39;?<br><br>Thanks and Regards,
<br><span class="sg">
Bharat.</span><div><span class="e" id="q_1134404c1e44a712_2"><br> <br><div><span class="gmail_quote">On 6/6/07, <b class="gmail_sendername">Jeffrey Altman</b> &lt;<a href="mailto:jaltman@secure-endpoints.com" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">
jaltman@secure-endpoints.com</a>&gt; wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
The entire SMB/CIFS server is located in the src/WINNT/afs/smb*.[ch]<br>files.&nbsp;&nbsp;Searching the files for keywords such as &quot;receive&quot;, &quot;register&quot;,<br>&quot;listen&quot;, etc. should point you in the right direction.
<br><br>Jeffrey Altman<br>Secure Endpoints Inc.<br><br><br>Bharat Kulkarni wrote:<br>&gt; Hi,<br>&gt;<br>&gt; Thanks for your reply,<br>&gt;<br>&gt; I was going through the OpenAFS code, but I am unable to figure out<br>
&gt; where exactly in the code ( which function of )&nbsp;&nbsp;OpenAFS is receiving
<br>&gt; SMB packets from the CIFS client.?<br>&gt;<br>&gt; Is OpenAFS listening on any port ??&nbsp;&nbsp;relatively I was unable to locate<br>&gt; any listening on ports like 138 or 139.<br>&gt;<br>&gt; Can you kindly help me with these queries.
<br>&gt;<br>&gt; Thanks and Regards,<br>&gt; Bharat.<br>&gt;<br>&gt; On 6/4/07, *Jeffrey Altman* &lt;<a href="mailto:jaltman@secure-endpoints.com" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">jaltman@secure-endpoints.com
</a><br>&gt; &lt;mailto:<a href="mailto:jaltman@secure-endpoints.com" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">
jaltman@secure-endpoints.com</a>&gt;&gt; wrote:<br>&gt;<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp; OpenAFS is a user mode service that registers its own NetBIOS name.<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp; It is not a kernel service and is not a Windows remote file system.<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp; The CIFS client talks to OpenAFS exactly the same way it talks to a
<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp; Windows file share or Samba server.<br>&gt;<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp; Jeffrey Altman<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp; Secure Endpoints Inc.<br>&gt;<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp; Bharat Kulkarni wrote:<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp; &gt; Hi,<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp; &gt;<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp; &gt; Thanks a lot your responses.
<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp; &gt;<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp; &gt; I have some further queries,<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp; &gt;<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp; &gt; Can you kindly tell me, how does the Windows CIFS client using<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp; SMB, talk<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp; &gt; to OpenAFS? Have you registered any DLL or is the entry put in the
<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp; &gt; registry. How does OpenAFS accept the SMB packets from Windows and<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp; carry<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp; &gt; on further tasks. What role does NetBios play?<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp; &gt;<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp; &gt; Does MPR.DLL and MUP.sys

 come into the picture to make OpenAFS<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp; work as a<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp; &gt; n/w redirector when operations are carried out on the drive mapped? As<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp; &gt; per Vista WDK Docs, MUP.sys is now used even when a mapped drive (Not
<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp; &gt; local) is accessed.. Have you also made OpenAFS changes to work<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp; &gt; according to Vista guidelines?<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp; &gt;<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp; &gt; I also have a query regarding the way in which command prompt
<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp; executes a<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp; &gt; request as compared to windows explorer. What i mean is, does it<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp; follow<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp; &gt; the same path when we access OpenAFS drive using explorer and when we<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp; &gt; access the drive from command prompt? Is it the code path for both
<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp; ways<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp; &gt; of accessing the drive? Does MUP.sys play any role in this? Are you<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp; &gt; registering OpenAFS with MUP.sys to work as per the Vista Docs?<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp; &gt;<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp; &gt; Can you also kindly guide me as to how I can further understand the
<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp; &gt; working of OpenAFS in terms of the SMB protocol, and communication<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp; &gt; between OpenAFS and windows<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp; &gt;<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp; &gt; Thanks and Regards,<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp; &gt; Bharat.<br>&gt;<br>
&gt;
<br><br></blockquote></div><br>
</span></div>

------=_Part_97900_20209022.1182405445735--