1 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
4 <title>Connecting to other Clusters</title>
8 <h2>Connecting to other Clusters</h2>
11 <address><a href="mailto:djk@tobit.co.uk">Dirk Koopman G1TLH</a></address>
13 <!-- Created: Sun Dec 13 20:25:14 GMT 1998 -->
15 Last modified: Mon Dec 14 00:29:00 GMT 1998
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.
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.
24 <p>Here are a couple of basic types, first a telnet connection:-
28 connect telnet dirkl.tobit.co.uk
31 client /usr/bin/perl /spider/perl/client.pl gb7djk-1 telnet
33 <p>and an ax25 example:-
36 abort (Busy|Sorry|Fail)
37 # don't forget to chmod 4775 netrom_call!
38 connect ax25 /usr/sbin/netrom_call bbs gb7djk g1tlh
43 client /usr/bin/perl /spider/perl/client.pl gb7dxm ax25
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:-
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 >
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:-
57 <- D G1TLH connect gb7djk-1
58 -> D G1TLH connection to GB7DJK-1 started
59 -> D G1TLH G1TLH de GB7DJK 13-Dec-1998 2046Z >
61 CONNECT sort: telnet command: dirkl.tobit.co.uk
62 CHAT "login" -> "gb7djk"
64 Red Hat Linux release 5.1 (Manhattan)
65 Kernel 2.0.35 on an i586
69 CHAT "word" -> "gb7djk"
75 Connected to GB7DJK-1, starting normal protocol
76 <- O GB7DJK-1 telnet
78 GB7DJK-1 channel func state 0 -> init
80 <- D GB7DJK-1 Last login: Sun Dec 13 17:59:56 from dirk1
81 <- D GB7DJK-1 PC38^GB7DJK-1^~
82 <- D GB7DJK-1 PC18^ 1 nodes, 0 local / 1 total users Max users 0 Uptime 0 00:00^5447^~
86 <p>The connect scripts consist of lines which start with the following keywords or symbols:-
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