source: branches/libc-0.6/src/emx/include/sys/sockio.h

Last change on this file was 183, checked in by bird, 22 years ago

#434: Initial tcpip header merges.

  • Property cvs2svn:cvs-rev set to 1.2
  • Property svn:eol-style set to native
  • Property svn:executable set to *
File size: 13.3 KB
Line 
1/*- Modified for gcc/os2 by bird 2003
2 *
3 * Copyright (c) 1982, 1986, 1990, 1993, 1994
4 * The Regents of the University of California. All rights reserved.
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions
8 * are met:
9 * 1. Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer.
11 * 2. Redistributions in binary form must reproduce the above copyright
12 * notice, this list of conditions and the following disclaimer in the
13 * documentation and/or other materials provided with the distribution.
14 * 3. All advertising materials mentioning features or use of this software
15 * must display the following acknowledgement:
16 * This product includes software developed by the University of
17 * California, Berkeley and its contributors.
18 * 4. Neither the name of the University nor the names of its contributors
19 * may be used to endorse or promote products derived from this software
20 * without specific prior written permission.
21 *
22 * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
23 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
24 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
25 * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
26 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
27 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
28 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
29 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
30 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
31 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
32 * SUCH DAMAGE.
33 *
34 * @(#)sockio.h 8.1 (Berkeley) 3/28/94
35 * $FreeBSD: src/sys/sys/sockio.h,v 1.14.2.6 2002/02/07 15:12:37 ambrisko Exp $
36 */
37
38#ifndef _SYS_SOCKIO_H_
39#define _SYS_SOCKIO_H_
40
41#include <sys/ioccom.h>
42#include "ioccom.h"
43
44/* Socket ioctl's. */
45#ifdef TCPV40HDRS
46#define SIOCSHIWAT _IOW('s', 0, int) /* set high watermark */
47#define SIOCGHIWAT _IOR('s', 1, int) /* get high watermark */
48#define SIOCSLOWAT _IOW('s', 2, int) /* set low watermark */
49#define SIOCGLOWAT _IOR('s', 3, int) /* get low watermark */
50#endif /* TCPV40HDRS */
51#define SIOCATMARK _IOR('s', 7, int) /* at oob mark? */
52#define SIOCSPGRP _IOW('s', 8, int) /* set process group */
53#define SIOCGPGRP _IOR('s', 9, int) /* get process group */
54
55#define SIOCADDRT _IOW('r', 10, struct ortentry) /* add route */
56#define SIOCDELRT _IOW('r', 11, struct ortentry) /* delete route */
57#if 0 /* not on OS/2 */
58#define SIOCGETVIFCNT _IOWR('r', 15, struct sioc_vif_req)/* get vif pkt cnt */
59#define SIOCGETSGCNT _IOWR('r', 16, struct sioc_sg_req) /* get s,g pkt cnt */
60#endif
61
62#define SIOCSIFADDR _IOW('i', 12, struct ifreq) /* set ifnet address */
63#define OSIOCGIFADDR _IOWR('i', 13, struct ifreq) /* get ifnet address */
64#ifdef TCPV40HDRS
65#define SIOCGIFADDR _IOWR('i', 13, struct ifreq) /* get ifnet address */
66#else
67#define SIOCGIFADDR _IOWR('i', 33, struct ifreq) /* get ifnet address */
68#endif /* TCPV40HDRS */
69#define SIOCSIFDSTADDR _IOW('i', 14, struct ifreq) /* set p-p address */
70#define OSIOCGIFDSTADDR _IOWR('i', 15, struct ifreq) /* get p-p address */
71#ifdef TCPV40HDRS
72#define SIOCGIFDSTADDR _IOWR('i', 15, struct ifreq) /* get p-p address */
73#else
74#define SIOCGIFDSTADDR _IOWR('i', 34, struct ifreq) /* get p-p address */
75#endif /* TCPV40HDRS */
76#define SIOCSIFFLAGS _IOW('i', 16, struct ifreq) /* set ifnet flags */
77#define SIOCGIFFLAGS _IOWR('i', 17, struct ifreq) /* get ifnet flags */
78#define OSIOCGIFBRDADDR _IOWR('i', 18, struct ifreq) /* get broadcast addr */
79#ifdef TCPV40HDRS
80#define SIOCGIFBRDADDR _IOWR('i', 18, struct ifreq) /* get broadcast addr */
81#else
82#define SIOCGIFBRDADDR _IOWR('i', 35, struct ifreq) /* get broadcast addr */
83#endif /* TCPV40HDRS */
84#define SIOCSIFBRDADDR _IOW('i', 19, struct ifreq) /* set broadcast addr */
85#define OSIOCGIFCONF _IOWR('i', 20, struct ifconf) /* get ifnet list */
86#ifdef TCPV40HDRS
87#define SIOCGIFCONF _IOWR('i', 20, struct ifconf) /* get ifnet list */
88#else
89#define SIOCGIFCONF _IOWR('i', 36, struct ifconf) /* get ifnet list */
90#endif /* TCPV40HDRS */
91#define OSIOCGIFNETMASK _IOWR('i', 21, struct ifreq) /* get net addr mask */
92#ifdef TCPV40HDRS
93#define SIOCGIFNETMASK _IOWR('i', 21, struct ifreq) /* get net addr mask */
94#else
95#define SIOCGIFNETMASK _IOWR('i', 37, struct ifreq) /* get net addr mask */
96#endif /* TCPV40HDRS */
97#define SIOCSIFNETMASK _IOW('i', 22, struct ifreq) /* set net addr mask */
98#define SIOCGIFMETRIC _IOWR('i', 23, struct ifreq) /* get IF metric */
99#define SIOCSIFMETRIC _IOW('i', 24, struct ifreq) /* set IF metric */
100
101#if 1 /* different on OS/2 */
102#define SIOCDIFADDR _IOW('i', 64, struct ifreq) /* delete IF addr */
103#define SIOCAIFADDR _IOW('i', 63, struct ifaliasreq)/* add/chg IF alias */
104#else /*!OS2:*/
105#define SIOCDIFADDR _IOW('i', 25, struct ifreq) /* delete IF addr */
106#define SIOCAIFADDR _IOW('i', 26, struct ifaliasreq)/* add/chg IF alias */
107#endif
108
109#if 0 /* not on OS/2 */
110#define SIOCALIFADDR _IOW('i', 27, struct if_laddrreq) /* add IF addr */
111#define SIOCGLIFADDR _IOWR('i', 28, struct if_laddrreq) /* get IF addr */
112#define SIOCDLIFADDR _IOW('i', 29, struct if_laddrreq) /* delete IF addr */
113#define SIOCSIFCAP _IOW('i', 30, struct ifreq) /* set IF features */
114#define SIOCGIFCAP _IOWR('i', 31, struct ifreq) /* get IF features */
115#endif /*!OS2*/
116
117#if 1 /* different on OS/2 */
118#define SIOCADDMULTI _IOW('i', 51, struct ifreq) /* add m'cast addr */
119#define SIOCDELMULTI _IOW('i', 52, struct ifreq) /* del m'cast addr */
120#else /* !OS2: */
121#define SIOCADDMULTI _IOW('i', 49, struct ifreq) /* add m'cast addr */
122#define SIOCDELMULTI _IOW('i', 50, struct ifreq) /* del m'cast addr */
123#endif
124
125#if 1 /* different on OS/2 */
126#define SIOCGIFMTU _IOR('i', 57, struct ifreq) /* get IF mtu */
127#define SIOCSIFMTU _IOW('i', 45, struct ifreq) /* set IF mtu */
128#else
129#define SIOCGIFMTU _IOWR('i', 51, struct ifreq) /* get IF mtu */
130#define SIOCSIFMTU _IOW('i', 52, struct ifreq) /* set IF mtu */
131#endif
132#if 0 /* not on OS/2 */
133#define SIOCGIFPHYS _IOWR('i', 53, struct ifreq) /* get IF wire */
134#define SIOCSIFPHYS _IOW('i', 54, struct ifreq) /* set IF wire */
135#define SIOCSIFMEDIA _IOWR('i', 55, struct ifreq) /* set net media */
136#define SIOCGIFMEDIA _IOWR('i', 56, struct ifmediareq) /* get net media */
137
138#define SIOCSIFPHYADDR _IOW('i', 70, struct ifaliasreq) /* set gif addres */
139#define SIOCGIFPSRCADDR _IOWR('i', 71, struct ifreq) /* get gif psrc addr */
140#define SIOCGIFPDSTADDR _IOWR('i', 72, struct ifreq) /* get gif pdst addr */
141#define SIOCDIFPHYADDR _IOW('i', 73, struct ifreq) /* delete gif addrs */
142#define SIOCSLIFPHYADDR _IOW('i', 74, struct if_laddrreq) /* set gif addrs */
143#define SIOCGLIFPHYADDR _IOWR('i', 75, struct if_laddrreq) /* get gif addrs */
144
145#define SIOCSIFGENERIC _IOW('i', 57, struct ifreq) /* generic IF set op */
146#define SIOCGIFGENERIC _IOWR('i', 58, struct ifreq) /* generic IF get op */
147
148#define SIOCGIFSTATUS _IOWR('i', 59, struct ifstat) /* get IF status */
149#define SIOCSIFLLADDR _IOW('i', 60, struct ifreq) /* set linklevel addr */
150
151#define SIOCGPRIVATE_0 _IOWR('i', 80, struct ifreq) /* Linux Private + 0 */
152#define SIOCGPRIVATE_1 _IOWR('i', 81, struct ifreq) /* Linux Private + 1 */
153
154#define SIOCIFCREATE _IOWR('i', 122, struct ifreq) /* create clone if */
155#define SIOCIFDESTROY _IOW('i', 121, struct ifreq) /* destroy clone if */
156#define SIOCIFGCLONERS _IOWR('i', 120, struct if_clonereq) /* get cloners */
157#endif /*!OS2*/
158
159/* OS2 specific ioctls */
160#define SIOCSHOSTID _IOW('s', 10, long)
161#define SIOCGNBNAME _IOR('s', 11, long) /* AFNB code. Not clear now */
162#define SIOCSNBNAME _IOW('s', 12, long) /* AFNB */
163#define SIOCGNCBFN _IOR('s', 13, long) /* AFNB */
164#ifndef TCPV40HDRS
165#define SIOCSSYN _IOW('s', 14, long) /* SYN Attack */
166#endif /* !TCPV40HDRS */
167#define SIOCSIFBRD _IOW('i', 27, int) /* SINGLE-rt bcst. using old # for bkw cmpt */
168#ifdef TCPV40HDRS
169#define SIOCSIFALLRTB ioc('i', 63) /* added to configure all-route broadcst */
170#else
171#define SIOCSIFALLRTB _IOW('i', 65, struct ifreq) /* added to configure all-route broadcst */
172#endif /* TCPV40HDRS */
173
174#define SIOCSARP _IOW('i', 30, struct arpreq)/* set ARP entry */
175#define SIOCGARP _IOR('i', 31, struct arpreq)
176#define SIOCDARP _IOW('i', 32, struct arpreq)
177
178#define SIOCSIF802_3 _IOW('i', 40, struct ifreq)
179#define SIOCSIFNO802_3 _IOW('i', 41, struct ifreq)
180#define SIOCSIFNOREDIR _IOW('i', 42, struct ifreq)
181#define SIOCSIFYESREDIR _IOW('i', 43, struct ifreq)
182
183#define SIOCSIFFDDI _IOW('i', 46, struct ifreq)
184#define SIOCSIFNOFDDI _IOW('i', 47, struct ifreq)
185#define SIOCSRDBRD _IOW('i', 48, struct ifreq)
186
187#define SIOCGARP_TR _IOR('i', 50, struct arpreq_tr)
188#define SIOCSARP_TR _IOW('i', 49, struct arpreq_tr)
189
190#if defined(SLBOOTP) || defined(INCL_TCPIP_ALLIOCTLS)
191/** Used to retreive unit number on serial interface. */
192#define SIOCGUNIT _IOR('i', 70, struct ifreq)
193#endif
194
195/** To check if the interface is Valid or not */
196#define SIOCGIFVALID _IOR('i', 75, struct ifreq)
197/** Ioctl to return bound/shld bind ifs */
198struct bndreq { short bindings; short bound; };
199#define SIOCGIFBOUND _IOR('i', 76, struct bndreq)
200
201/** Get multicast gp. info for an interface ret list of m-cast addrs for an if */
202#define SIOCGMCAST _IOR('i', 81, struct addrreq)
203#define SIOCMULTISBC _IOW('i', 61, struct ifreq) /* use broadcast to send IP multicast*/
204#define SIOCMULTISFA _IOW('i', 62, struct ifreq) /* use functional addr to send IP multicast*/
205
206#ifndef TCPV40HDRS
207/** block until intf change to running state */
208#define SIOCSIFRUNNINGBLK _IOW('i', 77, struct ifreq)
209#endif
210
211/* Interface Tracing Support */
212#define SIOCGIFEFLAGS _IOR('i', 150, struct ifreq)
213#define SIOCSIFEFLAGS _IOW('i', 151, struct ifreq)
214#define SIOCGIFTRACE _IOR('i', 152, struct ifreq)
215#define SIOCSIFTRACE _IOW('i', 153, struct ifreq)
216
217/* SLIP STATS */
218#define SIOCSSTAT _IOW('i', 154, struct ifreq)
219#define SIOCGSTAT _IOR('i', 155, struct ifreq)
220
221#ifndef TCPV40HDRS
222#define SIOCSMSL _IOW('t', 1, long) /* set the msl in seconds */
223#define SIOCGMSL _IOR('t', 2, long) /* get the msl in seconds */
224#endif
225
226/* NETSTAT stuff */
227#define SIOSTATMBUF _IOR('n', 40, struct mbstat)
228#define SIOSTATTCP _IOR('n', 41, struct tcpstat)
229#define SIOSTATUDP _IOR('n', 42, struct udpstat)
230#define SIOSTATIP _IOR('n', 43, struct ipstat)
231#define SIOSTATSO _IOR('n', 44, char /*struct sockaddr*/)
232#ifndef TCPV40HDRS
233#define SIOSTATTCPZ _IOR('n', 241, struct tcpstat)
234#define SIOSTATUDPZ _IOR('n', 242, struct udpstat)
235#define SIOSTATIPZ _IOR('n', 243, struct ipstat)
236#endif
237
238#define SIOSTATRT _IOR('n', 45, char /*struct rtentries*/)
239#define SIOFLUSHRT _IOW('n', 46, long) /* Backward compatibility */
240#define SIOSTATICMP _IOR('n', 47, struct icmpstat)
241#ifndef TCPV40HDRS
242#define SIOSTATICMPZ _IOR('n', 247, struct icmpstat)
243#endif
244#define SIOSTATIF _IOR('n', 48, char /*struct ifmib*/)
245#define SIOSTATAT _IOR('n', 49, char /*struct statatreq*/)
246#define SIOSTATARP _IOR('n', 50, char /*struct oarptab*/)
247#define SIOSTATIF42 _IOR('n', 51, char /*struct ifmib*/)
248#define SIOSTATCNTRT _IOR('n', 52, int)
249#define SIOSTATCNTAT _IOR('n', 53, int)
250
251#ifndef TCPV40HDRS
252#define SIOSTATIGMP _IOR('n', 54, struct igmpstat) /* SNMP stuff */
253#define SIOFLUSHRTIFP _IOW('n', 55, long) /* delete routes on an interface */
254#define SIOSTATIGMPZ _IOR('n', 254, struct igmpstat) /* SNMP stuff */
255
256/** adding this ioctl() to be able to send arp request using an ioctl() */
257#define SIOCARP _IOR('i', 156, int)
258#endif /* !TCPV40HDRS */
259
260#if defined(TCPV40HDRS) || defined(INCL_TCPIP_ALLIOCTLS)
261#define SIOMETRIC1RT ioc('r', 12)
262#define SIOMETRIC2RT ioc('r', 13)
263#define SIOMETRIC3RT ioc('r', 14)
264#define SIOMETRIC4RT ioc('r', 15)
265#define SIOCREGADDNET ioc('r', 12)
266#define SIOCREGDELNET ioc('r', 13)
267#define SIOCREGROUTES ioc('r', 14)
268#define SIOCFLUSHROUTES ioc('r', 15)
269#define SIOCSIFSETSIG ioc('i', 25)
270#define SIOCSIFCLRSIG ioc('i', 26)
271#define SIOCGIFLOAD ioc('i', 27)
272#define SIOCSIFFILTERSRC ioc('i', 28)
273#define SIOCGIFFILTERSRC ioc('i',29)
274#define SIOCSIFSNMPSIG ioc('i', 33)
275#define SIOCSIFSNMPCLR ioc('i', 34)
276#define SIOCSIFSNMPCRC ioc('i', 35)
277#define SIOCSIFPRIORITY ioc('i', 36)
278#define SIOCGIFPRIORITY ioc('i', 37)
279#define SIOCSIFFILTERDST ioc('i', 38)
280#define SIOCGIFFILTERDST ioc('i',39)
281#define SIOCSIFSPIPE ioc('i',71) /* used to set pipe size on interface */
282 /* this is used as tcp send buffer size */
283#define SIOCSIFRPIPE ioc('i',72) /* used to set pipe size on interface */
284 /* this is used as tcp recv buffer size */
285#define SIOCSIFTCPSEG ioc('i',73) /* set the TCP segment size on interface*/
286#define SIOCSIFUSE576 ioc('i',74) /* enable/disable the automatic change of mss to 576 */
287 /* if going through a router */
288#endif /* TCPV40HDRS || ALL */
289
290#endif /* !_SYS_SOCKIO_H_ */
Note: See TracBrowser for help on using the repository browser.