diff options
author | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-04-16 18:20:36 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-04-16 18:20:36 -0400 |
commit | 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 (patch) | |
tree | 0bba044c4ce775e45a88a51686b5d9f90697ea9d /arch/um/drivers/slirp.h |
Linux-2.6.12-rc2v2.6.12-rc2
Initial git repository build. I'm not bothering with the full history,
even though we have it. We can create a separate "historical" git
archive of that later if we want to, and in the meantime it's about
3.2GB when imported into git - space that would just make the early
git days unnecessarily complicated, when we don't have a lot of good
infrastructure for it.
Let it rip!
Diffstat (limited to 'arch/um/drivers/slirp.h')
-rw-r--r-- | arch/um/drivers/slirp.h | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/arch/um/drivers/slirp.h b/arch/um/drivers/slirp.h new file mode 100644 index 000000000000..04e407d1e44a --- /dev/null +++ b/arch/um/drivers/slirp.h | |||
@@ -0,0 +1,51 @@ | |||
1 | #ifndef __UM_SLIRP_H | ||
2 | #define __UM_SLIRP_H | ||
3 | |||
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) | ||
8 | |||
9 | #define SLIRP_MAX_ARGS 100 | ||
10 | /* | ||
11 | * XXX this next definition is here because I don't understand why this | ||
12 | * initializer doesn't work in slirp_kern.c: | ||
13 | * | ||
14 | * argv : { init->argv[ 0 ... SLIRP_MAX_ARGS-1 ] }, | ||
15 | * | ||
16 | * or why I can't typecast like this: | ||
17 | * | ||
18 | * argv : (char* [SLIRP_MAX_ARGS])(init->argv), | ||
19 | */ | ||
20 | struct arg_list_dummy_wrapper { char *argv[SLIRP_MAX_ARGS]; }; | ||
21 | |||
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; | ||
32 | }; | ||
33 | |||
34 | extern struct net_user_info slirp_user_info; | ||
35 | |||
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); | ||
39 | |||
40 | #endif | ||
41 | |||
42 | /* | ||
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: | ||
51 | */ | ||