slirp.h 786 B

12345678910111213141516171819202122232425262728293031323334
  1. #ifndef __UM_SLIRP_H
  2. #define __UM_SLIRP_H
  3. #include "slip_common.h"
  4. #define SLIRP_MAX_ARGS 100
  5. /*
  6. * XXX this next definition is here because I don't understand why this
  7. * initializer doesn't work in slirp_kern.c:
  8. *
  9. * argv : { init->argv[ 0 ... SLIRP_MAX_ARGS-1 ] },
  10. *
  11. * or why I can't typecast like this:
  12. *
  13. * argv : (char* [SLIRP_MAX_ARGS])(init->argv),
  14. */
  15. struct arg_list_dummy_wrapper { char *argv[SLIRP_MAX_ARGS]; };
  16. struct slirp_data {
  17. void *dev;
  18. struct arg_list_dummy_wrapper argw;
  19. int pid;
  20. int slave;
  21. struct slip_proto slip;
  22. };
  23. extern const struct net_user_info slirp_user_info;
  24. extern int slirp_user_read(int fd, void *buf, int len, struct slirp_data *pri);
  25. extern int slirp_user_write(int fd, void *buf, int len,
  26. struct slirp_data *pri);
  27. #endif