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