/* sizeof.c - Display the size of various data structures of * opaque sysctl results. * * Copyright (C) 2006 David Landgren, all rights reserved */ #include #include #include /* struct mbstat */ #include /* struct ntptimeval */ #include /* struct devstat */ #include /* struct xvfsconf */ #include /* struct icmpstat prerequisite */ #include /* struct icmpstat prerequisite */ #include /* struct icmpstat prerequisite */ #include /* struct icmpstat prerequisite */ #include /* struct icmpstat */ #include /* struct igmpstat */ #include /* struct tcpstat */ #include /* struct udpstat prerequisite */ #include /* struct udpstat prerequisite */ #include /* struct udpstat prerequisite */ #include /* struct udpstat */ #ifdef NEVER #include /* struct xinpcb */ #include /* struct xinpcb */ #endif #include /* struct rip6stat */ #include /* struct bootinfo */ int main(int argc, char **argv) { printf( "sizeof(int) = %d\n", sizeof(int) ); printf( "sizeof(struct mbstat) = %d\n", sizeof(struct mbstat) ); printf( "sizeof(struct ntptimeval) = %d\n", sizeof(struct ntptimeval) ); printf( "sizeof(struct timespec) = %d\n", sizeof(struct timespec) ); printf( "sizeof(struct devstat) = %d\n", sizeof(struct devstat) ); printf( "sizeof(struct xvfsconf) = %d\n", sizeof(struct xvfsconf) ); printf( "%f\n", 252.0/36.0 ); printf( "sizeof(struct icmpstat) = %d\n", sizeof(struct icmpstat) ); printf( "sizeof(struct igmpstat) = %d\n", sizeof(struct igmpstat) ); printf( "sizeof(struct tcpstat) = %d\n", sizeof(struct tcpstat) ); printf( "sizeof(struct udpstat) = %d\n", sizeof(struct udpstat) ); /* printf( "sizeof(struct xinpcb) = %d\n", sizeof(struct xinpcb) ); */ printf( "sizeof(struct rip6stat) = %d\n", sizeof(struct rip6stat) ); printf( "sizeof(struct bootinfo) = %d\n", sizeof(struct bootinfo) ); return 0; }