smb://

Christopher R. Hertel crh at nts.umn.edu
Thu Dec 28 22:43:15 GMT 2000


> > -----Original Message-----
> > From:	Kevin Colby [SMTP:kevinc at grainsystems.com]
> > 
> >    unwise      = "{" | "}" | "|" | "\" | "^" | "[" | "]" | "`"
> > 
> > 
> 	I think this is compelling information. Incedentally all
> 	concerns that have been raised about parsing are
> 	properly handled by the code I posted this morning.
> 
> 	Mike

Then I think we have reached consensus.  Somewhat informally:

  smb://[<server>/[service/[path/][file/]]]

  <server>  :== [[ntdomain;]user[:password]@]<srvname>[:port]

  <srvname> :== <NBTname> | <DNSname> | <IP>

  <NBTname> :== NetBIOS-name [.scope]
  <DNSname> :== hostname [.domain]
  <IP>      :== nnn.nnn.nnn.nnn

Notes:
- The syntax of an <NBTname> is almost identical to that of a <DNSname>.
  (A hostname can be more than 15 characters.)  The most common solution is
  to attempt NetBIOS name resolution first, and DNS resolution only if 
  NetBIOS name resolution fails.  DNS resolution should also work if the 
  name is represented as an IP address.

- Any of the following characters: { ';', ':', '@', '/' }, if they exist 
  within a username, ntdomain, password, or srvname must be escaped using 
  standard URL conventions.  The same is true for other URL metacharacters.

- The string "smb://" will result in a query to any local master browser.
  This can be accomplished by performing a broadcast Adapter Status Query
  for the NetBIOS name "01\02__MSBROWSE__\02\01", and then querying the 
  first responant for a list of available workgroups.  This is a 'best 
  guess' approach, but browsing is a best guess system. 

- Given the string "smb://<srvname>/" (note: no auth data), first assume 
  that this is a browser query, and attempt to locate the server list by 
  querying <srvname>#1D.  If this fails, then consider <srvname> to be a
  fileserver.  Attempt to connect to <srvname>#20 and collect a list of
  available services. 

- Any URL that contains auth data or a service field is considered to be 
  a fileserver.

- There is no indication in the URI whether B, P, M, or H mode NetBIOS 
  name resolution should be used.  Since the address of a WINS server 
  would have to be supplied separately, we can assume that the lookup 
  mode would be supplied in the same place.

Does this work for everyone?

Chris -)-----

-- 
Christopher R. Hertel -)-----                   University of Minnesota
crh at nts.umn.edu              Networking and Telecommunications Services

    Ideals are like stars; you will not succeed in touching them
    with your hands...you choose them as your guides, and following
    them you will reach your destiny.  --Carl Schultz





More information about the samba-technical mailing list