// x86_64 linux struct stat { @24 uint32 st_mode; @48 int64 st_size; @144; }; //// from linux/un.h enum __anon_un_h { UNIX_PATH_MAX = 108 }; typedef int16 sa_family_t; struct sockaddr { @0 sa_family_t sa_family; @16; }; struct sockaddr_un { @0 sa_family_t sun_family; /* AF_UNIX */ @2 char sun_path[UNIX_PATH_MAX]; /* pathname */ @110; // can't use UNIX_PATH_MAX here to set the size. // a proper structure packer will take care of // this later. }; struct in_addr { @0 unsigned int s_addr; @4; }; struct sockaddr_in { @0 sa_family_t sin_family; /* AF_INET */ @2 unsigned short int sin_port; @4 struct in_addr sin_addr; @16; // minimum size of a struct sockaddr; }; struct timespec { @0 int tv_sec; /* seconds */ @4 int tv_nsec; /* nanoseconds */ @8; }; //from asm-generic/mman-common.h enum MMAP_PROT { PROT_READ=0x1, PROT_WRITE=0x2, PROT_EXEC=0x4 }; enum MMAP_MAP { MAP_SHARED=0x1, MAP_PRIVATE=0x2 };