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 $ */
49 #include <sys/param.h>
50 #include <sys/types.h>
52 #include <sys/socket.h>
56 #include <netinet/in.h>
63 #include <sys/ioctl.h>
70 #define ROKEN_LIB_FUNCTION
72 #include <roken-common.h>
83 int asnprintf (char **ret, size_t max_sz, const char *format, ...)
84 __attribute__ ((format (printf, 3, 4)));
86 int vasnprintf (char **ret, size_t max_sz, const char *format, va_list ap)
87 __attribute__((format (printf, 3, 0)));
90 char * strndup(const char *old, size_t sz);
92 char * strlwr(char *);
94 size_t strnlen(const char*, size_t);
100 char * strupr(char *);
113 struct passwd *k_getpwnam (const char *user);
114 struct passwd *k_getpwuid (uid_t uid);
116 const char *get_default_username (void);
136 time_t tm2time (struct tm tm, int local);
138 int unix_verify_user(char *user, char *password);
140 void inaddr2str(struct in_addr addr, char *s, size_t len);
142 void mini_inetd (int port);
144 int roken_concat (char *s, size_t len, ...);
146 size_t roken_mconcat (char **s, size_t max_len, ...);
148 int roken_vconcat (char *s, size_t len, va_list args);
150 size_t roken_vmconcat (char **s, size_t max_len, va_list args);
152 ssize_t net_write (int fd, const void *buf, size_t nbytes);
154 ssize_t net_read (int fd, void *buf, size_t nbytes);
159 int get_window_size(int fd, struct winsize *);
163 extern const char *__progname;
165 extern char **environ;
171 copyhostent (const struct hostent *h);
178 int roken_gethostby_setup(const char*, const char*);
179 struct hostent* roken_gethostbyname(const char*);
180 struct hostent* roken_gethostbyaddr(const void*, size_t, int);
182 #define roken_getservbyname(x,y) getservbyname(x,y)
184 #define roken_openlog(a,b,c) openlog(a,b,c)
186 void set_progname(char *argv0);
188 #endif /* __ROKEN_H__ */