cvs commit: src/sbin/ifconfig ifconfig.c src/sys/net if.c if.h
Ken Smith
kensmith at cse.Buffalo.EDU
Sun Dec 12 13:55:43 PST 2004
On Sun, Dec 12, 2004 at 10:28:50PM +0100, Wilko Bulte wrote:
> On Sun, Dec 12, 2004 at 12:53:21PM -0800, Brooks Davis wrote..
> > ifi_mtu, etc remain in the same location because the two new variables
> > fill in the hidden padding required to align ifi_mtu. I've verified
> > that old and new ifconfigs work with old and new kernels. The change
>
> Als on 64 bit machines? Just wondering..
I didn't check as thoroughly as Brooks said he did but I whipped up
a very crude little test and ran it on beast:
#include <sys/param.h>
#include <sys/socket.h>
#include "if.h"
main()
{
struct if_data foo;
u_char *addr1, *addr2;
printf("sizeof if_data %d\n", sizeof(foo));
addr1 = (u_char *)&foo;
addr2 = (u_char *)&foo.ifi_mtu;
printf("offset ifi_mtu %d\n", (int)(addr2 - addr1));
}
It reported no change in the structure size and said the ifi_mtu field
began at the same spot using the old and new versions of if.h. So,
that *should* indicate Alpha's compiler had been doing the same
invisible padding that i386's had been.
Brooks, sorry about all this. Just last-second jitters... :-)
--
Ken Smith
- From there to here, from here to | kensmith at cse.buffalo.edu
there, funny things are everywhere. |
- Theodore Geisel |
More information about the cvs-src
mailing list