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