1 /* This is an OS dependent, generated file */
2 /* Generated by Mark Murray */
9 * Copyright (c) 1995, 1996, 1997, 1998, 1999 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.in,v 1.125 1999/12/02 16:58:52 joda Exp $ */
42 /* $FreeBSD: src/kerberosIV/include/roken.h,v 1.2 2000/01/09 08:59:34 markm Exp $ */
43 /* $DragonFly: src/kerberosIV/include/Attic/roken.h,v 1.2 2003/06/17 04:26:25 dillon Exp $ */
50 #include <sys/param.h>
51 #include <sys/types.h>
53 #include <sys/socket.h>
57 #include <netinet/in.h>
64 #include <sys/ioctl.h>
71 #define ROKEN_LIB_FUNCTION
73 #include <roken-common.h>
84 int asnprintf (char **ret, size_t max_sz, const char *format, ...)
85 __attribute__ ((format (printf, 3, 4)));
87 int vasnprintf (char **ret, size_t max_sz, const char *format, va_list ap)
88 __attribute__((format (printf, 3, 0)));
91 char * strndup(const char *old, size_t sz);
93 char * strlwr(char *);
95 size_t strnlen(const char*, size_t);
101 char * strupr(char *);
114 struct passwd *k_getpwnam (const char *user);
115 struct passwd *k_getpwuid (uid_t uid);
117 const char *get_default_username (void);
137 time_t tm2time (struct tm tm, int local);
139 int unix_verify_user(char *user, char *password);
141 void inaddr2str(struct in_addr addr, char *s, size_t len);
143 void mini_inetd (int port);
145 int roken_concat (char *s, size_t len, ...);
147 size_t roken_mconcat (char **s, size_t max_len, ...);
149 int roken_vconcat (char *s, size_t len, va_list args);
151 size_t roken_vmconcat (char **s, size_t max_len, va_list args);
153 ssize_t net_write (int fd, const void *buf, size_t nbytes);
155 ssize_t net_read (int fd, void *buf, size_t nbytes);
160 int get_window_size(int fd, struct winsize *);
164 extern const char *__progname;
166 extern char **environ;
172 copyhostent (const struct hostent *h);
179 int roken_gethostby_setup(const char*, const char*);
180 struct hostent* roken_gethostbyname(const char*);
181 struct hostent* roken_gethostbyaddr(const void*, size_t, int);
183 #define roken_getservbyname(x,y) getservbyname(x,y)
185 #define roken_openlog(a,b,c) openlog(a,b,c)
187 void set_progname(char *argv0);
189 #endif /* __ROKEN_H__ */