00001
00002
00003
00004
00005
00006
00007
00008 #ifndef _MISC_H_
00009 #define _MISC_H_
00010
00011 struct ex_list {
00012 int ex_pty;
00013 int ex_addr;
00014 int ex_fport;
00015 const char *ex_exec;
00016 struct ex_list *ex_next;
00017 };
00018
00019 extern struct ex_list *exec_list;
00020 extern u_int time_fasttimo, last_slowtimo;
00021
00022 extern int (*lprint_print) _P((void *, const char *, va_list));
00023 extern char *lprint_ptr, *lprint_ptr2, **lprint_arg;
00024 extern struct sbuf *lprint_sb;
00025
00026 #ifndef HAVE_STRDUP
00027 char *strdup _P((const char *));
00028 #endif
00029
00030 void do_wait _P((int));
00031
00032 #define EMU_NONE 0x0
00033
00034
00035 #define EMU_CTL 0x1
00036 #define EMU_FTP 0x2
00037 #define EMU_KSH 0x3
00038 #define EMU_IRC 0x4
00039 #define EMU_REALAUDIO 0x5
00040 #define EMU_RLOGIN 0x6
00041 #define EMU_IDENT 0x7
00042 #define EMU_RSH 0x8
00043
00044 #define EMU_NOCONNECT 0x10
00045
00046
00047 #define EMU_TALK 0x1
00048 #define EMU_NTALK 0x2
00049 #define EMU_CUSEEME 0x3
00050
00051 struct tos_t {
00052 u_int16_t lport;
00053 u_int16_t fport;
00054 u_int8_t tos;
00055 u_int8_t emu;
00056 };
00057
00058 struct emu_t {
00059 u_int16_t lport;
00060 u_int16_t fport;
00061 u_int8_t tos;
00062 u_int8_t emu;
00063 struct emu_t *next;
00064 };
00065
00066 #ifndef CONFIG_QEMU
00067 extern struct emu_t *tcpemu;
00068 #endif
00069
00070 extern int x_port, x_server, x_display;
00071
00072 int show_x _P((char *, struct socket *));
00073 void redir_x _P((u_int32_t, int, int, int));
00074 void getouraddr _P((void));
00075 void slirp_insque _P((void *, void *));
00076 void slirp_remque _P((void *));
00077 int add_exec _P((struct ex_list **, int, char *, int, int));
00078 int slirp_openpty _P((int *, int *));
00079 int fork_exec(struct socket *so, const char *ex, int do_pty);
00080 void snooze_hup _P((int));
00081 void snooze _P((void));
00082 void relay _P((int));
00083 void add_emu _P((char *));
00084 void u_sleep _P((int));
00085 void fd_nonblock _P((int));
00086 void fd_block _P((int));
00087 int rsh_exec _P((struct socket *, struct socket *, char *, char *, char *));
00088
00089 #endif