home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
rtsi.com
/
2014.01.www.rtsi.com.tar
/
www.rtsi.com
/
OS9
/
OSK
/
TELECOM
/
OSKBox.lzh
/
MAILBOX
/
CC
/
DOCS
/
host.doc
< prev
next >
Wrap
Text File
|
1991-02-02
|
6KB
|
124 lines
NAME:
host - WA8DED host mode translator.
AUTHOR:
Eric Williams WD6CMU, 71336,1424
SYSTEM CONFIGURATION:
OS9/68K, MW C v2.0
SYNTAX:
host <path>
DESCRIPTION:
The WA8DED host mode translator (host) allows programs to enjoy an
OS9 standard I/O interface with a packet radio TNC. host will poll the
TNC for data via the serial line and unpack the data, passing it to the
application program via a pipe. Similarly, data from the application is
read from a pipe, separated into packets, and passed to the TNC. Multiple
connections are supported and is integrated with OS9 multi-tasking.
The argument to host must be a path to a SCF-type device which is
connected to a TNC running WA8DED host mode firmware. It is suggested that
the I/O buffer for this SCF device be enlarged to at least 512. The baud
rate of the port must, of course, match that of the TNC, but the
configuration of the OSK system (for instance, if a DMA disk controller is
not available) may require that the baud rate may have to be lowered to
avoid dropped characters.
host is designed to run in the background and should be executed with
the shell '&' option. It will lower its priority to 100 during
initialization. The attached TNC will be placed in host mode and will be
polled at least once every 2 seconds, more often as data availability
requires. The maximum number of connects allowed is set to 3 and
monitoring is disabled.
Incoming connections to the TNC will cause a child process to be
forked. This process will execute the program "mailbox". The standard
I/O paths for the child process will be redirected to unnamed pipes
through which the TNC data will pass. No special I/O practices are needed
for this program. The arguments passed to the child process will be the
callsign of the connected station, the TNC port (minus the '/'), and the
digipeaters the station connected through, if any.
If a station disconnects from the TNC or the link fails, the pipe
through which the child process receives input is closed. If the output
pipe from the child process goes EOF, a wait will be executed for that
child and the associated TNC channel will be disconnected once all data
destined for the connected station has been acknowledged. If a ^C
character is received from the station, an interrupt signal (signal value
3) is sent to the associated child process.
host creates four named pipes upon execution. These pipes all have
names that end in ".<port>" where <port> is the path to the TNC specified
on startup, minus the '/'.
The pipe "monitor.<port>" is an output pipe and will contain any
messages received from TNC channel 0. This includes monitored packets and
headers and attempted connect messages if no channels are available. If
the pipe is full, any subsequent messages will be discarded by host.
The pipe "beacon.<port>" is an input pipe and anything written to it
will be written to TNC data channel 0. This will cause the information to
be transmitted in an unproto packet via whatever path the channel was
initialized to before host was executed.
The pipe "hostlog.<port>" is used for debugging output and will
contain messages from the host program. If the pipe is full, any
subsequent messages will be discarded by host.
The pipe "command.<port>" is an input pipe through which commands can
be given to the host program. Commands are given as a single line,
terminated by newline. The first character of the line specifies the
command. The following commands are currently supported:
m<string>\n - This will send the line as a command to the TNC on
channel 0. It can be used to enable or disable the monitoring of
information. Monitored information appears in the pipe
"monitor.<port>".
o<pid>\n - This causes host to allocate the highest numbered
available TNC channel and open four named pipes. <pid> is the
(ASCII) process id of the program giving the command and is used
to create unique names for the pipes. The pipe "data_in.<pid>"
will contain incoming data from the TNC, while data sent to the
pipe "data_out.<pid>" will be sent to the TNC. The pipe
"ctl_in.<pid>" will contain TNC channel status and error
messages, while information sent to the pipe "ctl_out.<pid>" will
be sent as commands to the TNC. In this way, a complete
separation exists between channel data and status/command
information.
c<pid>\n - The channel allocated by the corresponding o command
(above) is deallocated and the associated named pipes are closed.
It is a good idea to make sure the channel is disconnected before
issuing this command.
u <path> - Sets the digipeater path for UI (beacon) frames.
Outgoing packets are limited in length to 236 by host. (Larger packets
would be broken by NET/ROM.) Within these 236-byte packets, host will place as
many complete lines of text as will fit. If there are characters after the
last newline, they will be saved until the next polling period. If no newline
is received by then, the data will be sent even if it is not terminated with a
newline. In this way, data transparency is maintained while the majority of
packets will end with a newline character. You should note that host will not
perform any editing on incoming data. In particular, line terminator
characters will be passed unchanged, even the linefeed of a carriage-
return/linefeed pair. This extra linefeed may cause difficulty to mailbox
programs, and users should be cautioned to turn off their TNC LFADD (or
equivalent) flag.
If a quit signal is received by host, the program will disable all
monitoring from the TNC, set the maximum number of connections to zero (no
connections), return the TNC to terminal mode, and exit.
BUGS: