|
1 //telnetd.h |
|
2 // |
|
3 // © Portions Copyright (c) Symbian Software Ltd 2007. All rights reserved. |
|
4 // |
|
5 /* |
|
6 * Copyright (c) 1989, 1993 |
|
7 * The Regents of the University of California. All rights reserved. |
|
8 * |
|
9 * Redistribution and use in source and binary forms, with or without |
|
10 * modification, are permitted provided that the following conditions |
|
11 * are met: |
|
12 * 1. Redistributions of source code must retain the above copyright |
|
13 * notice, this list of conditions and the following disclaimer. |
|
14 * 2. Redistributions in binary form must reproduce the above copyright |
|
15 * notice, this list of conditions and the following disclaimer in the |
|
16 * documentation and/or other materials provided with the distribution. |
|
17 * 3. Neither the name of the University nor the names of its contributors |
|
18 * may be used to endorse or promote products derived from this software |
|
19 * without specific prior written permission. |
|
20 * |
|
21 * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND |
|
22 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE |
|
23 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE |
|
24 * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE |
|
25 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL |
|
26 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS |
|
27 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) |
|
28 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT |
|
29 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY |
|
30 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF |
|
31 * SUCH DAMAGE. |
|
32 * |
|
33 * @(#)telnetd.h 8.1 (Berkeley) 6/4/93 |
|
34 */ |
|
35 |
|
36 #ifndef __SYMBIAN32__ |
|
37 #include <config.h> |
|
38 #endif |
|
39 |
|
40 #include <stdio.h> |
|
41 #include <stdarg.h> |
|
42 #include <stdlib.h> |
|
43 #include <string.h> |
|
44 #include <sys/types.h> |
|
45 #include <sys/param.h> |
|
46 #include <sys/socket.h> |
|
47 #include <sys/time.h> |
|
48 #include <time.h> |
|
49 #include <sys/time.h> |
|
50 #include <time.h> |
|
51 #include <sys/resource.h> |
|
52 #include <sys/wait.h> |
|
53 #include <fcntl.h> |
|
54 //#include <sys/file.h> |
|
55 #include <sys/stat.h> |
|
56 |
|
57 |
|
58 /* including both <sys/ioctl.h> and <termios.h> in SunOS 4 generates a |
|
59 lot of warnings */ |
|
60 |
|
61 #if defined(HAVE_SYS_IOCTL_H) && SunOS != 40 |
|
62 #include <sys/ioctl.h> |
|
63 #endif |
|
64 |
|
65 #include <sys/filio.h> |
|
66 #include <stdapis/netinet/in.h> |
|
67 #include <stdapis/arpa/inet.h> |
|
68 #include <signal.h> |
|
69 #include <errno.h> |
|
70 |
|
71 #include <netdb.h> |
|
72 #include "syslog.h" |
|
73 #include <ctype.h> |
|
74 #include <unistd.h> |
|
75 #include "termios.h" |
|
76 |
|
77 |
|
78 //#include <pty.h> |
|
79 #include "defs.h" |
|
80 |
|
81 #ifndef _POSIX_VDISABLE |
|
82 # ifdef VDISABLE |
|
83 # define _POSIX_VDISABLE VDISABLE |
|
84 # else |
|
85 # define _POSIX_VDISABLE ((unsigned char)'\377') |
|
86 # endif |
|
87 #endif |
|
88 |
|
89 |
|
90 |
|
91 //#include <sys/pty.h> |
|
92 #include <sys/select.h> |
|
93 //#include <sys/ptyio.h> |
|
94 #include <sys/utsname.h> |
|
95 #include <paths.h> |
|
96 #include "telnet.h" |
|
97 #include "ext.h" |
|
98 |
|
99 #ifdef SOCKS |
|
100 #include <socks.h> |
|
101 /* This doesn't belong here. */ |
|
102 struct tm *localtime(const time_t *); |
|
103 struct hostent *gethostbyname(const char *); |
|
104 #endif |
|
105 |
|
106 #ifdef KRB4 |
|
107 #include <krb.h> |
|
108 #endif |
|
109 |
|
110 #ifdef AUTHENTICATION |
|
111 #include <libtelnet/auth.h> |
|
112 #include <libtelnet/misc.h> |
|
113 #ifdef ENCRYPTION |
|
114 #include <libtelnet/encrypt.h> |
|
115 #endif |
|
116 #endif |
|
117 |
|
118 #ifdef HAVE_LIBUTIL_H |
|
119 #include <libutil.h> |
|
120 #endif |
|
121 |
|
122 #ifndef __SYMBIAN32__ |
|
123 #include <roken.h> |
|
124 #endif |
|
125 |
|
126 /* Don't use the system login, use our version instead */ |
|
127 |
|
128 /* BINDIR should be defined somewhere else... */ |
|
129 |
|
130 #ifndef BINDIR |
|
131 #define BINDIR "/usr/athena/bin" |
|
132 #endif |
|
133 |
|
134 #undef _PATH_LOGIN |
|
135 #define _PATH_LOGIN BINDIR "/login" |
|
136 |
|
137 /* fallbacks */ |
|
138 |
|
139 #ifndef _PATH_DEV |
|
140 #define _PATH_DEV "/dev/" |
|
141 #endif |
|
142 |
|
143 #ifndef _PATH_TTY |
|
144 #define _PATH_TTY "/dev/tty" |
|
145 #endif /* _PATH_TTY */ |
|
146 |
|
147 #ifdef DIAGNOSTICS |
|
148 #define DIAG(a,b) if (diagnostic & (a)) b |
|
149 #else |
|
150 #define DIAG(a,b) |
|
151 #endif |
|
152 |
|
153 /* other external variables */ |
|
154 #ifndef __SYMBIAN32__ |
|
155 extern char **environ; |
|
156 #endif |
|
157 |
|
158 /* prototypes */ |
|
159 |
|
160 /* appends data to nfrontp and advances */ |
|
161 int output_data (const char *format, ...) |
|
162 #ifdef __GNUC__ |
|
163 __attribute__ ((format (printf, 1, 2))) |
|
164 #endif |
|
165 ; |