port-net.h 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. /*
  2. * Copyright (c) 2005 Reyk Floeter <reyk@openbsd.org>
  3. *
  4. * Permission to use, copy, modify, and distribute this software for any
  5. * purpose with or without fee is hereby granted, provided that the above
  6. * copyright notice and this permission notice appear in all copies.
  7. *
  8. * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
  9. * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
  10. * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
  11. * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
  12. * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
  13. * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
  14. * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  15. */
  16. #ifndef _PORT_TUN_H
  17. #define _PORT_TUN_H
  18. struct Channel;
  19. struct ssh;
  20. #if defined(SSH_TUN_LINUX) || defined(SSH_TUN_FREEBSD)
  21. # define CUSTOM_SYS_TUN_OPEN
  22. int sys_tun_open(int, int, char **);
  23. #endif
  24. #if defined(SSH_TUN_COMPAT_AF) || defined(SSH_TUN_PREPEND_AF)
  25. # define SSH_TUN_FILTER
  26. int sys_tun_infilter(struct ssh *, struct Channel *, char *, int);
  27. u_char *sys_tun_outfilter(struct ssh *, struct Channel *, u_char **, size_t *);
  28. #endif
  29. #if defined(SYS_RDOMAIN_LINUX)
  30. # define HAVE_SYS_GET_RDOMAIN
  31. # define HAVE_SYS_SET_RDOMAIN
  32. # define HAVE_SYS_VALID_RDOMAIN
  33. char *sys_get_rdomain(int fd);
  34. int sys_set_rdomain(int fd, const char *name);
  35. int sys_valid_rdomain(const char *name);
  36. #endif
  37. #if defined(SYS_RDOMAIN_XXX)
  38. # define HAVE_SYS_SET_PROCESS_RDOMAIN
  39. void sys_set_process_rdomain(const char *name);
  40. #endif
  41. #endif