Subject: Re: CVS commit: src/dist/smbfs/lib/smb
To: None <>
From: Jason Thorpe <>
List: source-changes
Date: 03/28/2003 12:34:44
On Friday, March 28, 2003, at 11:14  AM, Matthias Drochner wrote:

> Afaict, this would work perfectly.
> Only that this is third-party code...

All of the BSDs have getifaddrs(3).  There is no harm in changing the 
code to use it, I think.

> btw, there are a lot of SIOCGIFCONF calls in the src tree.
> I havn't seen that anyone copies the ifreq structures to
> a normally allocated structure, so accesses to struct members
> might lead to unaliged accesses. Or can we rely on sockaddr
> sizes always being within some raster ensuring alignment?

No, such use of SIOCGIFCONF is incorrect.  What are the users of 
SIOCGIFCONF doing?  Presumably, most of those could be replaced with 
calls to getifaddrs(3), as well.

         -- Jason R. Thorpe <>