Add the DragonFly cvs id and perform general cleanups on cvs/rcs/sccs ids. Most
[dragonfly.git] / kerberosIV / include / roken.h
1 /* This is an OS dependent, generated file */
2 /* Generated by Mark Murray */
3
4 #ifndef __ROKEN_H__
5 #define __ROKEN_H__
6
7 /* -*- C -*- */
8 /*
9  * Copyright (c) 1995, 1996, 1997, 1998, 1999 Kungliga Tekniska Högskolan
10  * (Royal Institute of Technology, Stockholm, Sweden).
11  * All rights reserved.
12  * 
13  * Redistribution and use in source and binary forms, with or without
14  * modification, are permitted provided that the following conditions
15  * are met:
16  * 
17  * 1. Redistributions of source code must retain the above copyright
18  *    notice, this list of conditions and the following disclaimer.
19  * 
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.
23  * 
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.
27  * 
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.
39  */
40
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 $ */
44
45 #include <stdio.h>
46 #include <stdlib.h>
47 #include <stdarg.h>
48 #include <string.h>
49 #include <signal.h>
50 #include <sys/param.h>
51 #include <sys/types.h>
52 #include <unistd.h>
53 #include <sys/socket.h>
54 #include <sys/uio.h>
55 #include <grp.h>
56 #include <sys/stat.h>
57 #include <netinet/in.h>
58 #include <netdb.h>
59 #include <syslog.h>
60 #include <fcntl.h>
61 #include <errno.h>
62 #include <err.h>
63 #include <termios.h>
64 #include <sys/ioctl.h>
65 #include <sys/time.h>
66 #include <time.h>
67
68 #include <paths.h>
69
70
71 #define ROKEN_LIB_FUNCTION
72
73 #include <roken-common.h>
74
75
76
77
78
79
80
81
82
83
84 int asnprintf (char **ret, size_t max_sz, const char *format, ...)
85      __attribute__ ((format (printf, 3, 4)));
86
87 int vasnprintf (char **ret, size_t max_sz, const char *format, va_list ap)
88      __attribute__((format (printf, 3, 0)));
89
90
91 char * strndup(const char *old, size_t sz);
92
93 char * strlwr(char *);
94
95 size_t strnlen(const char*, size_t);
96
97
98
99
100
101 char * strupr(char *);
102
103
104
105
106
107
108
109
110
111
112
113 #include <pwd.h>
114 struct passwd *k_getpwnam (const char *user);
115 struct passwd *k_getpwuid (uid_t uid);
116
117 const char *get_default_username (void);
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137 time_t tm2time (struct tm tm, int local);
138
139 int unix_verify_user(char *user, char *password);
140
141 void inaddr2str(struct in_addr addr, char *s, size_t len);
142
143 void mini_inetd (int port);
144
145 int roken_concat (char *s, size_t len, ...);
146
147 size_t roken_mconcat (char **s, size_t max_len, ...);
148
149 int roken_vconcat (char *s, size_t len, va_list args);
150
151 size_t roken_vmconcat (char **s, size_t max_len, va_list args);
152
153 ssize_t net_write (int fd, const void *buf, size_t nbytes);
154
155 ssize_t net_read (int fd, void *buf, size_t nbytes);
156
157 int issuid(void);
158
159
160 int get_window_size(int fd, struct winsize *);
161
162
163
164 extern const char *__progname;
165
166 extern char **environ;
167
168
169
170
171 struct hostent *
172 copyhostent (const struct hostent *h);
173
174
175 /*
176  * kludges and such
177  */
178
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);
182
183 #define roken_getservbyname(x,y) getservbyname(x,y)
184
185 #define roken_openlog(a,b,c) openlog(a,b,c)
186
187 void set_progname(char *argv0);
188
189 #endif /* __ROKEN_H__ */