]> arthur.barton.de Git - netatalk.git/blob - etc/cnid_dbd/usockfd.h
27bde63c31b6a6d665d87f264c85de059b53a96d
[netatalk.git] / etc / cnid_dbd / usockfd.h
1 /*
2  *
3  * Copyright (C) Joerg Lenneis 2003
4  * All Rights Reserved.  See COPYING.
5  */
6
7 #ifndef CNID_DBD_USOCKFD_H
8 #define CNID_DBD_USOCKFD_H 1
9
10
11
12 #include <atalk/cnid_dbd_private.h>
13
14
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 *);
18
19 #ifndef OSSH_ALIGNBYTES
20 #define OSSH_ALIGNBYTES (sizeof(int) - 1)
21 #endif
22 #ifndef __CMSG_ALIGN
23 #ifndef u_int
24 #define u_int unsigned int
25 #endif
26 #define __CMSG_ALIGN(p) (((u_int)(p) + OSSH_ALIGNBYTES) &~ OSSH_ALIGNBYTES)
27 #endif
28
29 /* Length of the contents of a control message of length len */
30 #ifndef CMSG_LEN
31 #define CMSG_LEN(len)   (__CMSG_ALIGN(sizeof(struct cmsghdr)) + (len))
32 #endif
33
34 /* Length of the space taken up by a padded control message of length len */
35 #ifndef CMSG_SPACE
36 #define CMSG_SPACE(len) (__CMSG_ALIGN(sizeof(struct cmsghdr)) + __CMSG_ALIGN(len))
37 #endif
38
39
40
41 #endif /* CNID_DBD_USOCKFD_H */