#include #include #include int main(int argc, char **argv) { size_t int_size = sizeof (int); printf("sizeof (int): %lu\n", int_size); size_t cred_size = sizeof(struct cmsgcred); printf("sizeof(struct cmsgcred): %lu\n", cred_size); size_t cmsg_len = CMSG_LEN(sizeof (int)); printf("CMSG_LEN(sizeof (int)): %lu\n", cmsg_len); GCredentials *creds = g_credentials_new(); GSocketControlMessage *scm = g_unix_credentials_message_new_with_credentials(creds); size_t cms = CMSG_LEN(g_socket_control_message_get_size (scm)); printf("CMSG_LEN(g_socket_control_message_get_size (scm)): %lu\n", cms); return 0; } /* vim: set sw=2 ts=2 et: */