Patrick Welche <prlw1@cam.ac.uk>
[netbsd-mini2440.git] / include / heimdal / roken.h
blobc1aaa837cef0918c8f13db3cdc4ca89f105a5106
1 /* This is an OS dependent, generated file */
4 #ifndef __ROKEN_H__
5 #define __ROKEN_H__
7 /* -*- C -*- */
8 /*
9 * Copyright (c) 1995-2005 Kungliga Tekniska Högskolan
10 * (Royal Institute of Technology, Stockholm, Sweden).
11 * All rights reserved.
13 * Redistribution and use in source and binary forms, with or without
14 * modification, are permitted provided that the following conditions
15 * are met:
17 * 1. Redistributions of source code must retain the above copyright
18 * notice, this list of conditions and the following disclaimer.
20 * 2. Redistributions in binary form must reproduce the above copyright
21 * notice, this list of conditions and the following disclaimer in the
22 * documentation and/or other materials provided with the distribution.
24 * 3. Neither the name of the Institute nor the names of its contributors
25 * may be used to endorse or promote products derived from this software
26 * without specific prior written permission.
28 * THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND
29 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
30 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
31 * ARE DISCLAIMED. IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE
32 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
33 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
34 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
35 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
36 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
37 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
38 * SUCH DAMAGE.
41 /* $Id: roken.h,v 1.12 2008/03/22 08:37:24 mlelstv Exp $ */
43 #include <stdio.h>
44 #include <stdlib.h>
45 #include <stdarg.h>
46 #include <stdint.h>
47 #include <string.h>
48 #include <signal.h>
50 #include <sys/param.h>
51 #include <inttypes.h>
52 #include <sys/types.h>
53 #include <unistd.h>
54 #include <sys/socket.h>
55 #include <sys/uio.h>
56 #include <grp.h>
57 #include <sys/stat.h>
58 #include <netinet/in.h>
59 #include <arpa/inet.h>
60 #include <netdb.h>
61 #include <arpa/nameser.h>
62 #include <resolv.h>
63 #include <syslog.h>
64 #include <fcntl.h>
65 #include <errno.h>
66 #include <err.h>
67 #include <termios.h>
68 #include <sys/ioctl.h>
69 #include <sys/time.h>
70 #include <time.h>
71 #include <strings.h>
73 #include <paths.h>
76 #include <roken-common.h>
78 ROKEN_CPP_START
80 #define rk_UNCONST(x) ((void *)(uintptr_t)(const void *)(x))
91 int ROKEN_LIB_FUNCTION
92 asnprintf (char **, size_t, const char *, ...)
93 __attribute__ ((format (printf, 3, 4)));
95 int ROKEN_LIB_FUNCTION
96 vasnprintf (char **, size_t, const char *, va_list)
97 __attribute__((format (printf, 3, 0)));
101 char * ROKEN_LIB_FUNCTION strlwr(char *);
103 size_t ROKEN_LIB_FUNCTION strnlen(const char*, size_t);
106 ssize_t ROKEN_LIB_FUNCTION strsep_copy(const char**, const char*, char*, size_t);
111 char * ROKEN_LIB_FUNCTION strupr(char *);
123 #include <pwd.h>
124 struct passwd * ROKEN_LIB_FUNCTION k_getpwnam (const char *);
125 struct passwd * ROKEN_LIB_FUNCTION k_getpwuid (uid_t);
127 const char * ROKEN_LIB_FUNCTION get_default_username (void);
132 int ROKEN_LIB_FUNCTION mkstemp(char *);
137 int ROKEN_LIB_FUNCTION daemon(int, int);
152 time_t ROKEN_LIB_FUNCTION tm2time (struct tm, int);
154 int ROKEN_LIB_FUNCTION unix_verify_user(char *, char *);
156 int ROKEN_LIB_FUNCTION roken_concat (char *, size_t, ...);
158 size_t ROKEN_LIB_FUNCTION roken_mconcat (char **, size_t, ...);
160 int ROKEN_LIB_FUNCTION roken_vconcat (char *, size_t, va_list);
162 size_t ROKEN_LIB_FUNCTION
163 roken_vmconcat (char **, size_t, va_list);
165 ssize_t ROKEN_LIB_FUNCTION net_write (int, const void *, size_t);
167 ssize_t ROKEN_LIB_FUNCTION net_read (int, void *, size_t);
169 int ROKEN_LIB_FUNCTION issuid(void);
172 int ROKEN_LIB_FUNCTION get_window_size(int fd, struct winsize *);
176 extern char **environ;
178 struct hostent * ROKEN_LIB_FUNCTION
179 getipnodebyname (const char *, int, int, int *);
181 struct hostent * ROKEN_LIB_FUNCTION
182 getipnodebyaddr (const void *, size_t, int, int *);
184 void ROKEN_LIB_FUNCTION
185 freehostent (struct hostent *);
187 struct hostent * ROKEN_LIB_FUNCTION
188 copyhostent (const struct hostent *);
197 int ROKEN_LIB_FUNCTION
198 getnameinfo_verified(const struct sockaddr *, socklen_t,
199 char *, size_t,
200 char *, size_t,
201 int);
203 int ROKEN_LIB_FUNCTION
204 roken_getaddrinfo_hostspec(const char *, int, struct addrinfo **);
205 int ROKEN_LIB_FUNCTION
206 roken_getaddrinfo_hostspec2(const char *, int, int, struct addrinfo **);
210 void * ROKEN_LIB_FUNCTION emalloc (size_t);
211 void * ROKEN_LIB_FUNCTION ecalloc(size_t, size_t);
212 void * ROKEN_LIB_FUNCTION erealloc (void *, size_t);
213 char * ROKEN_LIB_FUNCTION estrdup (const char *);
216 * kludges and such
219 int ROKEN_LIB_FUNCTION
220 roken_gethostby_setup(const char*, const char*);
221 struct hostent* ROKEN_LIB_FUNCTION
222 roken_gethostbyname(const char*);
223 struct hostent* ROKEN_LIB_FUNCTION
224 roken_gethostbyaddr(const void*, size_t, int);
226 #define roken_getservbyname(x,y) getservbyname(x,y)
228 #define roken_openlog(a,b,c) openlog(a,b,c)
230 #define roken_getsockname(a,b,c) getsockname(a,b,c)
235 void ROKEN_LIB_FUNCTION mini_inetd_addrinfo (struct addrinfo*);
236 void ROKEN_LIB_FUNCTION mini_inetd (int);
249 ROKEN_CPP_END
250 #define ROKEN_VERSION 1.1
252 #endif /* __ROKEN_H__ */