/include/sys/ioc_net.h

http://www.minix3.org/ · C++ Header · 101 lines · 74 code · 16 blank · 11 comment · 0 complexity · 28a3b68b3107f46db357289d22b65b95 MD5 · raw file

  1. /* sys/ioc_net.h - NetBSD-friendly version of Minix net/ioctl.h
  2. */
  3. /* net/ioctl.h - Network ioctl() command codes. Author: Kees J. Bot
  4. * 23 Nov 2002
  5. *
  6. */
  7. #ifndef _SYS_IOC_NET_H_
  8. #define _SYS_IOC_NET_H_
  9. #include <minix/ioctl.h>
  10. #include <sys/un.h>
  11. #include <sys/ansi.h>
  12. #ifndef socklen_t
  13. typedef __socklen_t socklen_t;
  14. #define socklen_t __socklen_t
  15. #endif
  16. #define MSG_CONTROL_MAX (1024 - sizeof(socklen_t))
  17. struct msg_control
  18. {
  19. char msg_control[MSG_CONTROL_MAX];
  20. socklen_t msg_controllen;
  21. };
  22. /* Network ioctls. */
  23. #define NWIOSETHOPT _IOW('n', 16, struct nwio_ethopt)
  24. #define NWIOGETHOPT _IOR('n', 17, struct nwio_ethopt)
  25. #define NWIOGETHSTAT _IOR('n', 18, struct nwio_ethstat)
  26. #define NWIOARPGIP _IORW('n',20, struct nwio_arp)
  27. #define NWIOARPGNEXT _IORW('n',21, struct nwio_arp)
  28. #define NWIOARPSIP _IOW ('n',22, struct nwio_arp)
  29. #define NWIOARPDIP _IOW ('n',23, struct nwio_arp)
  30. #define NWIOSIPCONF2 _IOW('n', 32, struct nwio_ipconf2)
  31. #define NWIOSIPCONF _IOW('n', 32, struct nwio_ipconf)
  32. #define NWIOGIPCONF2 _IOR('n', 33, struct nwio_ipconf2)
  33. #define NWIOGIPCONF _IOR('n', 33, struct nwio_ipconf)
  34. #define NWIOSIPOPT _IOW('n', 34, struct nwio_ipopt)
  35. #define NWIOGIPOPT _IOR('n', 35, struct nwio_ipopt)
  36. #define NWIOGIPOROUTE _IORW('n', 40, struct nwio_route)
  37. #define NWIOSIPOROUTE _IOW ('n', 41, struct nwio_route)
  38. #define NWIODIPOROUTE _IOW ('n', 42, struct nwio_route)
  39. #define NWIOGIPIROUTE _IORW('n', 43, struct nwio_route)
  40. #define NWIOSIPIROUTE _IOW ('n', 44, struct nwio_route)
  41. #define NWIODIPIROUTE _IOW ('n', 45, struct nwio_route)
  42. #define NWIOSTCPCONF _IOW('n', 48, struct nwio_tcpconf)
  43. #define NWIOGTCPCONF _IOR('n', 49, struct nwio_tcpconf)
  44. #define NWIOTCPCONN _IOW('n', 50, struct nwio_tcpcl)
  45. #define NWIOTCPLISTEN _IOW('n', 51, struct nwio_tcpcl)
  46. #define NWIOTCPATTACH _IOW('n', 52, struct nwio_tcpatt)
  47. #define NWIOTCPSHUTDOWN _IO ('n', 53)
  48. #define NWIOSTCPOPT _IOW('n', 54, struct nwio_tcpopt)
  49. #define NWIOGTCPOPT _IOR('n', 55, struct nwio_tcpopt)
  50. #define NWIOTCPPUSH _IO ('n', 56)
  51. #define NWIOTCPLISTENQ _IOW('n', 57, int)
  52. #define NWIOGTCPCOOKIE _IOR('n', 58, struct tcp_cookie)
  53. #define NWIOTCPACCEPTTO _IOW('n', 59, struct tcp_cookie)
  54. #define NWIOTCPGERROR _IOR('n', 60, int)
  55. #define NWIOSUDPOPT _IOW('n', 64, struct nwio_udpopt)
  56. #define NWIOGUDPOPT _IOR('n', 65, struct nwio_udpopt)
  57. #define NWIOUDPPEEK _IOR('n', 66, struct udp_io_hdr)
  58. #define NWIOGUDSFADDR _IOR ('n', 67, struct sockaddr_un) /* recvfrom() */
  59. #define NWIOSUDSTADDR _IOW ('n', 68, struct sockaddr_un) /* sendto() */
  60. #define NWIOSUDSADDR _IOW ('n', 69, struct sockaddr_un) /* bind() */
  61. #define NWIOGUDSADDR _IOR ('n', 70, struct sockaddr_un) /* getsockname() */
  62. #define NWIOGUDSPADDR _IOR ('n', 71, struct sockaddr_un) /* getpeername() */
  63. #define NWIOSUDSTYPE _IOW ('n', 72, int) /* socket() */
  64. #define NWIOSUDSBLOG _IOW ('n', 73, int) /* listen() */
  65. #define NWIOSUDSCONN _IOW ('n', 74, struct sockaddr_un) /* connect() */
  66. #define NWIOSUDSSHUT _IOW ('n', 75, int) /* shutdown() */
  67. #define NWIOSUDSPAIR _IOW ('n', 76, dev_t) /* socketpair() */
  68. #define NWIOSUDSPAIROLD _IOW ('n', 76, short) /* socketpair() */
  69. #define NWIOSUDSACCEPT _IOW ('n', 77, struct sockaddr_un) /* accept() */
  70. #define NWIOSUDSCTRL _IOW ('n', 78, struct msg_control) /* sendmsg() */
  71. #define NWIOGUDSCTRL _IORW('n', 79, struct msg_control) /* recvmsg() */
  72. #define NWIOSPSIPOPT _IOW('n', 80, struct nwio_psipopt)
  73. #define NWIOGPSIPOPT _IOR('n', 81, struct nwio_psipopt)
  74. /* setsockopt/setsockopt for unix domain sockets */
  75. #define NWIOGUDSSOTYPE _IOR('n', 90, int) /* SO_TYPE */
  76. #define NWIOGUDSPEERCRED _IOR('n', 91, struct ucred) /* SO_PEERCRED */
  77. #define NWIOGUDSPEERCREDOLD _IOR('n', 91, struct ucred_old) /* SO_PEERCRED */
  78. #define NWIOGUDSSNDBUF _IOR('n', 92, size_t) /* SO_SNDBUF */
  79. #define NWIOSUDSSNDBUF _IOW('n', 93, size_t) /* SO_SNDBUF */
  80. #define NWIOGUDSRCVBUF _IOR('n', 94, size_t) /* SO_RCVBUF */
  81. #define NWIOSUDSRCVBUF _IOW('n', 95, size_t) /* SO_RCVBUF */
  82. #endif /* _NET__IOCTL_H */
  83. /*
  84. * $PchId: ioctl.h,v 1.2 2003/07/25 14:34:03 philip Exp $
  85. */