blob: 89ccf83b757718b7c4617df8d1e223138a5a2f39 [file] [log] [blame]
Linus Torvalds1da177e2005-04-16 15:20:36 -07001#ifndef __UM_SLIRP_H
2#define __UM_SLIRP_H
3
Jeff Dikea3c77c62005-06-13 15:52:18 -07004#include "slip_common.h"
Linus Torvalds1da177e2005-04-16 15:20:36 -07005
6#define SLIRP_MAX_ARGS 100
7/*
8 * XXX this next definition is here because I don't understand why this
9 * initializer doesn't work in slirp_kern.c:
10 *
11 * argv : { init->argv[ 0 ... SLIRP_MAX_ARGS-1 ] },
12 *
13 * or why I can't typecast like this:
14 *
15 * argv : (char* [SLIRP_MAX_ARGS])(init->argv),
16 */
17struct arg_list_dummy_wrapper { char *argv[SLIRP_MAX_ARGS]; };
18
19struct slirp_data {
20 void *dev;
21 struct arg_list_dummy_wrapper argw;
22 int pid;
23 int slave;
Jeff Dikea3c77c62005-06-13 15:52:18 -070024 struct slip_proto slip;
Linus Torvalds1da177e2005-04-16 15:20:36 -070025};
26
Jeff Dike5e7672e2006-09-27 01:50:33 -070027extern const struct net_user_info slirp_user_info;
Linus Torvalds1da177e2005-04-16 15:20:36 -070028
Linus Torvalds1da177e2005-04-16 15:20:36 -070029extern int slirp_user_read(int fd, void *buf, int len, struct slirp_data *pri);
Jeff Dikea3c77c62005-06-13 15:52:18 -070030extern int slirp_user_write(int fd, void *buf, int len,
31 struct slirp_data *pri);
Linus Torvalds1da177e2005-04-16 15:20:36 -070032
33#endif