2005-04-17 02:20:36 +04:00
|
|
|
#ifndef __UM_SLIRP_H
|
|
|
|
#define __UM_SLIRP_H
|
|
|
|
|
2005-06-14 02:52:18 +04:00
|
|
|
#include "slip_common.h"
|
2005-04-17 02:20:36 +04:00
|
|
|
|
|
|
|
#define SLIRP_MAX_ARGS 100
|
|
|
|
/*
|
|
|
|
* XXX this next definition is here because I don't understand why this
|
|
|
|
* initializer doesn't work in slirp_kern.c:
|
|
|
|
*
|
|
|
|
* argv : { init->argv[ 0 ... SLIRP_MAX_ARGS-1 ] },
|
|
|
|
*
|
|
|
|
* or why I can't typecast like this:
|
|
|
|
*
|
|
|
|
* argv : (char* [SLIRP_MAX_ARGS])(init->argv),
|
|
|
|
*/
|
|
|
|
struct arg_list_dummy_wrapper { char *argv[SLIRP_MAX_ARGS]; };
|
|
|
|
|
|
|
|
struct slirp_data {
|
|
|
|
void *dev;
|
|
|
|
struct arg_list_dummy_wrapper argw;
|
|
|
|
int pid;
|
|
|
|
int slave;
|
2005-06-14 02:52:18 +04:00
|
|
|
struct slip_proto slip;
|
2005-04-17 02:20:36 +04:00
|
|
|
};
|
|
|
|
|
2006-09-27 12:50:33 +04:00
|
|
|
extern const struct net_user_info slirp_user_info;
|
2005-04-17 02:20:36 +04:00
|
|
|
|
|
|
|
extern int slirp_user_read(int fd, void *buf, int len, struct slirp_data *pri);
|
2005-06-14 02:52:18 +04:00
|
|
|
extern int slirp_user_write(int fd, void *buf, int len,
|
|
|
|
struct slirp_data *pri);
|
2005-04-17 02:20:36 +04:00
|
|
|
|
|
|
|
#endif
|