Subject: Re: in-kernel workaround for PR 14746
To: None <port-sparc64@netbsd.org, tech-net@netbsd.org>
From: der Mouse <mouse@Rodents.Montreal.QC.CA>
List: port-sparc64
Date: 12/02/2001 05:18:40
> The recommended solution seems to be to modify the userland programs
> to call getifaddrs() instead of that benighted ioctl; using bcopy()
> instead of struct assignment to extract data from the ioctl buffer
> also works.

Is struct assignment even _supposed_ to work?  I thought that was
"unwarranted chumminess with the compiler", to stretch the phrase a bit
beyond its original use.  (I've always been a bit depressed to see the
amount of code that just pointer-casts and struct-assigns structs out
of byte buffers, and have been careful to use bcopy myself.  Not
specifically for SIOCGIFCONF, but that's one example of an endemic
disease; other examples are things like routing socket messages.)

/~\ The ASCII				der Mouse
\ / Ribbon Campaign
 X  Against HTML	       mouse@rodents.montreal.qc.ca
/ \ Email!	     7D C8 61 52 5D E7 2D 39  4E F1 31 3E E8 B3 27 4B