Linux-Hams archive - April 1997: Re: Need help with socket programming

Re: Need help with socket programming

Jonathan Naylor (vmdxm@griegmultimedia.no)
Tue, 8 Apr 1997 14:58:04 +0100 (BST)


On Tue, 8 Apr 1997 snoymd@fastvibe.com wrote:
> Hi,

Hello Bent

> We (OZ2ABA and I) are presently working on a version of PB/PG
> for Linux (based on the work of John Melton (G0ORX/N6LYT), but
> with X-support removed and automatic download requests added.
> The first version used the devices (e.g. /dev/scc1) directly,
> but we are now switching to use the network interfaces. This
> switch is necessitated by our wanting PG to be able to work
> simultaneously with PB.

A good move.

> As part of this exercise I have written a program to generate
> synthetic traffic on the interface by taking a KISS log file,
> e.g. one generated by XPB, and sending the frames through the
> socket interface.
>
> What I want to do eventually is to see the frames being sent
> over the interface exactly as received from the satellite.

There is a terrifically easy way to do this, and it doesn't involve any
socket work. What you need to do is write a program that reads the KISS
data file and writes the data to a terminal. This program should then
transmit its data to one end of pseudo-tty with the other end of the
pseudo-tty connected to the kernel code with either axattach or kissattach
depending on the version.

This would exactly emulate the way that the data would be received on a
KISS TNC and you would be able to monitor the received data with the
listen utility and even with another copy of xpb running. All you need to
do is master tty programming. It may pay you to look at the program mkiss
in the ax25-utils as that writes to a terminal and makes use of some of
the helper functions that are in libax25.

> I do hope this is the right place to ask this kind of questions.
> Please help.

It certainly is.

> Best regards,
>
> Bent/OZ6BL
> (also terhi.victor@logonet.com)

Jonathan

--
+----------------------------------+---------------------------------------+
| e-mail: hytuwxo.maxlga@psu.ac.th        | Telephone: +44 (0) 973 695261         |
+----------------------------------+---------------------------------------+
|           Author of Linux kernel AX.25, NET/ROM and Rose.                |
+--------------------------------------------------------------------------+