Subject: Re: routing socket alignment issue
To: Ross Harvey <email@example.com>
From: None <firstname.lastname@example.org>
Date: 09/02/1999 16:41:57
>Umm, wait a minute, sys/net/rtsock.c does NOT use ALIGN(). It uses
>local macros to align to sizeof long.
I wasn't clear enough (or confused), on alpha sizeof(long) = 8
so effectively ALIGN() rounds up to the same boundary as ROUNDUP()
on alpha. Thanks for clarification.
>I would suggest:
> * edit route.4 to simply document the alignment to sizeof long
> * modify clients to adapt, possibly by exporting a new alignment
> convenience macro in /usr/include
>I agree with you, BTW, that a sort-of clean solution would be to generate
>packed structures from rtsock.c. It's annoying that the kernel does this
>sometimes (e.g., the widely used SIOCGIFCONF) but not others, but I'm afraid
>it's too late to change it. (And anyway, those packed structures are a big
>source of other bugs ... it's amazing how much cascaded lossage flows from
>the variable length sockaddr feature.)
I agree with the above stragegy.
It looks that long alignment is used for a very long time.
Is RTALIGN() makes sense as the name of exported macro?
I wonder how many existing routing daemons are aware of this alignment.
Do NetBSD/alpha (or other sizeof(long) == 8 arch) users able to run
third-party routing daemons without modification?