3 * Copyright (C) Joerg Lenneis 2003
4 * All Rights Reserved. See COPYING.
7 #ifndef CNID_DBD_USOCKFD_H
8 #define CNID_DBD_USOCKFD_H 1
12 #include <atalk/cnid_dbd_private.h>
15 extern int usockfd_create (char *, mode_t, int);
16 extern int tsockfd_create (char *, char *, int);
17 extern int usockfd_check (int, const sigset_t *);
19 #ifndef OSSH_ALIGNBYTES
20 #define OSSH_ALIGNBYTES (sizeof(int) - 1)
24 #define u_int unsigned int
26 #define __CMSG_ALIGN(p) (((u_int)(p) + OSSH_ALIGNBYTES) &~ OSSH_ALIGNBYTES)
29 /* Length of the contents of a control message of length len */
31 #define CMSG_LEN(len) (__CMSG_ALIGN(sizeof(struct cmsghdr)) + (len))
34 /* Length of the space taken up by a padded control message of length len */
36 #define CMSG_SPACE(len) (__CMSG_ALIGN(sizeof(struct cmsghdr)) + __CMSG_ALIGN(len))
41 #endif /* CNID_DBD_USOCKFD_H */