| !Run file for !LanMan98

Set LanMan98$Dir <Obey$Dir>
Set File$Type_069 LM98Link
Set LM98$Path <LanMan98$Dir>.

| Discovered shares are kept here.  It ships in the archive, but an
| unarchiver is not obliged to create a directory with nothing in it,
| so make sure of it.  Creating one that exists does nothing.
CDir <LanMan98$Dir>.Discs

Set LM98$sprites 5Sprites
RMEnsure Utilitymodule 5.00 Set LM98$sprites !Sprites
IconSprites <Obey$Dir>.<LM98$Sprites>

| Uncomment the following line and insert the appropriate address to
| inform LanMan98 of the location of your name server.
|
|Set LanMan98$NameServer <IP address of NBNS or WINS server>

| Uncomment the following line to make hidden files visible through LanMan98
|
|Set LanMan98$ShowHidden ""

| Uncomment the following line if you wish to use Fresco while your
| !Scrap directory is held on a remote server and accessed via LanMan98
|
|Set LanMan98$CallBackPatch ""

| Uncomment the following line to change the default file type used by LanMan98
|
|Set LanMan98$DefaultType FFF

| The following line tells LanMan98 to use raw read requests for speed if the
| server claims to support it. Some NAS, and Windows Vista claim to support
| it, but actually fail to do so. If you have problems with your connections
| comment the following line out to make LanMan98 avoid raw reads in all
| cases.
Set LanMan98$ReadRaw ""

| ---------------------------------------------------------------------
| Settings added in this version.  All are commented out: none of them is
| needed for normal use, and each is here for a server that needs talking
| to differently.
|
| The port to connect on.  Unset, connections try 445 and fall back to
| 139, which is what suits a server that no longer runs NetBIOS over TCP.
| A single connection can name its own port instead, as SERVER<addr:port>
| or SERVER<:port> after the server name.
|
|Set LanMan98$Port 139

| Put NetBIOS name lookup back in front of the naming service.  Only for a
| network where a short name means one thing to each of them.
|
|Set LanMan98$NetBIOSFirst ""

| The domain to authenticate in.  Empty suits a standalone server or a NAS.
| Whatever is set here is both sent to the server and folded into the
| password response, which is how it has to be.
|
|Set LanMan98$Domain WORKGROUP

| SMB2 is tried first and the older protocol only where a server will not
| answer it.  The highest both ends know is used, today usually SMB 3.0.2.
| Nothing needs setting for that.  These two change it:
|
|Set LanMan98$NoSMB2 ""       | try the older protocol first instead
|Set LanMan98$SMB2Only ""     | never fall back to it, for finding out
|                             | what a server is really doing

| Hold the connection to one level and no other.  Whichever is set is
| what gets used, or the connection fails saying why - nothing falls
| back and hides which level was the one that worked.  For finding that
| out; none is needed to connect normally.
|
|Set LanMan98$SMB3 ""         | SMB 3.0 and 3.0.2 only
|Set LanMan98$SMB2 ""         | SMB 2.0.2 and 2.1 only
|Set LanMan98$SMB1 ""         | the old protocol only, no SMB2 offered

| Sign every message, in whichever protocol is in use.  A server that
| demands signing is signed to whether this is set or not; this is for
| turning it on with a server that would have settled for none.  It costs
| a digest over every byte transferred, so it is off by default.
|
|Set LanMan98$Sign ""

| Each of these puts one thing back the way it was, for a server that
| handles the newer form badly:
|
|Set LanMan98$NoNTStatus ""    | ask for DOS-style errors, not NT status
|Set LanMan98$NTLMv1 ""        | skip NTLMv2 and use the old password scheme
|Set LanMan98$FindStandard ""  | ask for DOS-format dates, not the NT ones
|Set LanMan98$NoReadX ""       | use the older, smaller transfers
|Set LanMan98$NoExtSec ""      | put the password in the request, old style

| For reporting a server that will not work.  Set it to a directory path,
| with a trailing dot, and every message sent and received is written into
| that directory as it goes - Out1, In1, Out2 and so on - which is enough
| for somebody else to see what the server actually said.  It writes a file
| per packet, so turn it off again afterwards.
|
|Set LanMan98$PacketDump ADFS::HardDisc4.$.lmdump.

| For reporting a fault that never reaches the network - a file that
| opens and then will not read, say, where a packet capture simply
| stops.  Set it to a file and an account of what the connection did is
| written there: what was connected to, the dialect settled on, the
| transfer sizes offered and the smaller ones used, every file opened
| with its size, every read and write asked for, a line per message each
| way, and any error as it is raised, with its text and number.  It
| appends, and it slows transfers down, so turn it off afterwards.
|
|Set LanMan98$Log ADFS::HardDisc4.$.lmlog

| Servers are looked for by asking the whole network at once.  Where a
| network will not carry that, this names one machine to ask instead.
|
|Set LanMan98$DiscoverAddr 192.168.1.10

| Across anything slower or further away than a local network, these
| three are worth raising.  An idle connection is prodded every hundred
| seconds by default, which a NAT or firewall on the path may well forget
| sooner than; half a minute sits inside the usual mapping lifetimes and
| costs one echo each time.  The other two are how long to wait for an
| answer and for a circuit, in centiseconds.
|
|Set LanMan98$KeepAlive 3000
|Set LanMan98$Timeout 6000
|Set LanMan98$ConnectTimeout 3000

| Traffic is encrypted when the server asks for it, which needs SMB 3.
| Uncomment the following line to insist on it always, so that a
| connection which cannot be encrypted fails rather than going ahead in
| clear.  Signing alone does not hide anything.
|
|Set LanMan98$Encrypt ""

| The network is asked what is on it every five minutes, so a server
| switched on after the desktop started is noticed without anybody
| looking for it, and its name is put in LanMan98$New for the Filer to
| show.  It costs one packet and asks nothing of the servers themselves.
| Uncomment the following line to change the interval, in centiseconds,
| or set it to 0 to turn the whole thing off.
|
|Set LanMan98$SweepPeriod 30000

| The servers already announced are remembered here between runs, so a
| reboot does not announce the whole network over again.  The default is
| <Choices$Write>.LanMan98Seen.
|
|Set LanMan98$SeenFile <Choices$Write>.LanMan98Seen

| The network is asked what is on it three ways: the multicast question
| that Samba, a Mac and most NAS boxes answer; WS-Discovery, which is what
| Windows answers; and the workgroup's browse list, which is the only one
| that reaches past the local wire.  Each of these leaves one of them out.
| The browse list needs SMB1 at the machine that keeps it and costs a logon,
| so it is only ever asked by *Discover98 and *Servers98, never on a timer.
|
|Set LanMan98$NoMDNS ""
|Set LanMan98$NoWSD ""
|Set LanMan98$NoBrowse ""

| Which workgroup's master browser to ask for that browse list.  Falls back
| to LanMan98$Domain, and then to WORKGROUP.
|
|Set LanMan98$Workgroup WORKGROUP

| An open Filer window is refreshed when somebody else changes the
| directory it is showing, by re-reading it every five seconds and
| comparing.  This sets that interval in centiseconds; 0 turns it off.
|
|Set LanMan98$WatchPeriod 500
| ---------------------------------------------------------------------

RMEnsure LanMan98 3.00 RMLoad <LanMan98$Dir>.LanMan98 { > null: }
RMEnsure LanMan98 0 Error "Can't find LanMan98 module"
Obey <LanMan98$Dir>.Mappings

WimpSlot -min 64K -max 64K
<LanMan98$Dir>.!Filer
