1*b2441318SGreg Kroah-Hartman /* SPDX-License-Identifier: GPL-2.0 */ 21da177e4SLinus Torvalds #ifndef __UM_SLIRP_H 31da177e4SLinus Torvalds #define __UM_SLIRP_H 41da177e4SLinus Torvalds 5a3c77c67SJeff Dike #include "slip_common.h" 61da177e4SLinus Torvalds 71da177e4SLinus Torvalds #define SLIRP_MAX_ARGS 100 81da177e4SLinus Torvalds /* 91da177e4SLinus Torvalds * XXX this next definition is here because I don't understand why this 101da177e4SLinus Torvalds * initializer doesn't work in slirp_kern.c: 111da177e4SLinus Torvalds * 121da177e4SLinus Torvalds * argv : { init->argv[ 0 ... SLIRP_MAX_ARGS-1 ] }, 131da177e4SLinus Torvalds * 141da177e4SLinus Torvalds * or why I can't typecast like this: 151da177e4SLinus Torvalds * 161da177e4SLinus Torvalds * argv : (char* [SLIRP_MAX_ARGS])(init->argv), 171da177e4SLinus Torvalds */ 181da177e4SLinus Torvalds struct arg_list_dummy_wrapper { char *argv[SLIRP_MAX_ARGS]; }; 191da177e4SLinus Torvalds 201da177e4SLinus Torvalds struct slirp_data { 211da177e4SLinus Torvalds void *dev; 221da177e4SLinus Torvalds struct arg_list_dummy_wrapper argw; 231da177e4SLinus Torvalds int pid; 241da177e4SLinus Torvalds int slave; 25a3c77c67SJeff Dike struct slip_proto slip; 261da177e4SLinus Torvalds }; 271da177e4SLinus Torvalds 285e7672ecSJeff Dike extern const struct net_user_info slirp_user_info; 291da177e4SLinus Torvalds 301da177e4SLinus Torvalds extern int slirp_user_read(int fd, void *buf, int len, struct slirp_data *pri); 31a3c77c67SJeff Dike extern int slirp_user_write(int fd, void *buf, int len, 32a3c77c67SJeff Dike struct slirp_data *pri); 331da177e4SLinus Torvalds 341da177e4SLinus Torvalds #endif 35