#include <stdlib.h>
#include <pthread.h>
#include <sys/socket.h>
//#include <sys/sockio.h>
#include <net/if.h>
#include <sys/types.h>
#include <errno.h>
#include <sys/stat.h>
#include <stddef.h>

int main() {
  printf("%d\n", sizeof(struct stat));
  printf("mode %d\n", offsetof(struct stat, st_mode));
  printf("uid %d\n", offsetof(struct stat, st_uid));
  printf("gid %d\n", offsetof(struct stat, st_gid));
  printf("atime %d\n", offsetof(struct stat, st_atime));
  printf("mtime %d\n", offsetof(struct stat, st_mtime));
  printf("ctime %d\n", offsetof(struct stat, st_ctime));
  printf("size %d\n", offsetof(struct stat, st_size));
//  pthread_mutexattr_t attr;
//  pthread_mutex_t mut;
//  int res = 0;
// printf("%X\n", SIOCGIFINDEX);
// printf("%X\n", (unsigned long)((0x80000000|0x40000000) | ((sizeof(struct ifreq) & 0x1fff) << 16) | ((('i')) << 8) | ((32))));
// printf("%X\n", SIOCGIFFLAGS);
// printf("%X\n", SIOCSIFFLAGS);
  //printf("%d\n", if_nametoindex("ath0"));
  // int sock = 0;
  //int i = 0;
  //int err = 0;
  //for (i=0;i>=0;i++) {
  //sock = socket(PF_LINK, SOCK_RAW, i);
  //err = errno;
  //if ((sock > 0) | (err != 43))
  // printf("%d %d\n", sock, err);
  //if ((i % 100) == 0)
  // printf("%d ", i);
  //}
//  res = pthread_mutexattr_init(&attr);
//  printf("ATTR INIT %d\n", res);  
//  res = pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_ERRORCHECK);
//  printf("MUTEX ATTR %d\n", res);  
//  res = pthread_mutex_init(&mut, &attr);
//  printf("MUTEX INIT %d\n", res);  
//  res = pthread_mutexattr_destroy(&attr);
//  printf("ATTR DESTROY %d\n", res);  
 
}

