Re: NEW-AX.25: Starting to clean up socket API

From: Joerg Reuter (rzhoh.sihs@roskapostia.tunk.net)
Date: Sat Mar 04 2000 - 04:03:21 EET

  • Next message: Alan Cox: "Re: NEW-AX.25: Starting to clean up socket API"

    Hi Alan,

    thank you for the reply.

    > 1003.1g says the user is entitled to use any buffer size they like and
    > get half a sockaddr back. Going the other way (eg connect) we are quite
    > in the right to require the full sockaddr.

    Don't worry, I wasn't going to touch ax25_getname() and ax25_recvmsg()...
    I was thinking of ax25_bind(), ax25_connect() and ax25_sendmsg().

    > > - struct sockaddr_ax25 (obsolete, does not allow digipeaters)
    >
    > Its also useful because it fits inside a struct sockaddr, so generic
    > programs can still get the type and destination if not the AX.25 specific
    > magic. Thats intentional

    I know. ;-)
    Originally I intended to roll sockaddr_ax25 into full_sockaddr_ax25, but
    that's only possible using hacks because of gcc padding structures
    to sizeof(int)... Sure, not impossible, but there's no real gain in doing
    so either.

    Anyway, I already have one report of an application calling sendmsg()
    with sockaddr_ax25 (to transmit unproto frames) and I believe that there
    are a few more out there doing so -- especially in NET/ROM land or areas with
    stand-alone BBS instead of a network. On the other hand, it's short-sighted
    if an application does not allow sending unproto frames via digipeaters as
    there are situations where it does make sense -- and it is allowed by both
    AX.25 variants. I'll leave in the support for now and just issue a warning
    to give authors a chance to adjust their code.

    > Binding to interfaces has an API already (see the IP space)
    > SO_BINDTODEVICE

    Can you point me to an example how that works from the application point
    of view? How does setting this option interact with bind(), for example?
    The good news: it looks as if the comment in front of ax25_bind() is correct
    and we do not need any API change to support it.

    What I'm really missing is documentation about the various socket
    options available. Books rarely cover them at all and those that do
    often explain only the most basic ones...

    -- 
    vy 73 de Joerg dl1bke/a	ampr-net: terhi.victor@logonet.com
                            www     : http://www.qsl.net/dl1bke/
                            AX-25   : DL1BKE @ DB0ACH.#NRW.DEU.EU
                            Internet: ldsby@hogsbynat.se
    



    This archive was generated by hypermail 2b29 : Sat Mar 04 2000 - 16:08:55 EET