slirp: replace QEMU_BUILD_BUG_ON with G_STATIC_ASSERT
[qemu/ar7.git] / slirp / misc.h
blobc2ceadb591b7a879193cc52e7f42a5fc96f1147d
1 /*
2 * Copyright (c) 1995 Danny Gasparovski.
4 * Please read the file COPYRIGHT for the
5 * terms and conditions of the copyright.
6 */
8 #ifndef MISC_H
9 #define MISC_H
11 #include "libslirp.h"
13 struct gfwd_list {
14 SlirpWriteCb write_cb;
15 void *opaque;
16 struct in_addr ex_addr; /* Server address */
17 int ex_fport; /* Port to telnet to */
18 char *ex_exec; /* Command line of what to exec */
19 struct gfwd_list *ex_next;
22 #define EMU_NONE 0x0
24 /* TCP emulations */
25 #define EMU_CTL 0x1
26 #define EMU_FTP 0x2
27 #define EMU_KSH 0x3
28 #define EMU_IRC 0x4
29 #define EMU_REALAUDIO 0x5
30 #define EMU_RLOGIN 0x6
31 #define EMU_IDENT 0x7
33 #define EMU_NOCONNECT 0x10 /* Don't connect */
35 struct tos_t {
36 uint16_t lport;
37 uint16_t fport;
38 uint8_t tos;
39 uint8_t emu;
42 struct emu_t {
43 uint16_t lport;
44 uint16_t fport;
45 uint8_t tos;
46 uint8_t emu;
47 struct emu_t *next;
50 struct slirp_quehead {
51 struct slirp_quehead *qh_link;
52 struct slirp_quehead *qh_rlink;
55 void slirp_insque(void *, void *);
56 void slirp_remque(void *);
57 int fork_exec(struct socket *so, const char *ex);
59 struct gfwd_list *
60 add_guestfwd(struct gfwd_list **ex_ptr,
61 SlirpWriteCb write_cb, void *opaque,
62 struct in_addr addr, int port);
64 struct gfwd_list *
65 add_exec(struct gfwd_list **ex_ptr, const char *cmdline,
66 struct in_addr addr, int port);
68 #endif