Watt-32 tcp/ip  2.2 dev-rel.10
so_ioctl.h
Go to the documentation of this file.
1 
6 /* so_ioctl.h derived from BSD's ioctl.h by hv and em 1994
7  *
8  * Copyright (c) 1982, 1986, 1990 The Regents of the University of California.
9  * All rights reserved.
10  *
11  * Redistribution and use in source and binary forms, with or without
12  * modification, are permitted provided that the following conditions
13  * are met:
14  * 1. Redistributions of source code must retain the above copyright
15  * notice, this list of conditions and the following disclaimer.
16  * 2. Redistributions in binary form must reproduce the above copyright
17  * notice, this list of conditions and the following disclaimer in the
18  * documentation and/or other materials provided with the distribution.
19  * 3. All advertising materials mentioning features or use of this software
20  * must display the following acknowledgement:
21  * This product includes software developed by the University of
22  * California, Berkeley and its contributors.
23  * 4. Neither the name of the University nor the names of its contributors
24  * may be used to endorse or promote products derived from this software
25  * without specific prior written permission.
26  *
27  * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
28  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
29  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
30  * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
31  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
32  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
33  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
34  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
35  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
36  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
37  * SUCH DAMAGE.
38  *
39  * from: @(#)ioctl.h 7.19 (Berkeley) 6/26/91
40  */
41 
42 #ifndef __SYS_SO_IOCTL_H
43 #define __SYS_SO_IOCTL_H
44 
45 #undef _IOC
46 #undef _IOW
47 #undef _IOR
48 #undef _IOWR
49 
50 #define _IOC(a,b) ((a<<8)|b)
51 #define _IOW(a,b,c) _IOC(a,b)
52 #define _IOR(a,b,c) _IOC(a,b)
53 #define _IOWR(a,b,c) _IOC(a,b)
54 
55 #define _TCPIP_FIONREAD _IOC('f', 127)
56 #define FIONBIO _IOC('f', 126)
57 #define FIOASYNC _IOC('f', 125)
58 #define FIOTCPCKSUM _IOC('f', 128)
59 #define FIONSTATUS _IOC('f', 120)
60 #define FIONURG _IOC('f', 121)
61 
62 /* socket i/o controls */
63 #define SIOCSHIWAT _IOW('s', 0, int) /* set high watermark */
64 #define SIOCGHIWAT _IOR('s', 1, int) /* get high watermark */
65 #define SIOCSLOWAT _IOW('s', 2, int) /* set low watermark */
66 #define SIOCGLOWAT _IOR('s', 3, int) /* get low watermark */
67 #define SIOCATMARK _IOR('s', 7, int) /* at oob mark? */
68 #define SIOCSPGRP _IOW('s', 8, int) /* set process group */
69 #define SIOCGPGRP _IOR('s', 9, int) /* get process group */
70 
71 #define SIOCADDRT _IOW('r', 10, struct ortentry) /* add route */
72 #define SIOCDELRT _IOW('r', 11, struct ortentry) /* delete route */
73 
74 #define SIOCSIFADDR _IOW('i', 12, struct ifreq) /* set ifnet address */
75 #define SIOCGIFADDR _IOWR('i',13, struct ifreg) /* get ifnet addres */
76 #define OSIOCGIFADDR SIOCGIFADDR
77 #define SIOCSIFDSTADDR _IOW('i', 14, struct ifreq) /* set p-p address */
78 #define SIOCGIFDSTADDR _IOWR('i',15, struct ifreq) /* get p-p address */
79 #define OSIOCGIFDSTADDR SIOCGIFDSTADDR
80 #define SIOCSIFFLAGS _IOW('i', 16, struct ifreq) /* set ifnet flags */
81 #define SIOCGIFFLAGS _IOWR('i',17, struct ifreq) /* get ifnet flags */
82 #define SIOCGIFBRDADDR _IOWR('i',18, struct ifreq) /* get broadcast addr */
83 #define OSIOCGIFBRDADDR SIOCGIFBRDADDR
84 #define SIOCSIFBRDADDR _IOW('i', 19, struct ifreq) /* set broadcast addr */
85 #define SIOCGIFCONF _IOWR('i',20, struct ifreq) /* get ifnet list */
86 #define OSIOCGIFCONF SIOCGIFCONF
87 #define SIOCGIFNETMASK _IOWR('i',21, struct ifreq) /* get net addr mask */
88 #define OSIOCGIFNETMASK SIOCGIFNETMASK
89 #define SIOCSIFNETMASK _IOW('i', 22, struct ifreq) /* set net addr mask */
90 #define SIOCGIFMETRIC _IOWR('i',23, struct ifreq) /* get if metric */
91 #define SIOCSIFMETRIC _IOW('i', 24, struct ifreq) /* set if metric */
92 
93 #define SIOCSARP _IOW('i', 30, struct arpreq) /* set arp entry */
94 #define SIOCGARP _IOWR('i',31, struct arpreq) /* get arp entry */
95 #define OSIOCGARP SIOCGARP
96 #define SIOCDARP _IOW('i', 32, struct arpreq) /* delete arp entry */
97 
98 #endif