Revision 6cb9c6d3 slirp/slirp.h
b/slirp/slirp.h | ||
---|---|---|
103 | 103 |
#include <sys/uio.h> |
104 | 104 |
#endif |
105 | 105 |
|
106 |
#undef _P |
|
107 |
#ifndef NO_PROTOTYPES |
|
108 |
# define _P(x) x |
|
109 |
#else |
|
110 |
# define _P(x) () |
|
111 |
#endif |
|
112 |
|
|
113 | 106 |
#ifndef _WIN32 |
114 | 107 |
#include <netinet/in.h> |
115 | 108 |
#include <arpa/inet.h> |
... | ... | |
121 | 114 |
|
122 | 115 |
/* Systems lacking strdup() definition in <string.h>. */ |
123 | 116 |
#if defined(ultrix) |
124 |
char *strdup _P((const char *));
|
|
117 |
char *strdup(const char *);
|
|
125 | 118 |
#endif |
126 | 119 |
|
127 | 120 |
/* Systems lacking malloc() definition in <stdlib.h>. */ |
128 | 121 |
#if defined(ultrix) || defined(hcx) |
129 |
void *malloc _P((size_t arg));
|
|
130 |
void free _P((void *ptr));
|
|
122 |
void *malloc(size_t arg);
|
|
123 |
void free(void *ptr);
|
|
131 | 124 |
#endif |
132 | 125 |
|
133 | 126 |
#ifndef HAVE_INET_ATON |
134 |
int inet_aton _P((const char *cp, struct in_addr *ia));
|
|
127 |
int inet_aton(const char *cp, struct in_addr *ia);
|
|
135 | 128 |
#endif |
136 | 129 |
|
137 | 130 |
#include <fcntl.h> |
... | ... | |
270 | 263 |
#endif |
271 | 264 |
|
272 | 265 |
#ifndef FULL_BOLT |
273 |
void if_start _P((Slirp *));
|
|
266 |
void if_start(Slirp *);
|
|
274 | 267 |
#else |
275 |
void if_start _P((struct ttys *));
|
|
268 |
void if_start(struct ttys *);
|
|
276 | 269 |
#endif |
277 | 270 |
|
278 | 271 |
#ifdef BAD_SPRINTF |
279 | 272 |
# define vsprintf vsprintf_len |
280 | 273 |
# define sprintf sprintf_len |
281 |
extern int vsprintf_len _P((char *, const char *, va_list));
|
|
282 |
extern int sprintf_len _P((char *, const char *, ...));
|
|
274 |
extern int vsprintf_len(char *, const char *, va_list);
|
|
275 |
extern int sprintf_len(char *, const char *, ...);
|
|
283 | 276 |
#endif |
284 | 277 |
|
285 | 278 |
#ifdef DECLARE_SPRINTF |
286 | 279 |
# ifndef BAD_SPRINTF |
287 |
extern int vsprintf _P((char *, const char *, va_list));
|
|
280 |
extern int vsprintf(char *, const char *, va_list);
|
|
288 | 281 |
# endif |
289 |
extern int vfprintf _P((FILE *, const char *, va_list));
|
|
282 |
extern int vfprintf(FILE *, const char *, va_list);
|
|
290 | 283 |
#endif |
291 | 284 |
|
292 | 285 |
#ifndef HAVE_STRERROR |
293 |
extern char *strerror _P((int error));
|
|
286 |
extern char *strerror(int error);
|
|
294 | 287 |
#endif |
295 | 288 |
|
296 | 289 |
#ifndef HAVE_INDEX |
297 |
char *index _P((const char *, int));
|
|
290 |
char *index(const char *, int);
|
|
298 | 291 |
#endif |
299 | 292 |
|
300 | 293 |
#ifndef HAVE_GETHOSTID |
301 |
long gethostid _P((void));
|
|
294 |
long gethostid(void);
|
|
302 | 295 |
#endif |
303 | 296 |
|
304 |
void lprint _P((const char *, ...));
|
|
297 |
void lprint(const char *, ...);
|
|
305 | 298 |
|
306 | 299 |
#ifndef _WIN32 |
307 | 300 |
#include <netdb.h> |
... | ... | |
316 | 309 |
int cksum(struct mbuf *m, int len); |
317 | 310 |
|
318 | 311 |
/* if.c */ |
319 |
void if_init _P((Slirp *));
|
|
320 |
void if_output _P((struct socket *, struct mbuf *));
|
|
312 |
void if_init(Slirp *);
|
|
313 |
void if_output(struct socket *, struct mbuf *);
|
|
321 | 314 |
|
322 | 315 |
/* ip_input.c */ |
323 |
void ip_init _P((Slirp *));
|
|
324 |
void ip_input _P((struct mbuf *));
|
|
325 |
void ip_slowtimo _P((Slirp *));
|
|
326 |
void ip_stripoptions _P((register struct mbuf *, struct mbuf *));
|
|
316 |
void ip_init(Slirp *);
|
|
317 |
void ip_input(struct mbuf *);
|
|
318 |
void ip_slowtimo(Slirp *);
|
|
319 |
void ip_stripoptions(register struct mbuf *, struct mbuf *);
|
|
327 | 320 |
|
328 | 321 |
/* ip_output.c */ |
329 |
int ip_output _P((struct socket *, struct mbuf *));
|
|
322 |
int ip_output(struct socket *, struct mbuf *);
|
|
330 | 323 |
|
331 | 324 |
/* tcp_input.c */ |
332 |
void tcp_input _P((register struct mbuf *, int, struct socket *));
|
|
333 |
int tcp_mss _P((register struct tcpcb *, u_int));
|
|
325 |
void tcp_input(register struct mbuf *, int, struct socket *);
|
|
326 |
int tcp_mss(register struct tcpcb *, u_int);
|
|
334 | 327 |
|
335 | 328 |
/* tcp_output.c */ |
336 |
int tcp_output _P((register struct tcpcb *));
|
|
337 |
void tcp_setpersist _P((register struct tcpcb *));
|
|
329 |
int tcp_output(register struct tcpcb *);
|
|
330 |
void tcp_setpersist(register struct tcpcb *);
|
|
338 | 331 |
|
339 | 332 |
/* tcp_subr.c */ |
340 |
void tcp_init _P((Slirp *));
|
|
341 |
void tcp_template _P((struct tcpcb *));
|
|
342 |
void tcp_respond _P((struct tcpcb *, register struct tcpiphdr *, register struct mbuf *, tcp_seq, tcp_seq, int));
|
|
343 |
struct tcpcb * tcp_newtcpcb _P((struct socket *));
|
|
344 |
struct tcpcb * tcp_close _P((register struct tcpcb *));
|
|
345 |
void tcp_sockclosed _P((struct tcpcb *));
|
|
346 |
int tcp_fconnect _P((struct socket *));
|
|
347 |
void tcp_connect _P((struct socket *));
|
|
348 |
int tcp_attach _P((struct socket *));
|
|
349 |
u_int8_t tcp_tos _P((struct socket *));
|
|
350 |
int tcp_emu _P((struct socket *, struct mbuf *));
|
|
351 |
int tcp_ctl _P((struct socket *));
|
|
333 |
void tcp_init(Slirp *);
|
|
334 |
void tcp_template(struct tcpcb *);
|
|
335 |
void tcp_respond(struct tcpcb *, register struct tcpiphdr *, register struct mbuf *, tcp_seq, tcp_seq, int);
|
|
336 |
struct tcpcb * tcp_newtcpcb(struct socket *);
|
|
337 |
struct tcpcb * tcp_close(register struct tcpcb *);
|
|
338 |
void tcp_sockclosed(struct tcpcb *);
|
|
339 |
int tcp_fconnect(struct socket *);
|
|
340 |
void tcp_connect(struct socket *);
|
|
341 |
int tcp_attach(struct socket *);
|
|
342 |
u_int8_t tcp_tos(struct socket *);
|
|
343 |
int tcp_emu(struct socket *, struct mbuf *);
|
|
344 |
int tcp_ctl(struct socket *);
|
|
352 | 345 |
struct tcpcb *tcp_drop(struct tcpcb *tp, int err); |
353 | 346 |
|
354 | 347 |
#ifdef USE_PPP |
Also available in: Unified diff