blob: 4aef2b88249a9e2ef60cb0f22eef2ae2ef9db115 [file] [log] [blame]
Greg Kroah-Hartmanb2441312017-11-01 15:07:57 +01001/* SPDX-License-Identifier: GPL-2.0 */
Linus Torvalds1da177e2005-04-16 15:20:36 -07002#ifndef __UM_SLIRP_H
3#define __UM_SLIRP_H
4
Jeff Dikea3c77c62005-06-13 15:52:18 -07005#include "slip_common.h"
Linus Torvalds1da177e2005-04-16 15:20:36 -07006
7#define SLIRP_MAX_ARGS 100
8/*
9 * XXX this next definition is here because I don't understand why this
10 * initializer doesn't work in slirp_kern.c:
11 *
12 * argv : { init->argv[ 0 ... SLIRP_MAX_ARGS-1 ] },
13 *
14 * or why I can't typecast like this:
15 *
16 * argv : (char* [SLIRP_MAX_ARGS])(init->argv),
17 */
18struct arg_list_dummy_wrapper { char *argv[SLIRP_MAX_ARGS]; };
19
20struct slirp_data {
21 void *dev;
22 struct arg_list_dummy_wrapper argw;
23 int pid;
24 int slave;
Jeff Dikea3c77c62005-06-13 15:52:18 -070025 struct slip_proto slip;
Linus Torvalds1da177e2005-04-16 15:20:36 -070026};
27
Jeff Dike5e7672e2006-09-27 01:50:33 -070028extern const struct net_user_info slirp_user_info;
Linus Torvalds1da177e2005-04-16 15:20:36 -070029
Linus Torvalds1da177e2005-04-16 15:20:36 -070030extern int slirp_user_read(int fd, void *buf, int len, struct slirp_data *pri);
Jeff Dikea3c77c62005-06-13 15:52:18 -070031extern int slirp_user_write(int fd, void *buf, int len,
32 struct slirp_data *pri);
Linus Torvalds1da177e2005-04-16 15:20:36 -070033
34#endif