initial commit with v2.6.9
[linux-2.6.9-moxart.git] / arch / um / drivers / slirp.h
blob04e407d1e44aeceb18ec5ef6313816899a8bd068
1 #ifndef __UM_SLIRP_H
2 #define __UM_SLIRP_H
4 #define BUF_SIZE 1500
5 /* two bytes each for a (pathological) max packet of escaped chars + *
6 * terminating END char + initial END char */
7 #define ENC_BUF_SIZE (2 * BUF_SIZE + 2)
9 #define SLIRP_MAX_ARGS 100
11 * XXX this next definition is here because I don't understand why this
12 * initializer doesn't work in slirp_kern.c:
14 * argv : { init->argv[ 0 ... SLIRP_MAX_ARGS-1 ] },
16 * or why I can't typecast like this:
18 * argv : (char* [SLIRP_MAX_ARGS])(init->argv),
20 struct arg_list_dummy_wrapper { char *argv[SLIRP_MAX_ARGS]; };
22 struct slirp_data {
23 void *dev;
24 struct arg_list_dummy_wrapper argw;
25 int pid;
26 int slave;
27 char ibuf[ENC_BUF_SIZE];
28 char obuf[ENC_BUF_SIZE];
29 int more; /* more data: do not read fd until ibuf has been drained */
30 int pos;
31 int esc;
34 extern struct net_user_info slirp_user_info;
36 extern int set_umn_addr(int fd, char *addr, char *ptp_addr);
37 extern int slirp_user_read(int fd, void *buf, int len, struct slirp_data *pri);
38 extern int slirp_user_write(int fd, void *buf, int len, struct slirp_data *pri);
40 #endif
43 * Overrides for Emacs so that we follow Linus's tabbing style.
44 * Emacs will notice this stuff at the end of the file and automatically
45 * adjust the settings for this buffer only. This must remain at the end
46 * of the file.
47 * ---------------------------------------------------------------------------
48 * Local variables:
49 * c-file-style: "linux"
50 * End: