Statistics
| Branch: | Revision:

root / slirp / misc.h @ eb38c52c

History | View | Annotate | Download (2 kB)

1 f0cbd3ec bellard
/*
2 f0cbd3ec bellard
 * Copyright (c) 1995 Danny Gasparovski.
3 5fafdf24 ths
 *
4 5fafdf24 ths
 * 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 9634d903 blueswir1
        const 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 79383c9c blueswir1
extern u_int time_fasttimo, last_slowtimo;
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 7c829863 blueswir1
#ifndef CONFIG_QEMU
67 f0cbd3ec bellard
extern struct emu_t *tcpemu;
68 7c829863 blueswir1
#endif
69 f0cbd3ec bellard
70 f0cbd3ec bellard
extern int x_port, x_server, x_display;
71 f0cbd3ec bellard
72 f0cbd3ec bellard
int show_x _P((char *, struct socket *));
73 f0cbd3ec bellard
void redir_x _P((u_int32_t, int, int, int));
74 f0cbd3ec bellard
void getouraddr _P((void));
75 f0cbd3ec bellard
inline  void slirp_insque  _P((void *, void *));
76 f0cbd3ec bellard
inline  void slirp_remque  _P((void *));
77 f0cbd3ec bellard
int add_exec _P((struct ex_list **, int, char *, int, int));
78 f3ff649d bellard
int slirp_openpty _P((int *, int *));
79 9634d903 blueswir1
int fork_exec(struct socket *so, const char *ex, int do_pty);
80 f0cbd3ec bellard
void snooze_hup _P((int));
81 f0cbd3ec bellard
void snooze _P((void));
82 f0cbd3ec bellard
void relay _P((int));
83 f0cbd3ec bellard
void add_emu _P((char *));
84 f0cbd3ec bellard
void u_sleep _P((int));
85 f0cbd3ec bellard
void fd_nonblock _P((int));
86 f0cbd3ec bellard
void fd_block _P((int));
87 f0cbd3ec bellard
int rsh_exec _P((struct socket *, struct socket *, char *, char *, char *));
88 f0cbd3ec bellard
89 f0cbd3ec bellard
#endif