Home » Archimedes archive » Acorn User » AU 1997-02 A.adf » !Voyager/Stack/StartSLIP

!Voyager/Stack/StartSLIP

This website contains an archive of files for the Acorn Electron, BBC Micro, Acorn Archimedes, Commodore 16 and Commodore 64 computers, which Dominic Ford has rescued from his private collection of floppy disks and cassettes.

Some of these files were originally commercial releases in the 1980s and 1990s, but they are now widely available online. I assume that copyright over them is no longer being asserted. If you own the copyright and would like files to be removed, please contact me.

Tape/disk: Home » Archimedes archive » Acorn User » AU 1997-02 A.adf
Filename: !Voyager/Stack/StartSLIP
Read OK:
File size: 049D bytes
Load address: FFFFEB47
Exec address: 21B9A626
File contents
RMRun <Obey$Dir>.SLIPDriver

| Determine if we have the INetDB module, and load it if not

Set VTi$HasINetDB 1
RMEnsure INetDB 0 Set VTi$HasINetDB 0
If "<VTi$HasINetDB>"="0" Then RMRun <Obey$Dir>.INetDB

slattach +c <VTi$Driver> <VTi$Port> <VTi$Speed>

| The next two are for ethernet connections

If "<VTi$LoadVStack>"="0" OR "<VTi$LoadVStack>"="2" Then /<Obey$Dir>.GetRoute
If "<VTi$LoadVStack>"="0" OR "<VTi$LoadVStack>"="2" Then ifconfig sl0 inet <VTiIP$Address> <VTiIP$Router> up

| And then two different flavours of Internet (Internet 4.xx, Internet 5.xx)

If "<VTi$LoadVStack>"="0" Then route -e add net default <VTiIP$Router> 1

If "<VTi$LoadVStack>"="2" Then Set Alias$VTiSetRoute route -e add default <VTiIP$Router>
If "<VTi$LoadVStack>"="2" Then VTiSetRoute
If "<VTi$LoadVStack>"="2" Then Unset Alias$VTiSetRoute

| The next four are for normal VStack connections

If "<VTi$LoadVStack>"="1" Then ifconfig sl0 inet <VTiIP$Address> up
If "<VTi$LoadVStack>"="1" Then ifconfig lo0 inet 127.0.0.1 up
If "<VTi$LoadVStack>"="1" Then route add default <VTiIP$Address> 0
If "<VTi$LoadVStack>"="1" Then route add <VTiIP$Address> 127.0.0.1 0

| Flush the DNS cache

NSCache_Flush
00000000  52 4d 52 75 6e 20 3c 4f  62 65 79 24 44 69 72 3e  |RMRun <Obey$Dir>|
00000010  2e 53 4c 49 50 44 72 69  76 65 72 0a 0a 7c 20 44  |.SLIPDriver..| D|
00000020  65 74 65 72 6d 69 6e 65  20 69 66 20 77 65 20 68  |etermine if we h|
00000030  61 76 65 20 74 68 65 20  49 4e 65 74 44 42 20 6d  |ave the INetDB m|
00000040  6f 64 75 6c 65 2c 20 61  6e 64 20 6c 6f 61 64 20  |odule, and load |
00000050  69 74 20 69 66 20 6e 6f  74 0a 0a 53 65 74 20 56  |it if not..Set V|
00000060  54 69 24 48 61 73 49 4e  65 74 44 42 20 31 0a 52  |Ti$HasINetDB 1.R|
00000070  4d 45 6e 73 75 72 65 20  49 4e 65 74 44 42 20 30  |MEnsure INetDB 0|
00000080  20 53 65 74 20 56 54 69  24 48 61 73 49 4e 65 74  | Set VTi$HasINet|
00000090  44 42 20 30 0a 49 66 20  22 3c 56 54 69 24 48 61  |DB 0.If "<VTi$Ha|
000000a0  73 49 4e 65 74 44 42 3e  22 3d 22 30 22 20 54 68  |sINetDB>"="0" Th|
000000b0  65 6e 20 52 4d 52 75 6e  20 3c 4f 62 65 79 24 44  |en RMRun <Obey$D|
000000c0  69 72 3e 2e 49 4e 65 74  44 42 0a 0a 73 6c 61 74  |ir>.INetDB..slat|
000000d0  74 61 63 68 20 2b 63 20  3c 56 54 69 24 44 72 69  |tach +c <VTi$Dri|
000000e0  76 65 72 3e 20 3c 56 54  69 24 50 6f 72 74 3e 20  |ver> <VTi$Port> |
000000f0  3c 56 54 69 24 53 70 65  65 64 3e 0a 0a 7c 20 54  |<VTi$Speed>..| T|
00000100  68 65 20 6e 65 78 74 20  74 77 6f 20 61 72 65 20  |he next two are |
00000110  66 6f 72 20 65 74 68 65  72 6e 65 74 20 63 6f 6e  |for ethernet con|
00000120  6e 65 63 74 69 6f 6e 73  0a 0a 49 66 20 22 3c 56  |nections..If "<V|
00000130  54 69 24 4c 6f 61 64 56  53 74 61 63 6b 3e 22 3d  |Ti$LoadVStack>"=|
00000140  22 30 22 20 4f 52 20 22  3c 56 54 69 24 4c 6f 61  |"0" OR "<VTi$Loa|
00000150  64 56 53 74 61 63 6b 3e  22 3d 22 32 22 20 54 68  |dVStack>"="2" Th|
00000160  65 6e 20 2f 3c 4f 62 65  79 24 44 69 72 3e 2e 47  |en /<Obey$Dir>.G|
00000170  65 74 52 6f 75 74 65 0a  49 66 20 22 3c 56 54 69  |etRoute.If "<VTi|
00000180  24 4c 6f 61 64 56 53 74  61 63 6b 3e 22 3d 22 30  |$LoadVStack>"="0|
00000190  22 20 4f 52 20 22 3c 56  54 69 24 4c 6f 61 64 56  |" OR "<VTi$LoadV|
000001a0  53 74 61 63 6b 3e 22 3d  22 32 22 20 54 68 65 6e  |Stack>"="2" Then|
000001b0  20 69 66 63 6f 6e 66 69  67 20 73 6c 30 20 69 6e  | ifconfig sl0 in|
000001c0  65 74 20 3c 56 54 69 49  50 24 41 64 64 72 65 73  |et <VTiIP$Addres|
000001d0  73 3e 20 3c 56 54 69 49  50 24 52 6f 75 74 65 72  |s> <VTiIP$Router|
000001e0  3e 20 75 70 0a 0a 7c 20  41 6e 64 20 74 68 65 6e  |> up..| And then|
000001f0  20 74 77 6f 20 64 69 66  66 65 72 65 6e 74 20 66  | two different f|
00000200  6c 61 76 6f 75 72 73 20  6f 66 20 49 6e 74 65 72  |lavours of Inter|
00000210  6e 65 74 20 28 49 6e 74  65 72 6e 65 74 20 34 2e  |net (Internet 4.|
00000220  78 78 2c 20 49 6e 74 65  72 6e 65 74 20 35 2e 78  |xx, Internet 5.x|
00000230  78 29 0a 0a 49 66 20 22  3c 56 54 69 24 4c 6f 61  |x)..If "<VTi$Loa|
00000240  64 56 53 74 61 63 6b 3e  22 3d 22 30 22 20 54 68  |dVStack>"="0" Th|
00000250  65 6e 20 72 6f 75 74 65  20 2d 65 20 61 64 64 20  |en route -e add |
00000260  6e 65 74 20 64 65 66 61  75 6c 74 20 3c 56 54 69  |net default <VTi|
00000270  49 50 24 52 6f 75 74 65  72 3e 20 31 0a 0a 49 66  |IP$Router> 1..If|
00000280  20 22 3c 56 54 69 24 4c  6f 61 64 56 53 74 61 63  | "<VTi$LoadVStac|
00000290  6b 3e 22 3d 22 32 22 20  54 68 65 6e 20 53 65 74  |k>"="2" Then Set|
000002a0  20 41 6c 69 61 73 24 56  54 69 53 65 74 52 6f 75  | Alias$VTiSetRou|
000002b0  74 65 20 72 6f 75 74 65  20 2d 65 20 61 64 64 20  |te route -e add |
000002c0  64 65 66 61 75 6c 74 20  3c 56 54 69 49 50 24 52  |default <VTiIP$R|
000002d0  6f 75 74 65 72 3e 0a 49  66 20 22 3c 56 54 69 24  |outer>.If "<VTi$|
000002e0  4c 6f 61 64 56 53 74 61  63 6b 3e 22 3d 22 32 22  |LoadVStack>"="2"|
000002f0  20 54 68 65 6e 20 56 54  69 53 65 74 52 6f 75 74  | Then VTiSetRout|
00000300  65 0a 49 66 20 22 3c 56  54 69 24 4c 6f 61 64 56  |e.If "<VTi$LoadV|
00000310  53 74 61 63 6b 3e 22 3d  22 32 22 20 54 68 65 6e  |Stack>"="2" Then|
00000320  20 55 6e 73 65 74 20 41  6c 69 61 73 24 56 54 69  | Unset Alias$VTi|
00000330  53 65 74 52 6f 75 74 65  0a 0a 7c 20 54 68 65 20  |SetRoute..| The |
00000340  6e 65 78 74 20 66 6f 75  72 20 61 72 65 20 66 6f  |next four are fo|
00000350  72 20 6e 6f 72 6d 61 6c  20 56 53 74 61 63 6b 20  |r normal VStack |
00000360  63 6f 6e 6e 65 63 74 69  6f 6e 73 0a 0a 49 66 20  |connections..If |
00000370  22 3c 56 54 69 24 4c 6f  61 64 56 53 74 61 63 6b  |"<VTi$LoadVStack|
00000380  3e 22 3d 22 31 22 20 54  68 65 6e 20 69 66 63 6f  |>"="1" Then ifco|
00000390  6e 66 69 67 20 73 6c 30  20 69 6e 65 74 20 3c 56  |nfig sl0 inet <V|
000003a0  54 69 49 50 24 41 64 64  72 65 73 73 3e 20 75 70  |TiIP$Address> up|
000003b0  0a 49 66 20 22 3c 56 54  69 24 4c 6f 61 64 56 53  |.If "<VTi$LoadVS|
000003c0  74 61 63 6b 3e 22 3d 22  31 22 20 54 68 65 6e 20  |tack>"="1" Then |
000003d0  69 66 63 6f 6e 66 69 67  20 6c 6f 30 20 69 6e 65  |ifconfig lo0 ine|
000003e0  74 20 31 32 37 2e 30 2e  30 2e 31 20 75 70 0a 49  |t 127.0.0.1 up.I|
000003f0  66 20 22 3c 56 54 69 24  4c 6f 61 64 56 53 74 61  |f "<VTi$LoadVSta|
00000400  63 6b 3e 22 3d 22 31 22  20 54 68 65 6e 20 72 6f  |ck>"="1" Then ro|
00000410  75 74 65 20 61 64 64 20  64 65 66 61 75 6c 74 20  |ute add default |
00000420  3c 56 54 69 49 50 24 41  64 64 72 65 73 73 3e 20  |<VTiIP$Address> |
00000430  30 0a 49 66 20 22 3c 56  54 69 24 4c 6f 61 64 56  |0.If "<VTi$LoadV|
00000440  53 74 61 63 6b 3e 22 3d  22 31 22 20 54 68 65 6e  |Stack>"="1" Then|
00000450  20 72 6f 75 74 65 20 61  64 64 20 3c 56 54 69 49  | route add <VTiI|
00000460  50 24 41 64 64 72 65 73  73 3e 20 31 32 37 2e 30  |P$Address> 127.0|
00000470  2e 30 2e 31 20 30 0a 0a  7c 20 46 6c 75 73 68 20  |.0.1 0..| Flush |
00000480  74 68 65 20 44 4e 53 20  63 61 63 68 65 0a 0a 4e  |the DNS cache..N|
00000490  53 43 61 63 68 65 5f 46  6c 75 73 68 0a           |SCache_Flush.|
0000049d