/* include unph */ /* Our own header. Tabs are set for 4 spaces, not 8 */## 1 ##src/lib/unp.h## #ifndef __unp_h## 2 ##src/lib/unp.h## #define __unp_h## 3 ##src/lib/unp.h## #include "../config.h" /* configuration options for current OS */## 4 ##src/lib/unp.h## /* "../config.h" is generated by configure */## 5 ##src/lib/unp.h## /* If anything changes in the following list of #includes, must change## 6 ##src/lib/unp.h## acsite.m4 also, for configure's tests. */## 7 ##src/lib/unp.h## #include /* basic system data types */## 8 ##src/lib/unp.h## #include /* basic socket definitions */## 9 ##src/lib/unp.h## #include /* timeval{} for select() */## 10 ##src/lib/unp.h## #include /* timespec{} for pselect() */## 11 ##src/lib/unp.h## #include /* sockaddr_in{} and other Internet defns */## 12 ##src/lib/unp.h## #include /* inet(3) functions */## 13 ##src/lib/unp.h## #include ## 14 ##src/lib/unp.h## #include /* for nonblocking */## 15 ##src/lib/unp.h## #include ## 16 ##src/lib/unp.h## #include ## 17 ##src/lib/unp.h## #include ## 18 ##src/lib/unp.h## #include ## 19 ##src/lib/unp.h## #include ## 20 ##src/lib/unp.h## #include /* for S_xxx file mode constants */## 21 ##src/lib/unp.h## #include /* for iovec{} and readv/writev */## 22 ##src/lib/unp.h## #include ## 23 ##src/lib/unp.h## #include ## 24 ##src/lib/unp.h## #include /* for Unix domain sockets */## 25 ##src/lib/unp.h## #ifdef HAVE_SYS_SELECT_H## 26 ##src/lib/unp.h## #include /* for convenience */## 27 ##src/lib/unp.h## #endif## 28 ##src/lib/unp.h## #ifdef HAVE_POLL_H## 29 ##src/lib/unp.h## #include /* for convenience */## 30 ##src/lib/unp.h## #endif## 31 ##src/lib/unp.h## #ifdef HAVE_STRINGS_H## 32 ##src/lib/unp.h## #include /* for convenience */## 33 ##src/lib/unp.h## #endif## 34 ##src/lib/unp.h## /* Three headers are normally needed for socket/file ioctl's:## 35 ##src/lib/unp.h## * , , and .## 36 ##src/lib/unp.h## */## 37 ##src/lib/unp.h## #ifdef HAVE_SYS_IOCTL_H## 38 ##src/lib/unp.h## #include ## 39 ##src/lib/unp.h## #endif## 40 ##src/lib/unp.h## #ifdef HAVE_SYS_FILIO_H## 41 ##src/lib/unp.h## #include ## 42 ##src/lib/unp.h## #endif## 43 ##src/lib/unp.h## #ifdef HAVE_SYS_SOCKIO_H## 44 ##src/lib/unp.h## #include ## 45 ##src/lib/unp.h## #endif## 46 ##src/lib/unp.h## #ifdef HAVE_PTHREAD_H## 47 ##src/lib/unp.h## #include ## 48 ##src/lib/unp.h## #endif## 49 ##src/lib/unp.h## /* OSF/1 actually disables recv() and send() in */## 50 ##src/lib/unp.h## #ifdef __osf__## 51 ##src/lib/unp.h## #undef recv## 52 ##src/lib/unp.h## #undef send## 53 ##src/lib/unp.h## #define recv(a,b,c,d) recvfrom(a,b,c,d,0,0)## 54 ##src/lib/unp.h## #define send(a,b,c,d) sendto(a,b,c,d,0,0)## 55 ##src/lib/unp.h## #endif## 56 ##src/lib/unp.h## #ifndef INADDR_NONE## 57 ##src/lib/unp.h## /* $$.Ic INADDR_NONE$$ */ #define INADDR_NONE 0xffffffff /* should have been in */## 58 ##src/lib/unp.h## #endif## 59 ##src/lib/unp.h## #ifndef SHUT_RD /* these three Posix.1g names are quite new */## 60 ##src/lib/unp.h## #define SHUT_RD 0 /* shutdown for reading */## 61 ##src/lib/unp.h## #define SHUT_WR 1 /* shutdown for writing */## 62 ##src/lib/unp.h## #define SHUT_RDWR 2 /* shutdown for reading and writing */## 63 ##src/lib/unp.h## /* $$.Ic SHUT_RD$$ */ /* $$.Ic SHUT_WR$$ */ /* $$.Ic SHUT_RDWR$$ */ #endif## 64 ##src/lib/unp.h## #ifndef INET_ADDRSTRLEN## 65 ##src/lib/unp.h## /* $$.Ic INET_ADDRSTRLEN$$ */ #define INET_ADDRSTRLEN 16 /* "ddd.ddd.ddd.ddd\0"## 66 ##src/lib/unp.h## 1234567890123456 */## 67 ##src/lib/unp.h## #endif## 68 ##src/lib/unp.h## /* Define following even if IPv6 not supported, so we can always allocate## 69 ##src/lib/unp.h## an adequately-sized buffer, without #ifdefs in the code. */## 70 ##src/lib/unp.h## #ifndef INET6_ADDRSTRLEN## 71 ##src/lib/unp.h## /* $$.Ic INET6_ADDRSTRLEN$$ */ #define INET6_ADDRSTRLEN 46 /* max size of IPv6 address string:## 72 ##src/lib/unp.h## "xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx" or## 73 ##src/lib/unp.h## "xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:ddd.ddd.ddd.ddd\0"## 74 ##src/lib/unp.h## 1234567890123456789012345678901234567890123456 */## 75 ##src/lib/unp.h## #endif## 76 ##src/lib/unp.h## /* Define bzero() as a macro if it's not in standard C library. */## 77 ##src/lib/unp.h## #ifndef HAVE_BZERO## 78 ##src/lib/unp.h## #define bzero(ptr,n) memset(ptr, 0, n)## 79 ##src/lib/unp.h## /* $$.If bzero$$ */ /* $$.If memset$$ */ #endif## 80 ##src/lib/unp.h## /* Older resolvers do not have gethostbyname2() */## 81 ##src/lib/unp.h## #ifndef HAVE_GETHOSTBYNAME2## 82 ##src/lib/unp.h## #define gethostbyname2(host,family) gethostbyname((host))## 83 ##src/lib/unp.h## #endif## 84 ##src/lib/unp.h## /* The structure returned by recvfrom_flags() */## 85 ##src/lib/unp.h## struct in_pktinfo {## 86 ##src/lib/unp.h## struct in_addr ipi_addr; /* dst IPv4 address */## 87 ##src/lib/unp.h## int ipi_ifindex; /* received interface index */## 88 ##src/lib/unp.h## };## 89 ##src/lib/unp.h## /* $$.It in_pktinfo$$ */ /* $$.Ib ipi_addr$$ */ /* $$.Ib ipi_ifindex$$ */ /* We need the newer CMSG_LEN() and CMSG_SPACE() macros, but few## 90 ##src/lib/unp.h## implementations support them today. These two macros really need## 91 ##src/lib/unp.h## an ALIGN() macro, but each implementation does this differently. */## 92 ##src/lib/unp.h## #ifndef CMSG_LEN## 93 ##src/lib/unp.h## /* $$.Ic CMSG_LEN$$ */ #define CMSG_LEN(size) (sizeof(struct cmsghdr) + (size))## 94 ##src/lib/unp.h## #endif## 95 ##src/lib/unp.h## #ifndef CMSG_SPACE## 96 ##src/lib/unp.h## /* $$.Ic CMSG_SPACE$$ */ #define CMSG_SPACE(size) (sizeof(struct cmsghdr) + (size))## 97 ##src/lib/unp.h## #endif## 98 ##src/lib/unp.h## /* Posix.1g requires the SUN_LEN() macro but not all implementations define## 99 ##src/lib/unp.h## it (yet). Note that this 4.4BSD macro works regardless whether there is##100 ##src/lib/unp.h## a length field or not. */##101 ##src/lib/unp.h## #ifndef SUN_LEN##102 ##src/lib/unp.h## /* $$.Im SUN_LEN$$ */ #define SUN_LEN(su) \##103 ##src/lib/unp.h## (sizeof(*(su)) - sizeof((su)->sun_path) + strlen((su)->sun_path))##104 ##src/lib/unp.h## #endif##105 ##src/lib/unp.h## /* Posix.1g renames "Unix domain" as "local IPC".##106 ##src/lib/unp.h## But not all systems define AF_LOCAL and PF_LOCAL (yet). */##107 ##src/lib/unp.h## #ifndef AF_LOCAL##108 ##src/lib/unp.h## #define AF_LOCAL AF_UNIX##109 ##src/lib/unp.h## #endif##110 ##src/lib/unp.h## #ifndef PF_LOCAL##111 ##src/lib/unp.h## #define PF_LOCAL PF_UNIX##112 ##src/lib/unp.h## #endif##113 ##src/lib/unp.h## /* Posix.1g requires that an #include of define INFTIM, but many##114 ##src/lib/unp.h## systems still define it in . We don't want to include##115 ##src/lib/unp.h## all the streams stuff if it's not needed, so we just define INFTIM here.##116 ##src/lib/unp.h## This is the standard value, but there's no guarantee it is -1. */##117 ##src/lib/unp.h## #ifndef INFTIM##118 ##src/lib/unp.h## #define INFTIM (-1) /* infinite poll timeout */##119 ##src/lib/unp.h## /* $$.Ic INFTIM$$ */ #ifdef HAVE_POLL_H##120 ##src/lib/unp.h## #define INFTIM_UNPH /* tell unpxti.h we defined it */##121 ##src/lib/unp.h## #endif##122 ##src/lib/unp.h## #endif##123 ##src/lib/unp.h## /* Following could be derived from SOMAXCONN in , but many##124 ##src/lib/unp.h## kernels still #define it as 5, while actually supporting many more */##125 ##src/lib/unp.h## #define LISTENQ 1024 /* 2nd argument to listen() */##126 ##src/lib/unp.h## /* Miscellaneous constants */##127 ##src/lib/unp.h## #define MAXLINE 4096 /* max text line length */##128 ##src/lib/unp.h## #define MAXSOCKADDR 128 /* max socket address structure size */##129 ##src/lib/unp.h## #define BUFFSIZE 8192 /* buffer size for reads and writes */##130 ##src/lib/unp.h## /* Define some port number that can be used for client-servers */##131 ##src/lib/unp.h## #define SERV_PORT 9877 /* TCP and UDP client-servers */##132 ##src/lib/unp.h## #define SERV_PORT_STR "9877" /* TCP and UDP client-servers */##133 ##src/lib/unp.h## #define UNIXSTR_PATH "/tmp/unix.str" /* Unix domain stream cli-serv */##134 ##src/lib/unp.h## #define UNIXDG_PATH "/tmp/unix.dg" /* Unix domain datagram cli-serv */##135 ##src/lib/unp.h## /* $$.ix [LISTENQ]~constant,~definition~of$$ */ /* $$.ix [MAXLINE]~constant,~definition~of$$ */ /* $$.ix [MAXSOCKADDR]~constant,~definition~of$$ */ /* $$.ix [BUFFSIZE]~constant,~definition~of$$ */ /* $$.ix [SERV_PORT]~constant,~definition~of$$ */ /* $$.ix [UNIXSTR_PATH]~constant,~definition~of$$ */ /* $$.ix [UNIXDG_PATH]~constant,~definition~of$$ */ /* Following shortens all the type casts of pointer arguments */##136 ##src/lib/unp.h## #define SA struct sockaddr##137 ##src/lib/unp.h## #define FILE_MODE (S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH)##138 ##src/lib/unp.h## /* default file access permissions for new files */##139 ##src/lib/unp.h## #define DIR_MODE (FILE_MODE | S_IXUSR | S_IXGRP | S_IXOTH)##140 ##src/lib/unp.h## /* default permissions for new directories */##141 ##src/lib/unp.h## typedef void Sigfunc (int); /* for signal handlers */##142 ##src/lib/unp.h## #define min(a,b) ((a) < (b) ? (a) : (b))##143 ##src/lib/unp.h## #define max(a,b) ((a) > (b) ? (a) : (b))##144 ##src/lib/unp.h## #ifndef HAVE_ADDRINFO_STRUCT##145 ##src/lib/unp.h## #include "../lib/addrinfo.h"##146 ##src/lib/unp.h## #endif##147 ##src/lib/unp.h## #ifndef HAVE_IF_NAMEINDEX_STRUCT##148 ##src/lib/unp.h## struct if_nameindex {##149 ##src/lib/unp.h## unsigned int if_index; /* 1, 2, ... */##150 ##src/lib/unp.h## char *if_name; /* null terminated name: "le0", ... */##151 ##src/lib/unp.h## };##152 ##src/lib/unp.h## /* $$.It if_nameindex$$ */ /* $$.Ib if_index$$ */ /* $$.Ib if_name$$ */ #endif##153 ##src/lib/unp.h## #ifndef HAVE_TIMESPEC_STRUCT##154 ##src/lib/unp.h## struct timespec {##155 ##src/lib/unp.h## time_t tv_sec; /* seconds */##156 ##src/lib/unp.h## long tv_nsec; /* and nanoseconds */##157 ##src/lib/unp.h## };##158 ##src/lib/unp.h## /* $$.It timespec$$ */ /* $$.Ib tv_sec$$ */ /* $$.Ib tv_nsec$$ */ #endif##159 ##src/lib/unp.h## /* end unph */ /* prototypes for our own library functions */##160 ##src/lib/unp.h## int connect_nonb(int, const SA *, socklen_t, int);##161 ##src/lib/unp.h## int connect_timeo(int, const SA *, socklen_t, int);##162 ##src/lib/unp.h## void daemon_init(const char *, int);##163 ##src/lib/unp.h## void daemon_inetd(const char *, int);##164 ##src/lib/unp.h## void dg_cli(FILE *, int, const SA *, socklen_t);##165 ##src/lib/unp.h## void dg_echo(int, SA *, socklen_t);##166 ##src/lib/unp.h## char *gf_time(void);##167 ##src/lib/unp.h## void heartbeat_cli(int, int, int);##168 ##src/lib/unp.h## void heartbeat_serv(int, int, int);##169 ##src/lib/unp.h## struct addrinfo *host_serv(const char *, const char *, int, int);##170 ##src/lib/unp.h## int inet_srcrt_add(char *, int);##171 ##src/lib/unp.h## u_char *inet_srcrt_init(void);##172 ##src/lib/unp.h## void inet_srcrt_print(u_char *, int);##173 ##src/lib/unp.h## char **my_addrs(int *);##174 ##src/lib/unp.h## int readable_timeo(int, int);##175 ##src/lib/unp.h## ssize_t readline(int, void *, size_t);##176 ##src/lib/unp.h## ssize_t readn(int, void *, size_t);##177 ##src/lib/unp.h## ssize_t read_fd(int, void *, size_t, int *);##178 ##src/lib/unp.h## ssize_t recvfrom_flags(int, void *, size_t, int *, SA *, socklen_t *,##179 ##src/lib/unp.h## struct in_pktinfo *);##180 ##src/lib/unp.h## Sigfunc *signal_intr(int, Sigfunc *);##181 ##src/lib/unp.h## int sock_bind_wild(int, int);##182 ##src/lib/unp.h## int sock_cmp_addr(const SA *, const SA *, socklen_t);##183 ##src/lib/unp.h## int sock_cmp_port(const SA *, const SA *, socklen_t);##184 ##src/lib/unp.h## int sock_get_port(const SA *, socklen_t);##185 ##src/lib/unp.h## void sock_set_addr(SA *, socklen_t, const void *);##186 ##src/lib/unp.h## void sock_set_port(SA *, socklen_t, int);##187 ##src/lib/unp.h## void sock_set_wild(SA *, socklen_t);##188 ##src/lib/unp.h## char *sock_ntop(const SA *, socklen_t);##189 ##src/lib/unp.h## char *sock_ntop_host(const SA *, socklen_t);##190 ##src/lib/unp.h## int sockfd_to_family(int);##191 ##src/lib/unp.h## void str_echo(int);##192 ##src/lib/unp.h## void str_cli(FILE *, int);##193 ##src/lib/unp.h## int tcp_connect(const char *, const char *);##194 ##src/lib/unp.h## int tcp_listen(const char *, const char *, socklen_t *);##195 ##src/lib/unp.h## void tv_sub(struct timeval *, struct timeval *);##196 ##src/lib/unp.h## int udp_client(const char *, const char *, void **, socklen_t *);##197 ##src/lib/unp.h## int udp_connect(const char *, const char *);##198 ##src/lib/unp.h## int udp_server(const char *, const char *, socklen_t *);##199 ##src/lib/unp.h## int writable_timeo(int, int);##200 ##src/lib/unp.h## ssize_t writen(int, const void *, size_t);##201 ##src/lib/unp.h## ssize_t write_fd(int, void *, size_t, int);##202 ##src/lib/unp.h## #ifdef MCAST##203 ##src/lib/unp.h## int mcast_leave(int, const SA *, socklen_t);##204 ##src/lib/unp.h## int mcast_join(int, const SA *, socklen_t, const char *, u_int);##205 ##src/lib/unp.h## int mcast_get_if(int);##206 ##src/lib/unp.h## int mcast_get_loop(int);##207 ##src/lib/unp.h## int mcast_get_ttl(int);##208 ##src/lib/unp.h## int mcast_set_if(int, const char *, u_int);##209 ##src/lib/unp.h## int mcast_set_loop(int, int);##210 ##src/lib/unp.h## int mcast_set_ttl(int, int);##211 ##src/lib/unp.h## void Mcast_leave(int, const SA *, socklen_t);##212 ##src/lib/unp.h## void Mcast_join(int, const SA *, socklen_t, const char *, u_int);##213 ##src/lib/unp.h## int Mcast_get_if(int);##214 ##src/lib/unp.h## int Mcast_get_loop(int);##215 ##src/lib/unp.h## int Mcast_get_ttl(int);##216 ##src/lib/unp.h## void Mcast_set_if(int, const char *, u_int);##217 ##src/lib/unp.h## void Mcast_set_loop(int, int);##218 ##src/lib/unp.h## void Mcast_set_ttl(int, int);##219 ##src/lib/unp.h## #endif##220 ##src/lib/unp.h## unsigned short in_cksum(unsigned short *, int);##221 ##src/lib/unp.h## #ifndef HAVE_GETADDRINFO_PROTO##222 ##src/lib/unp.h## int getaddrinfo(const char *, const char *, const struct addrinfo *,##223 ##src/lib/unp.h## struct addrinfo **);##224 ##src/lib/unp.h## void freeaddrinfo(struct addrinfo *);##225 ##src/lib/unp.h## char *gai_strerror(int);##226 ##src/lib/unp.h## #endif##227 ##src/lib/unp.h## #ifndef HAVE_GETNAMEINFO_PROTO##228 ##src/lib/unp.h## int getnameinfo(const SA *, socklen_t, char *, size_t, char *, size_t, int);##229 ##src/lib/unp.h## #endif##230 ##src/lib/unp.h## #ifndef HAVE_GETHOSTNAME_PROTO##231 ##src/lib/unp.h## int gethostname(char *, int);##232 ##src/lib/unp.h## #endif##233 ##src/lib/unp.h## #ifndef HAVE_HSTRERROR_PROTO##234 ##src/lib/unp.h## const char *hstrerror(int);##235 ##src/lib/unp.h## #endif##236 ##src/lib/unp.h## #ifndef HAVE_IF_NAMETOINDEX_PROTO##237 ##src/lib/unp.h## unsigned int if_nametoindex(const char *);##238 ##src/lib/unp.h## char *if_indextoname(unsigned int, char *);##239 ##src/lib/unp.h## void if_freenameindex(struct if_nameindex *);##240 ##src/lib/unp.h## struct if_nameindex *if_nameindex(void);##241 ##src/lib/unp.h## #endif##242 ##src/lib/unp.h## #ifndef HAVE_INET_PTON_PROTO##243 ##src/lib/unp.h## int inet_pton(int, const char *, void *);##244 ##src/lib/unp.h## const char *inet_ntop(int, const void *, char *, size_t);##245 ##src/lib/unp.h## #endif##246 ##src/lib/unp.h## #ifndef HAVE_INET_ATON_PROTO##247 ##src/lib/unp.h## int inet_aton(const char *, struct in_addr *);##248 ##src/lib/unp.h## #endif##249 ##src/lib/unp.h## #ifndef HAVE_ISFDTYPE_PROTO##250 ##src/lib/unp.h## int isfdtype(int, int);##251 ##src/lib/unp.h## #endif##252 ##src/lib/unp.h## #ifndef HAVE_PSELECT_PROTO##253 ##src/lib/unp.h## int pselect(int, fd_set *, fd_set *, fd_set *,##254 ##src/lib/unp.h## const struct timespec *, const sigset_t *);##255 ##src/lib/unp.h## #endif##256 ##src/lib/unp.h## #ifndef HAVE_SOCKATMARK_PROTO##257 ##src/lib/unp.h## int sockatmark(int);##258 ##src/lib/unp.h## #endif##259 ##src/lib/unp.h## #ifndef HAVE_SNPRINTF_PROTO##260 ##src/lib/unp.h## int snprintf(char *, size_t, const char *,...);##261 ##src/lib/unp.h## #endif##262 ##src/lib/unp.h## /* prototypes for our own library wrapper functions */##263 ##src/lib/unp.h## void Connect_timeo(int, const SA *, socklen_t, int);##264 ##src/lib/unp.h## struct addrinfo *Host_serv(const char *, const char *, int, int);##265 ##src/lib/unp.h## const char *Inet_ntop(int, const void *, char *, size_t);##266 ##src/lib/unp.h## void Inet_pton(int, const char *, void *);##267 ##src/lib/unp.h## char *If_indextoname(unsigned int, char *);##268 ##src/lib/unp.h## unsigned int If_nametoindex(const char *);##269 ##src/lib/unp.h## struct if_nameindex *If_nameindex(void);##270 ##src/lib/unp.h## char **My_addrs(int *);##271 ##src/lib/unp.h## ssize_t Read_fd(int, void *, size_t, int *);##272 ##src/lib/unp.h## int Readable_timeo(int, int);##273 ##src/lib/unp.h## ssize_t Recvfrom_flags(int, void *, size_t, int *, SA *, socklen_t *,##274 ##src/lib/unp.h## struct in_pktinfo *);##275 ##src/lib/unp.h## Sigfunc *Signal(int, Sigfunc *);##276 ##src/lib/unp.h## Sigfunc *Signal_intr(int, Sigfunc *);##277 ##src/lib/unp.h## int Sock_bind_wild(int, int);##278 ##src/lib/unp.h## char *Sock_ntop(const SA *, socklen_t);##279 ##src/lib/unp.h## char *Sock_ntop_host(const SA *, socklen_t);##280 ##src/lib/unp.h## int Sockfd_to_family(int);##281 ##src/lib/unp.h## int Tcp_connect(const char *, const char *);##282 ##src/lib/unp.h## int Tcp_listen(const char *, const char *, socklen_t *);##283 ##src/lib/unp.h## int Udp_client(const char *, const char *, void **, socklen_t *);##284 ##src/lib/unp.h## int Udp_connect(const char *, const char *);##285 ##src/lib/unp.h## int Udp_server(const char *, const char *, socklen_t *);##286 ##src/lib/unp.h## ssize_t Write_fd(int, void *, size_t, int);##287 ##src/lib/unp.h## int Writable_timeo(int, int);##288 ##src/lib/unp.h## /* prototypes for our Unix wrapper functions: see {Sec errors} */##289 ##src/lib/unp.h## void *Calloc(size_t, size_t);##290 ##src/lib/unp.h## void Close(int);##291 ##src/lib/unp.h## void Dup2(int, int);##292 ##src/lib/unp.h## int Fcntl(int, int, int);##293 ##src/lib/unp.h## void Gettimeofday(struct timeval *, void *);##294 ##src/lib/unp.h## int Ioctl(int, int, void *);##295 ##src/lib/unp.h## pid_t Fork(void);##296 ##src/lib/unp.h## void *Malloc(size_t);##297 ##src/lib/unp.h## void Mktemp(char *);##298 ##src/lib/unp.h## void *Mmap(void *, size_t, int, int, int, off_t);##299 ##src/lib/unp.h## int Open(const char *, int, mode_t);##300 ##src/lib/unp.h## void Pipe(int *fds);##301 ##src/lib/unp.h## ssize_t Read(int, void *, size_t);##302 ##src/lib/unp.h## void Sigaddset(sigset_t *, int);##303 ##src/lib/unp.h## void Sigdelset(sigset_t *, int);##304 ##src/lib/unp.h## void Sigemptyset(sigset_t *);##305 ##src/lib/unp.h## void Sigfillset(sigset_t *);##306 ##src/lib/unp.h## int Sigismember(const sigset_t *, int);##307 ##src/lib/unp.h## void Sigpending(sigset_t *);##308 ##src/lib/unp.h## void Sigprocmask(int, const sigset_t *, sigset_t *);##309 ##src/lib/unp.h## char *Strdup(const char *);##310 ##src/lib/unp.h## long Sysconf(int);##311 ##src/lib/unp.h## void Sysctl(int *, u_int, void *, size_t *, void *, size_t);##312 ##src/lib/unp.h## void Unlink(const char *);##313 ##src/lib/unp.h## pid_t Wait(int *);##314 ##src/lib/unp.h## pid_t Waitpid(pid_t, int *, int);##315 ##src/lib/unp.h## void Write(int, void *, size_t);##316 ##src/lib/unp.h## /* prototypes for our stdio wrapper functions: see {Sec errors} */##317 ##src/lib/unp.h## void Fclose(FILE *);##318 ##src/lib/unp.h## FILE *Fdopen(int, const char *);##319 ##src/lib/unp.h## char *Fgets(char *, int, FILE *);##320 ##src/lib/unp.h## FILE *Fopen(const char *, const char *);##321 ##src/lib/unp.h## void Fputs(const char *, FILE *);##322 ##src/lib/unp.h## /* prototypes for our socket wrapper functions: see {Sec errors} */##323 ##src/lib/unp.h## int Accept(int, SA *, socklen_t *);##324 ##src/lib/unp.h## void Bind(int, const SA *, socklen_t);##325 ##src/lib/unp.h## void Connect(int, const SA *, socklen_t);##326 ##src/lib/unp.h## void Getpeername(int, SA *, socklen_t *);##327 ##src/lib/unp.h## void Getsockname(int, SA *, socklen_t *);##328 ##src/lib/unp.h## void Getsockopt(int, int, int, void *, socklen_t *);##329 ##src/lib/unp.h## int Isfdtype(int, int);##330 ##src/lib/unp.h## void Listen(int, int);##331 ##src/lib/unp.h## #ifdef HAVE_POLL##332 ##src/lib/unp.h## int Poll(struct pollfd *, unsigned long, int);##333 ##src/lib/unp.h## #endif##334 ##src/lib/unp.h## ssize_t Readline(int, void *, size_t);##335 ##src/lib/unp.h## ssize_t Readn(int, void *, size_t);##336 ##src/lib/unp.h## ssize_t Recv(int, void *, size_t, int);##337 ##src/lib/unp.h## ssize_t Recvfrom(int, void *, size_t, int, SA *, socklen_t *);##338 ##src/lib/unp.h## ssize_t Recvmsg(int, struct msghdr *, int);##339 ##src/lib/unp.h## int Select(int, fd_set *, fd_set *, fd_set *, struct timeval *);##340 ##src/lib/unp.h## void Send(int, const void *, size_t, int);##341 ##src/lib/unp.h## void Sendto(int, const void *, size_t, int, const SA *, socklen_t);##342 ##src/lib/unp.h## void Sendmsg(int, const struct msghdr *, int);##343 ##src/lib/unp.h## void Setsockopt(int, int, int, const void *, socklen_t);##344 ##src/lib/unp.h## void Shutdown(int, int);##345 ##src/lib/unp.h## int Sockatmark(int);##346 ##src/lib/unp.h## int Socket(int, int, int);##347 ##src/lib/unp.h## void Socketpair(int, int, int, int *);##348 ##src/lib/unp.h## void Writen(int, void *, size_t);##349 ##src/lib/unp.h## void err_dump(const char *,...);##350 ##src/lib/unp.h## void err_msg(const char *,...);##351 ##src/lib/unp.h## void err_quit(const char *,...);##352 ##src/lib/unp.h## void err_ret(const char *,...);##353 ##src/lib/unp.h## void err_sys(const char *,...);##354 ##src/lib/unp.h## #endif /* __unp_h */##355 ##src/lib/unp.h##