2 * $Id: usockfd.h,v 1.5 2009-11-05 14:38:07 franklahm Exp $
4 * Copyright (C) Joerg Lenneis 2003
5 * All Rights Reserved. See COPYING.
8 #ifndef CNID_DBD_USOCKFD_H
9 #define CNID_DBD_USOCKFD_H 1
13 #include <atalk/cnid_dbd_private.h>
16 extern int usockfd_create (char *, mode_t, int);
17 extern int tsockfd_create (char *, char *, int);
18 extern int usockfd_check (int, const sigset_t *);
20 #ifndef OSSH_ALIGNBYTES
21 #define OSSH_ALIGNBYTES (sizeof(int) - 1)
25 #define u_int unsigned int
27 #define __CMSG_ALIGN(p) (((u_int)(p) + OSSH_ALIGNBYTES) &~ OSSH_ALIGNBYTES)
30 /* Length of the contents of a control message of length len */
32 #define CMSG_LEN(len) (__CMSG_ALIGN(sizeof(struct cmsghdr)) + (len))
35 /* Length of the space taken up by a padded control message of length len */
37 #define CMSG_SPACE(len) (__CMSG_ALIGN(sizeof(struct cmsghdr)) + __CMSG_ALIGN(len))
42 #endif /* CNID_DBD_USOCKFD_H */