Re: AX255 programming

From: Tomi Manninen (wldholo.jxyzdfy@forumdesimages.org)
Date: Tue Jul 17 2001 - 22:35:30 EEST

  • Next message: David Taylor: "Ax25 digipeat."

    On Tue, 17 Jul 2001, Dustin Moore wrote:

    > I would like to write a server for netrom connects in something other
    > than C. A perl script called by ax25d, for example. I have found that the
    > STDOUT is piped directly to the remote connectee but the STDIN doesn't
    > contain the characters being sent to the server from the user. Are
    > there any tricks I can use to avoid the full glory of the network socket
    > interaces?

    STDIN is the correct place to read but there is a catch. AX.25, NET/ROM
    and ROSE are so called sequential packet protocols (as opposed to a stream
    protocol like TCP) and thus each time you read from STDIN you need the
    read the whole packet. If you read only a part of it, the rest of it will
    be lost forever. As there is no way of knowing how large the received
    packet will be (NET/ROM for example supports fragmentation so the packet
    could in theory be very long) you will have to (in C as that's what I
    know):

      read(0, very_large_buf, sizeof(very_large_buf));

    I don't know how perl handles its standard io but the above might be an
    explanation to what you see.

    -- 
    Tomi Manninen           Internet:  terhi.victor@logonet.com
    OH2BNS                  AX.25:     terhi.victor@logonet.com
    KP20ME04                Amprnet:   bczhvzn@icteam.com
    

    - To unsubscribe from this list: send the line "unsubscribe linux-hams" in the body of a message to qivsct.bpsn@gibthun.ch



    This archive was generated by hypermail 2b30 : Tue Jul 17 2001 - 22:38:30 EEST