Statistics
| Branch: | Revision:

root / slirp / misc.h @ ea785922

History | View | Annotate | Download (2 kB)

1 f0cbd3ec bellard
/*
2 f0cbd3ec bellard
 * Copyright (c) 1995 Danny Gasparovski.
3 f0cbd3ec bellard
 * 
4 f0cbd3ec bellard
 * Please read the file COPYRIGHT for the 
5 f0cbd3ec bellard
 * terms and conditions of the copyright.
6 f0cbd3ec bellard
 */
7 f0cbd3ec bellard
8 f0cbd3ec bellard
#ifndef _MISC_H_
9 f0cbd3ec bellard
#define _MISC_H_
10 f0cbd3ec bellard
11 f0cbd3ec bellard
struct ex_list {
12 f0cbd3ec bellard
        int ex_pty;                        /* Do we want a pty? */
13 f0cbd3ec bellard
        int ex_addr;                        /* The last byte of the address */
14 f0cbd3ec bellard
        int ex_fport;                   /* Port to telnet to */
15 f0cbd3ec bellard
        char *ex_exec;                  /* Command line of what to exec */
16 f0cbd3ec bellard
        struct ex_list *ex_next;
17 f0cbd3ec bellard
};
18 f0cbd3ec bellard
19 f0cbd3ec bellard
extern struct ex_list *exec_list;
20 f0cbd3ec bellard
extern u_int curtime, time_fasttimo, last_slowtimo, detach_time, detach_wait;
21 f0cbd3ec bellard
22 f0cbd3ec bellard
extern int (*lprint_print) _P((void *, const char *, va_list));
23 f0cbd3ec bellard
extern char *lprint_ptr, *lprint_ptr2, **lprint_arg;
24 f0cbd3ec bellard
extern struct sbuf *lprint_sb;
25 f0cbd3ec bellard
26 f0cbd3ec bellard
#ifndef HAVE_STRDUP
27 f0cbd3ec bellard
char *strdup _P((const char *));
28 f0cbd3ec bellard
#endif
29 f0cbd3ec bellard
30 f0cbd3ec bellard
void do_wait _P((int));
31 f0cbd3ec bellard
32 f0cbd3ec bellard
#define EMU_NONE 0x0
33 f0cbd3ec bellard
34 f0cbd3ec bellard
/* TCP emulations */
35 f0cbd3ec bellard
#define EMU_CTL 0x1
36 f0cbd3ec bellard
#define EMU_FTP 0x2
37 f0cbd3ec bellard
#define EMU_KSH 0x3
38 f0cbd3ec bellard
#define EMU_IRC 0x4
39 f0cbd3ec bellard
#define EMU_REALAUDIO 0x5
40 f0cbd3ec bellard
#define EMU_RLOGIN 0x6
41 f0cbd3ec bellard
#define EMU_IDENT 0x7
42 f0cbd3ec bellard
#define EMU_RSH 0x8
43 f0cbd3ec bellard
44 f0cbd3ec bellard
#define EMU_NOCONNECT 0x10        /* Don't connect */
45 f0cbd3ec bellard
46 f0cbd3ec bellard
/* UDP emulations */
47 f0cbd3ec bellard
#define EMU_TALK        0x1
48 f0cbd3ec bellard
#define EMU_NTALK        0x2
49 f0cbd3ec bellard
#define EMU_CUSEEME        0x3
50 f0cbd3ec bellard
51 f0cbd3ec bellard
struct tos_t {
52 f0cbd3ec bellard
        u_int16_t lport;
53 f0cbd3ec bellard
        u_int16_t fport;
54 f0cbd3ec bellard
        u_int8_t tos;
55 f0cbd3ec bellard
        u_int8_t emu;
56 f0cbd3ec bellard
};
57 f0cbd3ec bellard
58 f0cbd3ec bellard
struct emu_t {
59 f0cbd3ec bellard
        u_int16_t lport;
60 f0cbd3ec bellard
        u_int16_t fport;
61 f0cbd3ec bellard
        u_int8_t tos;
62 f0cbd3ec bellard
        u_int8_t emu;
63 f0cbd3ec bellard
        struct emu_t *next;
64 f0cbd3ec bellard
};
65 f0cbd3ec bellard
66 f0cbd3ec bellard
extern struct emu_t *tcpemu;
67 f0cbd3ec bellard
68 f0cbd3ec bellard
extern int x_port, x_server, x_display;
69 f0cbd3ec bellard
70 f0cbd3ec bellard
int show_x _P((char *, struct socket *));
71 f0cbd3ec bellard
void redir_x _P((u_int32_t, int, int, int));
72 f0cbd3ec bellard
void getouraddr _P((void));
73 f0cbd3ec bellard
inline  void slirp_insque  _P((void *, void *));
74 f0cbd3ec bellard
inline  void slirp_remque  _P((void *));
75 f0cbd3ec bellard
int add_exec _P((struct ex_list **, int, char *, int, int));
76 f3ff649d bellard
int slirp_openpty _P((int *, int *));
77 f0cbd3ec bellard
int fork_exec _P((struct socket *, char *, int));
78 f0cbd3ec bellard
void snooze_hup _P((int));
79 f0cbd3ec bellard
void snooze _P((void));
80 f0cbd3ec bellard
void relay _P((int));
81 f0cbd3ec bellard
void add_emu _P((char *));
82 f0cbd3ec bellard
void u_sleep _P((int));
83 f0cbd3ec bellard
void fd_nonblock _P((int));
84 f0cbd3ec bellard
void fd_block _P((int));
85 f0cbd3ec bellard
int rsh_exec _P((struct socket *, struct socket *, char *, char *, char *));
86 f0cbd3ec bellard
87 f0cbd3ec bellard
#endif