2 * $Id: usockfd.h,v 1.1.4.5 2004-09-06 07:19:22 didg 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 __P((char *, mode_t, int));
17 extern int tsockfd_create __P((char *, u_int16_t, int));
18 extern int usockfd_check __P((int, unsigned long));
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 */