]> git.proxmox.com Git - mirror_edk2.git/blob - StdLib/Include/sys/sockio.h
StdLib: Clarify and improve comments.
[mirror_edk2.git] / StdLib / Include / sys / sockio.h
1 /*-
2 * Copyright (c) 1982, 1986, 1990, 1993, 1994
3 * The Regents of the University of California. All rights reserved.
4 *
5 * Portions copyright (c) 1999, 2000
6 * Intel Corporation.
7 * All rights reserved.
8 *
9 * Redistribution and use in source and binary forms, with or without
10 * modification, are permitted provided that the following conditions
11 * are met:
12 *
13 * 1. Redistributions of source code must retain the above copyright
14 * notice, this list of conditions and the following disclaimer.
15 *
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 *
20 * 3. All advertising materials mentioning features or use of this software
21 * must display the following acknowledgement:
22 *
23 * This product includes software developed by the University of
24 * California, Berkeley, Intel Corporation, and its contributors.
25 *
26 * 4. Neither the name of University, Intel Corporation, or their respective
27 * contributors may be used to endorse or promote products derived from
28 * this software without specific prior written permission.
29 *
30 * THIS SOFTWARE IS PROVIDED BY THE REGENTS, INTEL CORPORATION AND
31 * CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING,
32 * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
33 * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS,
34 * INTEL CORPORATION OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
35 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
36 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
37 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
38 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
39 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
40 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
41 *
42 * @(#)sockio.h 8.1 (Berkeley) 3/28/94
43 * $Id: sockio.h,v 1.1.1.1 2006/05/30 06:12:59 hhzhou Exp $
44 */
45
46 #ifndef _SYS_SOCKIO_H_
47 #define _SYS_SOCKIO_H_
48
49 #include <sys/ioccom.h>
50
51 /* Socket ioctl's. */
52 #define SIOCSHIWAT _IOW('s', 0, int) /* set high watermark */
53 #define SIOCGHIWAT _IOR('s', 1, int) /* get high watermark */
54 #define SIOCSLOWAT _IOW('s', 2, int) /* set low watermark */
55 #define SIOCGLOWAT _IOR('s', 3, int) /* get low watermark */
56 #define SIOCATMARK _IOR('s', 7, int) /* at oob mark? */
57 #define SIOCSPGRP _IOW('s', 8, int) /* set process group */
58 #define SIOCGPGRP _IOR('s', 9, int) /* get process group */
59 #ifndef _ORG_FREEBSD_
60 #define SIOCUPCALL _IOW('s', 10, struct upcall_req)/* register upcall req */
61 #endif
62
63 #define SIOCADDRT _IOW('r', 10, struct ortentry) /* add route */
64 #define SIOCDELRT _IOW('r', 11, struct ortentry) /* delete route */
65 #define SIOCGETVIFCNT _IOWR('r', 15, struct sioc_vif_req)/* get vif pkt cnt */
66 #define SIOCGETSGCNT _IOWR('r', 16, struct sioc_sg_req) /* get s,g pkt cnt */
67
68 #define SIOCSIFADDR _IOW('i', 12, struct ifreq) /* set ifnet address */
69 #define OSIOCGIFADDR _IOWR('i', 13, struct ifreq) /* get ifnet address */
70 #define SIOCGIFADDR _IOWR('i', 33, struct ifreq) /* get ifnet address */
71 #define SIOCSIFDSTADDR _IOW('i', 14, struct ifreq) /* set p-p address */
72 #define OSIOCGIFDSTADDR _IOWR('i', 15, struct ifreq) /* get p-p address */
73 #define SIOCGIFDSTADDR _IOWR('i', 34, struct ifreq) /* get p-p address */
74 #define SIOCSIFFLAGS _IOW('i', 16, struct ifreq) /* set ifnet flags */
75 #define SIOCGIFFLAGS _IOWR('i', 17, struct ifreq) /* get ifnet flags */
76 #define OSIOCGIFBRDADDR _IOWR('i', 18, struct ifreq) /* get broadcast addr */
77 #define SIOCGIFBRDADDR _IOWR('i', 35, struct ifreq) /* get broadcast addr */
78 #define SIOCSIFBRDADDR _IOW('i', 19, struct ifreq) /* set broadcast addr */
79 #define OSIOCGIFCONF _IOWR('i', 20, struct ifconf) /* get ifnet list */
80 #define SIOCGIFCONF _IOWR('i', 36, struct ifconf) /* get ifnet list */
81 #define OSIOCGIFNETMASK _IOWR('i', 21, struct ifreq) /* get net addr mask */
82 #define SIOCGIFNETMASK _IOWR('i', 37, struct ifreq) /* get net addr mask */
83 #define SIOCSIFNETMASK _IOW('i', 22, struct ifreq) /* set net addr mask */
84 #define SIOCGIFMETRIC _IOWR('i', 23, struct ifreq) /* get IF metric */
85 #define SIOCSIFMETRIC _IOW('i', 24, struct ifreq) /* set IF metric */
86 #define SIOCDIFADDR _IOW('i', 25, struct ifreq) /* delete IF addr */
87 #define SIOCAIFADDR _IOW('i', 26, struct ifaliasreq)/* add/chg IF alias */
88
89 #define SIOCADDMULTI _IOW('i', 49, struct ifreq) /* add m'cast addr */
90 #define SIOCDELMULTI _IOW('i', 50, struct ifreq) /* del m'cast addr */
91 #define SIOCGIFMTU _IOWR('i', 51, struct ifreq) /* get IF mtu */
92 #define SIOCSIFMTU _IOW('i', 52, struct ifreq) /* set IF mtu */
93 #define SIOCGIFPHYS _IOWR('i', 53, struct ifreq) /* get IF wire */
94 #define SIOCSIFPHYS _IOW('i', 54, struct ifreq) /* set IF wire */
95 #define SIOCSIFMEDIA _IOWR('i', 55, struct ifreq) /* set net media */
96 #define SIOCGIFMEDIA _IOWR('i', 56, struct ifmediareq) /* get net media */
97 #define SIOCSIFGENERIC _IOW('i', 57, struct ifreq) /* generic IF set op */
98 #define SIOCGIFGENERIC _IOWR('i', 58, struct ifreq) /* generic IF get op */
99
100 #endif /* !_SYS_SOCKIO_H_ */