1. Fixed VS6 lat/long in prefix_data and wpxloc.raw
[spider.git] / html / connect.html
1 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
2 <html>
3   <head>
4     <title>Connecting to other Clusters</title>
5   </head>
6
7   <body>
8     <h2>Connecting to other Clusters</h2>
9
10     <hr>
11     <address><a href="mailto:djk@tobit.co.uk">Dirk Koopman G1TLH</a></address>
12         <p>
13 <!-- Created: Sun Dec 13 20:25:14 GMT 1998 -->
14 <!-- hhmts start -->
15 Last modified: Sun Dec 13 22:31:33 GMT 1998
16 <!-- hhmts end -->
17         <p>At the moment, anybody can connect inwards at any time from outside, either by ax25 or by
18           telnet (assuming you have followed the instructions in <a href="install.html">installation</a>
19           instructions. However, in order to connect outwards, you will need to create <em>connect</em> scripts.
20
21         <p><em>Connect</em> scripts live in the <tt>/spider/connect</tt> directory and are simple ascii scripts
22           that are written using a normal editor. There are a couple of examples in the issue directory.
23
24         <p>Here are a couple of basic types, first a telnet connection:-
25         <pre>
26     timeout 15
27     # this is a comment
28     connect telnet dirkl.tobit.co.uk
29     'login' 'gb7djk'
30     'word' 'gb7djk'
31     client /usr/bin/perl /spider/perl/client.pl gb7djk-1 telnet
32         </pre>
33         <p>and an ax25 example:-
34         <pre>
35     timeout 60
36     abort (Busy|Sorry|Fail)
37     # don't forget to chmod 4775 netrom_call!
38     connect ax25 /usr/sbin/netrom_call bbs gb7djk g1tlh
39     'Connect' ''
40     'Connect' 'c np7'
41     'Connect' 'c gb7dxm'
42     'Connect' ''
43     client /usr/bin/perl /spider/perl/client.pl gb7dxm ax25
44         </pre>
45
46         <p>A connection is started manually by typing in <tt>connect <scriptname></tt> on a sysop enabled
47           <tt>client.pl</tt> session. For example:-
48         <pre>
49     G1TLH de GB7DJK 13-Dec-1998 2041Z > connect gb7djk-1
50     connection to GB7DJK-1 started
51     G1TLH de GB7DJK 13-Dec-1998 2043Z > 
52     </pre>
53     
54     <p>You can watch the progress of the connection (if you have the standard debugging enabled) on the
55           <tt>cluster.pl</tt> screen and you should see something like this:-
56         <pre>
57     &lt;- D G1TLH connect gb7djk-1
58     -> D G1TLH connection to GB7DJK-1 started
59     -> D G1TLH G1TLH de GB7DJK 13-Dec-1998 2046Z >
60     timeout set to 15
61     CONNECT sort: telnet command: dirkl.tobit.co.uk
62     CHAT "login" -> "gb7djk"
63     received "
64     Red Hat Linux release 5.1 (Manhattan)
65     Kernel 2.0.35 on an i586
66     "
67     received "login: "
68     sent "gb7djk"
69     CHAT "word" -> "gb7djk"
70     received "gb7djk
71  
72     "
73     received "Password: "
74     sent "gb7djk"
75     Connected to GB7DJK-1, starting normal protocol
76     &lt;- O GB7DJK-1 telnet
77     -> B GB7DJK-1 0
78     GB7DJK-1 channel func  state 0 -> init
79     &lt;- D GB7DJK-1 
80     &lt;- D GB7DJK-1 Last login: Sun Dec 13 17:59:56 from dirk1
81     &lt;- D GB7DJK-1 PC38^GB7DJK-1^~
82     &lt;- D GB7DJK-1 PC18^ 1 nodes, 0 local / 1 total users  Max users 0  Uptime 0 00:00^5447^~
83     etc
84     </pre>
85
86         <p>The connect scripts consist of lines which start with the following keywords or symbols:-
87         <ul>
88                 <p><li><b>#</b> All lines starting with a <b>#</b> are ignored, as are wholly blank lines.
89                 <p><li><b>timeout</b> followed by a number is the number of seconds to wait for a command
90                 to complete. If there is no <b>timeout</b> specified in the script then the default is 60 seconds.
91                 <P><li><b>abort</b> is a regular expression containing one or more strings to look for to abort a 
92                 connection. This is a perl regular expression and is executed ignoring case.
93                 <p><li><b>connect</b> followed by <b>ax25</b> or <b>telnet</b> and some type dependent information. In 
94                 the case of a <b>telnet</b> connection, there can be up to two parameters, the first is the ip
95                 address or hostname of the computer you wish to connect to and the second is the port number you
96                 want to use (this can be left out if it is a normal telnet session).
97                 <p>In the case of an <b>ax25</b> session then this would normally be a call to <tt>ax25_call</tt>
98                   or <tt>netrom_call</tt> as in the example above. It is your responsibility to get your node
99                   and other ax25 parameters to work before going down this route!
100                 <p><li><b>'</b> or <b>"</b> are the delimiting characters for a <tt>chat</tt> type script. They normally
101                 come in pairs, either can be empty. Each line reads input from the connection until it sees the string
102                 (or perl regular expression) contained in the left hand string. If the  left hand string is empty then
103                 it doesn't read or wait for anything. The comparison is done ignoring case.
104                 <p>When the left hand string has found what it is looking (if it is) then the right hand string is
105                   sent to the connection. 
106                 <p>This process is repeated for every line of <tt>chat</tt> script. 
107                 <p><li><b>client</b> starts the client program and should be exactly as you would want it with an incoming
108                 connection.
109         </ul>
110     <hr>
111         <h5>$Id</h5>
112   </body>
113 </html>