1 /* This is an OS dependent, generated file */
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
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
41 /* $Id: roken.h,v 1.12 2008/03/22 08:37:24 mlelstv Exp $ */
50 #include <sys/param.h>
52 #include <sys/types.h>
54 #include <sys/socket.h>
58 #include <netinet/in.h>
59 #include <arpa/inet.h>
61 #include <arpa/nameser.h>
68 #include <sys/ioctl.h>
76 #include <roken-common.h>
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 *);
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
,
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 *);
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);
250 #define ROKEN_VERSION 1.1
252 #endif /* __ROKEN_H__ */