]> The Tcpdump Group git mirrors - tcpdump/blob - lbl/os-sunos4.h
Handle very large -f files by rejecting them.
[tcpdump] / lbl / os-sunos4.h
1 /*
2 * Copyright (c) 1989, 1990, 1993, 1994, 1995, 1996
3 * The Regents of the University of California. All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that: (1) source code distributions
7 * retain the above copyright notice and this paragraph in its entirety, (2)
8 * distributions including binary code include the above copyright notice and
9 * this paragraph in its entirety in the documentation or other materials
10 * provided with the distribution, and (3) all advertising materials mentioning
11 * features or use of this software display the following acknowledgement:
12 * ``This product includes software developed by the University of California,
13 * Lawrence Berkeley Laboratory and its contributors.'' Neither the name of
14 * the University nor the names of its contributors may be used to endorse
15 * or promote products derived from this software without specific prior
16 * written permission.
17 * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED
18 * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
19 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
20 */
21
22 /* Prototypes missing in SunOS 4 */
23 #ifdef FILE
24 int _filbuf(FILE *);
25 int _flsbuf(u_char, FILE *);
26 int fclose(FILE *);
27 int fflush(FILE *);
28 int fgetc(FILE *);
29 int fprintf(FILE *, const char *, ...);
30 int fputc(int, FILE *);
31 int fputs(const char *, FILE *);
32 u_int fread(void *, u_int, u_int, FILE *);
33 int fseek(FILE *, long, int);
34 u_int fwrite(const void *, u_int, u_int, FILE *);
35 int pclose(FILE *);
36 void rewind(FILE *);
37 void setbuf(FILE *, char *);
38 int setlinebuf(FILE *);
39 int ungetc(int, FILE *);
40 int vfprintf(FILE *, const char *, ...);
41 int vprintf(const char *, ...);
42 #endif
43
44 #if __GNUC__ <= 1
45 int read(int, char *, u_int);
46 int write(int, char *, u_int);
47 #endif
48
49 long a64l(const char *);
50 #ifdef __STDC__
51 struct sockaddr;
52 #endif
53 int accept(int, struct sockaddr *, int *);
54 int bind(int, struct sockaddr *, int);
55 int bcmp(const void *, const void *, u_int);
56 void bcopy(const void *, void *, u_int);
57 void bzero(void *, int);
58 int chroot(const char *);
59 int close(int);
60 void closelog(void);
61 int connect(int, struct sockaddr *, int);
62 char *crypt(const char *, const char *);
63 int daemon(int, int);
64 int fchmod(int, int);
65 int fchown(int, int, int);
66 void endgrent(void);
67 void endpwent(void);
68 void endservent(void);
69 #ifdef __STDC__
70 struct ether_addr;
71 #endif
72 struct ether_addr *ether_aton(const char *);
73 int flock(int, int);
74 #ifdef __STDC__
75 struct stat;
76 #endif
77 int fstat(int, struct stat *);
78 #ifdef __STDC__
79 struct statfs;
80 #endif
81 int fstatfs(int, struct statfs *);
82 int fsync(int);
83 #ifdef __STDC__
84 struct timeb;
85 #endif
86 int ftime(struct timeb *);
87 int ftruncate(int, off_t);
88 int getdtablesize(void);
89 long gethostid(void);
90 int gethostname(char *, int);
91 int getopt(int, char * const *, const char *);
92 int getpagesize(void);
93 char *getpass(char *);
94 int getpeername(int, struct sockaddr *, int *);
95 int getpriority(int, int);
96 #ifdef __STDC__
97 struct rlimit;
98 #endif
99 int getrlimit(int, struct rlimit *);
100 int getsockname(int, struct sockaddr *, int *);
101 int getsockopt(int, int, int, char *, int *);
102 #ifdef __STDC__
103 struct timeval;
104 struct timezone;
105 #endif
106 int gettimeofday(struct timeval *, struct timezone *);
107 char *getusershell(void);
108 char *getwd(char *);
109 int initgroups(const char *, int);
110 int ioctl(int, int, caddr_t);
111 int iruserok(u_long, int, char *, char *);
112 int isatty(int);
113 int killpg(int, int);
114 int listen(int, int);
115 #ifdef __STDC__
116 struct utmp;
117 #endif
118 void login(struct utmp *);
119 int logout(const char *);
120 off_t lseek(int, off_t, int);
121 int lstat(const char *, struct stat *);
122 int mkstemp(char *);
123 char *mktemp(char *);
124 int munmap(caddr_t, int);
125 void openlog(const char *, int, int);
126 void perror(const char *);
127 int printf(const char *, ...);
128 int puts(const char *);
129 long random(void);
130 int readlink(const char *, char *, int);
131 #ifdef __STDC__
132 struct iovec;
133 #endif
134 int readv(int, struct iovec *, int);
135 int recv(int, char *, u_int, int);
136 int recvfrom(int, char *, u_int, int, struct sockaddr *, int *);
137 int rename(const char *, const char *);
138 int rcmd(char **, u_short, char *, char *, char *, int *);
139 int rresvport(int *);
140 int send(int, char *, u_int, int);
141 int sendto(int, char *, u_int, int, struct sockaddr *, int);
142 int setenv(const char *, const char *, int);
143 int seteuid(int);
144 int setpriority(int, int, int);
145 int select(int, fd_set *, fd_set *, fd_set *, struct timeval *);
146 int setpgrp(int, int);
147 void setpwent(void);
148 int setrlimit(int, struct rlimit *);
149 void setservent(int);
150 int setsockopt(int, int, int, char *, int);
151 int shutdown(int, int);
152 int sigblock(int);
153 void (*signal (int, void (*) (int))) (int);
154 int sigpause(int);
155 int sigsetmask(int);
156 #ifdef __STDC__
157 struct sigvec;
158 #endif
159 int sigvec(int, struct sigvec *, struct sigvec*);
160 int snprintf(char *, size_t, const char *, ...);
161 int socket(int, int, int);
162 int socketpair(int, int, int, int *);
163 int symlink(const char *, const char *);
164 void srandom(int);
165 int sscanf(char *, const char *, ...);
166 int stat(const char *, struct stat *);
167 int statfs(char *, struct statfs *);
168 char *strerror(int);
169 #ifdef __STDC__
170 struct tm;
171 #endif
172 int strftime(char *, int, char *, struct tm *);
173 long strtol(const char *, char **, int);
174 void sync(void);
175 void syslog(int, const char *, ...);
176 int system(const char *);
177 long tell(int);
178 time_t time(time_t *);
179 char *timezone(int, int);
180 int tolower(int);
181 int toupper(int);
182 int truncate(char *, off_t);
183 void unsetenv(const char *);
184 int vfork(void);
185 int vsprintf(char *, const char *, ...);
186 int writev(int, struct iovec *, int);
187 #ifdef __STDC__
188 struct rusage;
189 #endif
190 int utimes(const char *, struct timeval *);
191 #if __GNUC__ <= 1
192 int wait(int *);
193 pid_t wait3(int *, int, struct rusage *);
194 #endif
195
196 /* Ugly signal hacking */
197 #ifdef SIG_ERR
198 #undef SIG_ERR
199 #define SIG_ERR (void (*)(int))-1
200 #undef SIG_DFL
201 #define SIG_DFL (void (*)(int))0
202 #undef SIG_IGN
203 #define SIG_IGN (void (*)(int))1
204
205 #ifdef KERNEL
206 #undef SIG_CATCH
207 #define SIG_CATCH (void (*)(int))2
208 #endif
209 #undef SIG_HOLD
210 #define SIG_HOLD (void (*)(int))3
211 #endif