xref: /illumos-gate/usr/src/uts/common/sys/sockio.h (revision ce17336e)
17c478bd9Sstevel@tonic-gate /*
27c478bd9Sstevel@tonic-gate  * CDDL HEADER START
37c478bd9Sstevel@tonic-gate  *
47c478bd9Sstevel@tonic-gate  * The contents of this file are subject to the terms of the
574e20cfeSnh  * Common Development and Distribution License (the "License").
674e20cfeSnh  * You may not use this file except in compliance with the License.
77c478bd9Sstevel@tonic-gate  *
87c478bd9Sstevel@tonic-gate  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
97c478bd9Sstevel@tonic-gate  * or http://www.opensolaris.org/os/licensing.
107c478bd9Sstevel@tonic-gate  * See the License for the specific language governing permissions
117c478bd9Sstevel@tonic-gate  * and limitations under the License.
127c478bd9Sstevel@tonic-gate  *
137c478bd9Sstevel@tonic-gate  * When distributing Covered Code, include this CDDL HEADER in each
147c478bd9Sstevel@tonic-gate  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
157c478bd9Sstevel@tonic-gate  * If applicable, add the following below this CDDL HEADER, with the
167c478bd9Sstevel@tonic-gate  * fields enclosed by brackets "[]" replaced with your own identifying
177c478bd9Sstevel@tonic-gate  * information: Portions Copyright [yyyy] [name of copyright owner]
187c478bd9Sstevel@tonic-gate  *
197c478bd9Sstevel@tonic-gate  * CDDL HEADER END
207c478bd9Sstevel@tonic-gate  */
217c478bd9Sstevel@tonic-gate /*
22a6911619SDarren Reed  * Copyright (c) 1989, 2010, Oracle and/or its affiliates. All rights reserved.
23843ea709SDan McDonald  * Copyright (c) 2014, OmniTI Computer Consulting, Inc. All rights reserved.
247c478bd9Sstevel@tonic-gate  */
257c478bd9Sstevel@tonic-gate 
267c478bd9Sstevel@tonic-gate /*	Copyright (c) 1983, 1984, 1985, 1986, 1987, 1988, 1989 AT&T	*/
27b4203d75SMarcel Telka /*	  All Rights Reserved	*/
287c478bd9Sstevel@tonic-gate 
297c478bd9Sstevel@tonic-gate /*
307c478bd9Sstevel@tonic-gate  * University Copyright- Copyright (c) 1982, 1986, 1988
317c478bd9Sstevel@tonic-gate  * The Regents of the University of California
327c478bd9Sstevel@tonic-gate  * All Rights Reserved
337c478bd9Sstevel@tonic-gate  *
347c478bd9Sstevel@tonic-gate  * University Acknowledgment- Portions of this document are derived from
357c478bd9Sstevel@tonic-gate  * software developed by the University of California, Berkeley, and its
367c478bd9Sstevel@tonic-gate  * contributors.
377c478bd9Sstevel@tonic-gate  */
387c478bd9Sstevel@tonic-gate 
397c478bd9Sstevel@tonic-gate #ifndef	_SYS_SOCKIO_H
407c478bd9Sstevel@tonic-gate #define	_SYS_SOCKIO_H
417c478bd9Sstevel@tonic-gate 
427c478bd9Sstevel@tonic-gate /*
437c478bd9Sstevel@tonic-gate  * General socket ioctl definitions.
447c478bd9Sstevel@tonic-gate  */
457c478bd9Sstevel@tonic-gate 
467c478bd9Sstevel@tonic-gate #include <sys/ioccom.h>
477c478bd9Sstevel@tonic-gate 
487c478bd9Sstevel@tonic-gate #ifdef	__cplusplus
497c478bd9Sstevel@tonic-gate extern "C" {
507c478bd9Sstevel@tonic-gate #endif
517c478bd9Sstevel@tonic-gate 
527c478bd9Sstevel@tonic-gate /* socket i/o controls */
537c478bd9Sstevel@tonic-gate #define	SIOCSHIWAT	_IOW('s',  0, int)		/* set high watermark */
547c478bd9Sstevel@tonic-gate #define	SIOCGHIWAT	_IOR('s',  1, int)		/* get high watermark */
557c478bd9Sstevel@tonic-gate #define	SIOCSLOWAT	_IOW('s',  2, int)		/* set low watermark */
567c478bd9Sstevel@tonic-gate #define	SIOCGLOWAT	_IOR('s',  3, int)		/* get low watermark */
577c478bd9Sstevel@tonic-gate #define	SIOCATMARK	_IOR('s',  7, int)		/* at oob mark? */
587c478bd9Sstevel@tonic-gate #define	SIOCSPGRP	_IOW('s',  8, int)		/* set process group */
597c478bd9Sstevel@tonic-gate #define	SIOCGPGRP	_IOR('s',  9, int)		/* get process group */
607c478bd9Sstevel@tonic-gate 
617c478bd9Sstevel@tonic-gate /*
627c478bd9Sstevel@tonic-gate  * SIOCADDRT and SIOCDELRT ioctls need to be defined using _IOWN macro to
637c478bd9Sstevel@tonic-gate  * make them datamodel independent.
647c478bd9Sstevel@tonic-gate  */
657c478bd9Sstevel@tonic-gate #define	SIOCADDRT	_IOWN('r', 10, 48)		/* add route */
667c478bd9Sstevel@tonic-gate #define	SIOCDELRT	_IOWN('r', 11, 48)		/* delete route */
677c478bd9Sstevel@tonic-gate 
687c478bd9Sstevel@tonic-gate /* For multicast routing. These might change in future release */
697c478bd9Sstevel@tonic-gate #define	SIOCGETVIFCNT	_IOWR('r', 20, struct sioc_vif_req)
707c478bd9Sstevel@tonic-gate 							/* get vif pkt count */
717c478bd9Sstevel@tonic-gate #define	SIOCGETSGCNT	_IOWR('r', 21, struct sioc_sg_req)
727c478bd9Sstevel@tonic-gate 							/* get s,g pkt count */
737c478bd9Sstevel@tonic-gate #define	SIOCGETLSGCNT	_IOWR('r', 21, struct sioc_lsg_req)
747c478bd9Sstevel@tonic-gate 							/* get s,g pkt count */
757c478bd9Sstevel@tonic-gate 
767c478bd9Sstevel@tonic-gate /*
777c478bd9Sstevel@tonic-gate  * Obsolete interface ioctls using struct ifreq that are supported
787c478bd9Sstevel@tonic-gate  * for compatibility. New interface ioctls use struct lifreq.
797c478bd9Sstevel@tonic-gate  */
807c478bd9Sstevel@tonic-gate #define	SIOCSIFADDR	_IOW('i',  12, struct ifreq)	/* set if address */
817c478bd9Sstevel@tonic-gate #define	SIOCGIFADDR	_IOWR('i', 13, struct ifreq)	/* get if address */
827c478bd9Sstevel@tonic-gate #define	SIOCSIFDSTADDR	_IOW('i',  14, struct ifreq)	/* set p-p address */
837c478bd9Sstevel@tonic-gate #define	SIOCGIFDSTADDR	_IOWR('i', 15, struct ifreq)	/* get p-p address */
847c478bd9Sstevel@tonic-gate #define	SIOCSIFFLAGS	_IOW('i',  16, struct ifreq)	/* set if flags */
857c478bd9Sstevel@tonic-gate #define	SIOCGIFFLAGS	_IOWR('i', 17, struct ifreq)	/* get if flags */
867c478bd9Sstevel@tonic-gate #define	SIOCSIFMEM	_IOW('i',  18, struct ifreq)	/* set interface mem */
877c478bd9Sstevel@tonic-gate #define	SIOCGIFMEM	_IOWR('i', 19, struct ifreq)	/* get interface mem */
887c478bd9Sstevel@tonic-gate 
897c478bd9Sstevel@tonic-gate /*
907c478bd9Sstevel@tonic-gate  * Needs to be defined using _IOWRN macro to make it datamodel independent.
917c478bd9Sstevel@tonic-gate  * Argument is a struct ifconf.
927c478bd9Sstevel@tonic-gate  */
937c478bd9Sstevel@tonic-gate #define	O_SIOCGIFCONF	_IOWRN('i', 20, 8)		/* old get if list */
947c478bd9Sstevel@tonic-gate 
957c478bd9Sstevel@tonic-gate #define	SIOCSIFMTU	_IOW('i',  21, struct ifreq)	/* set if mtu */
967c478bd9Sstevel@tonic-gate #define	SIOCGIFMTU	_IOWR('i', 22, struct ifreq)	/* get if mtu */
977c478bd9Sstevel@tonic-gate 
987c478bd9Sstevel@tonic-gate 	/* from 4.3BSD */
997c478bd9Sstevel@tonic-gate #define	SIOCGIFBRDADDR	_IOWR('i', 23, struct ifreq)	/* get broadcast addr */
1007c478bd9Sstevel@tonic-gate #define	SIOCSIFBRDADDR	_IOW('i',  24, struct ifreq)	/* set broadcast addr */
1017c478bd9Sstevel@tonic-gate #define	SIOCGIFNETMASK	_IOWR('i', 25, struct ifreq)	/* get subnetmask */
1027c478bd9Sstevel@tonic-gate #define	SIOCSIFNETMASK	_IOW('i',  26, struct ifreq)	/* set subnetmask */
1037c478bd9Sstevel@tonic-gate #define	SIOCGIFMETRIC	_IOWR('i', 27, struct ifreq)	/* get if metric */
1047c478bd9Sstevel@tonic-gate #define	SIOCSIFMETRIC	_IOW('i',  28, struct ifreq)	/* set if metric */
1057c478bd9Sstevel@tonic-gate 
1067c478bd9Sstevel@tonic-gate #define	SIOCSARP	_IOW('i',  30, struct arpreq)	/* set arp entry */
1077c478bd9Sstevel@tonic-gate #define	SIOCGARP	_IOWR('i', 31, struct arpreq)	/* get arp entry */
1087c478bd9Sstevel@tonic-gate #define	SIOCDARP	_IOW('i',  32, struct arpreq)	/* delete arp entry */
1097c478bd9Sstevel@tonic-gate #define	SIOCUPPER	_IOW('i',  40, struct ifreq)	/* attach upper layer */
1107c478bd9Sstevel@tonic-gate #define	SIOCLOWER	_IOW('i',  41, struct ifreq)	/* attach lower layer */
1117c478bd9Sstevel@tonic-gate #define	SIOCSETSYNC	_IOW('i',  44, struct ifreq)	/* set syncmode */
1127c478bd9Sstevel@tonic-gate #define	SIOCGETSYNC	_IOWR('i', 45, struct ifreq)	/* get syncmode */
1137c478bd9Sstevel@tonic-gate #define	SIOCSSDSTATS	_IOWR('i', 46, struct ifreq)	/* sync data stats */
1147c478bd9Sstevel@tonic-gate #define	SIOCSSESTATS	_IOWR('i', 47, struct ifreq)	/* sync error stats */
1157c478bd9Sstevel@tonic-gate 
1167c478bd9Sstevel@tonic-gate #define	SIOCSPROMISC	_IOW('i',  48, int)		/* request promisc */
1177c478bd9Sstevel@tonic-gate 							/* mode on/off */
1187c478bd9Sstevel@tonic-gate #define	SIOCADDMULTI	_IOW('i',  49, struct ifreq)	/* set m/c address */
1197c478bd9Sstevel@tonic-gate #define	SIOCDELMULTI	_IOW('i',  50, struct ifreq)	/* clr m/c address */
1207c478bd9Sstevel@tonic-gate 
1217c478bd9Sstevel@tonic-gate /* STREAMS based socket emulation */
1227c478bd9Sstevel@tonic-gate 
1237c478bd9Sstevel@tonic-gate #define	SIOCGETNAME	_IOR('s',  52, struct sockaddr)	/* getsockname */
1247c478bd9Sstevel@tonic-gate #define	SIOCGETPEER	_IOR('s',  53, struct sockaddr)	/* getpeername */
1257c478bd9Sstevel@tonic-gate #define	IF_UNITSEL	_IOW('s',  54, int)		/* set unit number */
1267c478bd9Sstevel@tonic-gate #define	SIOCXPROTO	_IO('s',   55)			/* empty proto table */
1277c478bd9Sstevel@tonic-gate 
1287c478bd9Sstevel@tonic-gate #define	SIOCIFDETACH	_IOW('i',  56, struct ifreq)	/* detach interface */
1297c478bd9Sstevel@tonic-gate #define	SIOCGENPSTATS	_IOWR('i', 57, struct ifreq)	/* get ENP stats */
1307c478bd9Sstevel@tonic-gate #define	SIOCX25XMT	_IOWR('i', 59, struct ifreq)	/* start a slp proc */
1317c478bd9Sstevel@tonic-gate 							/* in x25if */
1327c478bd9Sstevel@tonic-gate #define	SIOCX25RCV	_IOWR('i', 60, struct ifreq)	/* start a slp proc */
1337c478bd9Sstevel@tonic-gate 							/* in x25if */
1347c478bd9Sstevel@tonic-gate #define	SIOCX25TBL	_IOWR('i', 61, struct ifreq)	/* xfer lun table to */
1357c478bd9Sstevel@tonic-gate 							/* kernel */
1367c478bd9Sstevel@tonic-gate #define	SIOCSLGETREQ	_IOWR('i', 71, struct ifreq)	/* wait for switched */
1377c478bd9Sstevel@tonic-gate 							/* SLIP request */
1387c478bd9Sstevel@tonic-gate #define	SIOCSLSTAT	_IOW('i',  72, struct ifreq)	/* pass SLIP info to */
1397c478bd9Sstevel@tonic-gate 							/* kernel */
1407c478bd9Sstevel@tonic-gate #define	SIOCSIFNAME	_IOW('i',  73, struct ifreq)	/* set interface name */
1417c478bd9Sstevel@tonic-gate #define	SIOCGENADDR	_IOWR('i', 85, struct ifreq)	/* Get ethernet addr */
1427c478bd9Sstevel@tonic-gate #define	SIOCGIFNUM	_IOR('i',  87, int)		/* get number of ifs */
1437c478bd9Sstevel@tonic-gate 
1447c478bd9Sstevel@tonic-gate #define	SIOCGIFMUXID	_IOWR('i', 88, struct ifreq)	/* get if muxid */
1457c478bd9Sstevel@tonic-gate #define	SIOCSIFMUXID	_IOW('i',  89, struct ifreq)	/* set if muxid */
1467c478bd9Sstevel@tonic-gate 
1477c478bd9Sstevel@tonic-gate #define	SIOCGIFINDEX	_IOWR('i', 90, struct ifreq)	/* get if index */
1487c478bd9Sstevel@tonic-gate #define	SIOCSIFINDEX	_IOW('i',  91, struct ifreq)	/* set if index */
1497c478bd9Sstevel@tonic-gate #define	SIOCGIFCONF	_IOWRN('i', 92, 8)		/* get if list */
1507c478bd9Sstevel@tonic-gate 
1517c478bd9Sstevel@tonic-gate /*
1527c478bd9Sstevel@tonic-gate  * New interface ioctls that use the struct lifreq. Can be used for
1537c478bd9Sstevel@tonic-gate  * both IPv4 and IPv6.
1547c478bd9Sstevel@tonic-gate  */
1557c478bd9Sstevel@tonic-gate #define	SIOCLIFREMOVEIF	_IOW('i',  110, struct lifreq)	/* delete logical */
1567c478bd9Sstevel@tonic-gate #define	SIOCLIFADDIF	_IOWR('i', 111, struct lifreq)	/* create logical */
1577c478bd9Sstevel@tonic-gate 
1587c478bd9Sstevel@tonic-gate #define	SIOCSLIFADDR	_IOW('i',  112, struct lifreq)	/* set if address */
1597c478bd9Sstevel@tonic-gate #define	SIOCGLIFADDR	_IOWR('i', 113, struct lifreq)	/* get if address */
1607c478bd9Sstevel@tonic-gate #define	SIOCSLIFDSTADDR	_IOW('i',  114, struct lifreq)	/* set p-p address */
1617c478bd9Sstevel@tonic-gate #define	SIOCGLIFDSTADDR	_IOWR('i', 115, struct lifreq)	/* get p-p address */
1627c478bd9Sstevel@tonic-gate #define	SIOCSLIFFLAGS	_IOW('i',  116, struct lifreq)	/* set if flags */
1637c478bd9Sstevel@tonic-gate #define	SIOCGLIFFLAGS	_IOWR('i', 117, struct lifreq)	/* get if flags */
1647c478bd9Sstevel@tonic-gate 
1657c478bd9Sstevel@tonic-gate /*
1667c478bd9Sstevel@tonic-gate  * Needs to be defined using _IOWRN macro to make it datamodel independent.
1677c478bd9Sstevel@tonic-gate  * Argument is a struct lifconf.
1687c478bd9Sstevel@tonic-gate  */
1697c478bd9Sstevel@tonic-gate #define	O_SIOCGLIFCONF	_IOWRN('i', 120, 16)		/* old get if list */
1707c478bd9Sstevel@tonic-gate #define	SIOCSLIFMTU	_IOW('i',  121, struct lifreq)	/* set if mtu */
1717c478bd9Sstevel@tonic-gate #define	SIOCGLIFMTU	_IOWR('i', 122, struct lifreq)	/* get if mtu */
1727c478bd9Sstevel@tonic-gate #define	SIOCGLIFBRDADDR	_IOWR('i', 123, struct lifreq)	/* get broadcast addr */
1737c478bd9Sstevel@tonic-gate #define	SIOCSLIFBRDADDR	_IOW('i',  124, struct lifreq)	/* set broadcast addr */
1747c478bd9Sstevel@tonic-gate #define	SIOCGLIFNETMASK	_IOWR('i', 125, struct lifreq)	/* get subnetmask */
1757c478bd9Sstevel@tonic-gate #define	SIOCSLIFNETMASK	_IOW('i',  126, struct lifreq)	/* set subnetmask */
1767c478bd9Sstevel@tonic-gate #define	SIOCGLIFMETRIC	_IOWR('i', 127, struct lifreq)	/* get if metric */
1777c478bd9Sstevel@tonic-gate #define	SIOCSLIFMETRIC	_IOW('i',  128, struct lifreq)	/* set if metric */
178e11c3f44Smeem #define	SIOCSLIFNAME	_IOWR('i', 129, struct lifreq)	/* set interface name */
1797c478bd9Sstevel@tonic-gate #define	SIOCGLIFNUM	_IOWR('i', 130, struct lifnum)	/* get number of ifs */
1807c478bd9Sstevel@tonic-gate #define	SIOCGLIFMUXID	_IOWR('i', 131, struct lifreq)	/* get if muxid */
1817c478bd9Sstevel@tonic-gate #define	SIOCSLIFMUXID	_IOW('i',  132, struct lifreq)	/* set if muxid */
1827c478bd9Sstevel@tonic-gate 
1837c478bd9Sstevel@tonic-gate #define	SIOCGLIFINDEX	_IOWR('i', 133, struct lifreq)	/* get if index */
1847c478bd9Sstevel@tonic-gate #define	SIOCSLIFINDEX	_IOW('i',  134, struct lifreq)	/* set if index */
1857c478bd9Sstevel@tonic-gate 
1867c478bd9Sstevel@tonic-gate #define	SIOCSLIFTOKEN	_IOW('i',  135, struct lifreq)	/* Set token for link */
1877c478bd9Sstevel@tonic-gate 							/* local address and */
1887c478bd9Sstevel@tonic-gate 							/* autoconf */
1897c478bd9Sstevel@tonic-gate #define	SIOCGLIFTOKEN	_IOWR('i', 136, struct lifreq)	/* Get token for link */
1907c478bd9Sstevel@tonic-gate 							/* local address and */
1917c478bd9Sstevel@tonic-gate 							/* autoconf */
1927c478bd9Sstevel@tonic-gate 
1937c478bd9Sstevel@tonic-gate #define	SIOCSLIFSUBNET	_IOW('i',  137, struct lifreq)	/* set subnet prefix */
1947c478bd9Sstevel@tonic-gate #define	SIOCGLIFSUBNET	_IOWR('i', 138, struct lifreq)	/* get subnet prefix */
1957c478bd9Sstevel@tonic-gate 
1967c478bd9Sstevel@tonic-gate #define	SIOCSLIFLNKINFO _IOW('i',  139, struct lifreq)	/* set link info */
1977c478bd9Sstevel@tonic-gate #define	SIOCGLIFLNKINFO _IOWR('i', 140, struct lifreq)	/* get link info */
1987c478bd9Sstevel@tonic-gate 
1997c478bd9Sstevel@tonic-gate #define	SIOCLIFDELND	_IOW('i',  141, struct lifreq)	/* Delete ND entry */
2007c478bd9Sstevel@tonic-gate #define	SIOCLIFGETND	_IOWR('i', 142, struct lifreq)	/* Get ND entry */
2017c478bd9Sstevel@tonic-gate #define	SIOCLIFSETND	_IOW('i',  143, struct lifreq)	/* Set ND entry */
2027c478bd9Sstevel@tonic-gate 
2037c478bd9Sstevel@tonic-gate /*
2047c478bd9Sstevel@tonic-gate  * Address querying ioctls.
2057c478bd9Sstevel@tonic-gate  */
2067c478bd9Sstevel@tonic-gate #define	SIOCTMYADDR	_IOWR('i', 144, struct sioc_addrreq)
2077c478bd9Sstevel@tonic-gate 							/* My address? */
2087c478bd9Sstevel@tonic-gate #define	SIOCTONLINK	_IOWR('i', 145, struct sioc_addrreq)
2097c478bd9Sstevel@tonic-gate 							/* Address on-link? */
2107c478bd9Sstevel@tonic-gate #define	SIOCTMYSITE	_IOWR('i', 146, struct sioc_addrreq)
2117c478bd9Sstevel@tonic-gate 							/* In this site? */
2127c478bd9Sstevel@tonic-gate 
213843ea709SDan McDonald /* 147-152 were SIOC*{TUNPARAM,IPSECONFIG} ioctls.  Feel free to re-use. */
2147c478bd9Sstevel@tonic-gate 
2157c478bd9Sstevel@tonic-gate /*
216e11c3f44Smeem  * 153 can be reused (was consolidation-private SIOCLIFFAILOVER).
2177c478bd9Sstevel@tonic-gate  */
2187c478bd9Sstevel@tonic-gate 
2197c478bd9Sstevel@tonic-gate /*
220e11c3f44Smeem  * IP Multipathing ioctls.
2217c478bd9Sstevel@tonic-gate  */
222e11c3f44Smeem #define	SIOCGLIFBINDING		_IOWR('i', 154, struct lifreq)
223e11c3f44Smeem #define	SIOCSLIFGROUPNAME	_IOW('i',  155, struct lifreq)
224e11c3f44Smeem #define	SIOCGLIFGROUPNAME	_IOWR('i', 156, struct lifreq)
225e11c3f44Smeem #define	SIOCGLIFGROUPINFO	_IOWR('i', 157, struct lifgroupinfo)
2267c478bd9Sstevel@tonic-gate 
2277c478bd9Sstevel@tonic-gate /*
228e11c3f44Smeem  * Leave 158 - 160 unused; used to be SIOC*IFARP ioctls.
229e11c3f44Smeem  * However, 161 can be reused (was consolidation-private SIOCSLIFOINDEX).
2307c478bd9Sstevel@tonic-gate  */
2317c478bd9Sstevel@tonic-gate 
2327c478bd9Sstevel@tonic-gate /*
2337c478bd9Sstevel@tonic-gate  * IOCTLS which provide an interface to the IPv6 address selection policy.
2347c478bd9Sstevel@tonic-gate  */
2357c478bd9Sstevel@tonic-gate #define	SIOCGIP6ADDRPOLICY	_IOWRN('i', 162, 0)
2367c478bd9Sstevel@tonic-gate #define	SIOCSIP6ADDRPOLICY	_IOWN('i', 163, 0)
2377c478bd9Sstevel@tonic-gate 
2387c478bd9Sstevel@tonic-gate /*
2397c478bd9Sstevel@tonic-gate  * IOCTL for retrieving sorting info for a list of destination addrs.
2407c478bd9Sstevel@tonic-gate  * Use the _IOWRN macro to make it datamodel independent.  Argument
2417c478bd9Sstevel@tonic-gate  * is a struct dstinfo.
2427c478bd9Sstevel@tonic-gate  */
2437c478bd9Sstevel@tonic-gate #define	SIOCGDSTINFO	_IOWRN('i', 164, 0)
2447c478bd9Sstevel@tonic-gate #define	SIOCGLIFCONF	_IOWRN('i', 165, 16)	/* get if list */
2457c478bd9Sstevel@tonic-gate 
2467c478bd9Sstevel@tonic-gate /*
2477c478bd9Sstevel@tonic-gate  * Extended IOCTLS for manipulating ARP cache entries.
2487c478bd9Sstevel@tonic-gate  */
2497c478bd9Sstevel@tonic-gate #define	SIOCSXARP	_IOW('i', 166, struct xarpreq)	/* set an ARP entry */
2507c478bd9Sstevel@tonic-gate #define	SIOCGXARP	_IOWR('i', 167, struct xarpreq)	/* get an ARP entry */
2517c478bd9Sstevel@tonic-gate #define	SIOCDXARP	_IOW('i', 168, struct xarpreq)	/* delete ARP entry */
2527c478bd9Sstevel@tonic-gate 
2537c478bd9Sstevel@tonic-gate /*
254ff550d0eSmasputra  * IOCTL private to sockfs.
2557c478bd9Sstevel@tonic-gate  */
256*ce17336eSAndy Fiddaman #define	_SIOCSOCKFALLBACK _IOW('i', 169, int)
2577c478bd9Sstevel@tonic-gate 
2587c478bd9Sstevel@tonic-gate /*
2597c478bd9Sstevel@tonic-gate  * IOCTLs for getting and setting zone associated with an interface, and
2607c478bd9Sstevel@tonic-gate  * unplumbing interfaces associated with a given zone.
2617c478bd9Sstevel@tonic-gate  */
2627c478bd9Sstevel@tonic-gate #define	SIOCGLIFZONE	_IOWR('i', 170, struct lifreq)	/* get zone id */
2637c478bd9Sstevel@tonic-gate #define	SIOCSLIFZONE	_IOW('i', 171, struct lifreq)	/* set zone id */
2647c478bd9Sstevel@tonic-gate 
2657c478bd9Sstevel@tonic-gate /*
2667c478bd9Sstevel@tonic-gate  * IOCTLS for handling SCTP options.
2677c478bd9Sstevel@tonic-gate  */
2687c478bd9Sstevel@tonic-gate #define	SIOCSCTPSOPT	_IOWN('i', 172, 16)	/* Set SCTP option */
2697c478bd9Sstevel@tonic-gate #define	SIOCSCTPGOPT	_IOWRN('i', 173, 16)	/* Get SCTP option */
2707c478bd9Sstevel@tonic-gate #define	SIOCSCTPPEELOFF	_IOWR('i', 174, int)	/* SCTP peeloff */
2717c478bd9Sstevel@tonic-gate 
2727c478bd9Sstevel@tonic-gate /*
2737c478bd9Sstevel@tonic-gate  * IOCTLs for getting and setting the source address that is used for packets
2747c478bd9Sstevel@tonic-gate  * going out on the given interface.
2757c478bd9Sstevel@tonic-gate  */
2767c478bd9Sstevel@tonic-gate #define	SIOCGLIFUSESRC	_IOWR('i', 175, struct lifreq)	/* get src addr */
2777c478bd9Sstevel@tonic-gate #define	SIOCSLIFUSESRC	_IOW('i', 176, struct lifreq)	/* set src addr */
2787c478bd9Sstevel@tonic-gate 
2797c478bd9Sstevel@tonic-gate /*
2807c478bd9Sstevel@tonic-gate  * IOCTL used to get all the interfaces that use the the specified interfaces'
2817c478bd9Sstevel@tonic-gate  * source address
2827c478bd9Sstevel@tonic-gate  */
2837c478bd9Sstevel@tonic-gate #define	SIOCGLIFSRCOF	_IOWRN('i', 177, 16)		/* source of */
2847c478bd9Sstevel@tonic-gate 
2857c478bd9Sstevel@tonic-gate /*
2867c478bd9Sstevel@tonic-gate  * IOCTLs for source specific multicast; get or set a socket's
2877c478bd9Sstevel@tonic-gate  * source filter for a particular multicast group.  Argument is
2887c478bd9Sstevel@tonic-gate  * a struct group_filter.  Defined in RFC 3678.
2897c478bd9Sstevel@tonic-gate  */
290*ce17336eSAndy Fiddaman #define	SIOCGMSFILTER	_IOWR('i', 178, int)
291*ce17336eSAndy Fiddaman #define	SIOCSMSFILTER	_IOW('i', 179, int)
2927c478bd9Sstevel@tonic-gate /*
2937c478bd9Sstevel@tonic-gate  * IPv4-specific versions of the above; get or set a socket's source
2947c478bd9Sstevel@tonic-gate  * filter for a particular multicast group, for PF_INET sockets only.
2957c478bd9Sstevel@tonic-gate  * Argument is a struct ip_msfilter.
2967c478bd9Sstevel@tonic-gate  */
297*ce17336eSAndy Fiddaman #define	SIOCGIPMSFILTER	_IOWR('i', 180, int)
298*ce17336eSAndy Fiddaman #define	SIOCSIPMSFILTER	_IOW('i', 181, int)
2997c478bd9Sstevel@tonic-gate 
30049df4566Sethindra /*
301e11c3f44Smeem  * 182 can be reused (was consolidation-private SIOCSIPMPFAILBACK).
30249df4566Sethindra  */
30349df4566Sethindra 
3040f1702c5SYu Xiangning #define	SIOCSENABLESDP	_IOWR('i', 183, int)    /*  Enable SDP */
3050f1702c5SYu Xiangning 
3060f1702c5SYu Xiangning #define	SIOCSQPTR	_IOWR('i', 184, int)    /* set q_ptr of stream */
30774e20cfeSnh 
308a6911619SDarren Reed /*
309a6911619SDarren Reed  * SIOCGIFHWADDR and SIOCGLIFHWADDR (below) are available for PF_PACKET,
310a6911619SDarren Reed  * PF_INET and PF_INET6 sockets.
311a6911619SDarren Reed  */
312a6911619SDarren Reed #define	SIOCGIFHWADDR	_IOWR('i', 185, struct ifreq)
313a6911619SDarren Reed 
3140a0e9771SDarren Reed #define	SIOCGSTAMP	_IOWR('i', 186, struct timeval)	/* PF_PACKET */
3150a0e9771SDarren Reed 
316dbed73cbSSangeeta Misra /*
317dbed73cbSSangeeta Misra  * Private ioctl for Integrated Load Balancer.  The ioctl length varies.
318dbed73cbSSangeeta Misra  */
319*ce17336eSAndy Fiddaman #define	SIOCILB		_IOWR('i', 187, int)
320dbed73cbSSangeeta Misra 
3216e91bba0SGirish Moodalbail /*
3226e91bba0SGirish Moodalbail  * IOCTL's to get/set module specific or interface specific properties.
3236e91bba0SGirish Moodalbail  * Argument is a struct mod_ioc_prop_s. These ioctls are Consolidation Private.
3246e91bba0SGirish Moodalbail  */
3256e91bba0SGirish Moodalbail #define	SIOCGETPROP	_IOWRN('p', 188, 0)
326*ce17336eSAndy Fiddaman #define	SIOCSETPROP	_IOW('p', 189, int)
3276e91bba0SGirish Moodalbail 
3286e91bba0SGirish Moodalbail /*
3296e91bba0SGirish Moodalbail  * IOCTL used to check for the given ipif, whether DAD is in progress or
3306e91bba0SGirish Moodalbail  * DAD has completed. This ioctl is Consolidation Private.
3316e91bba0SGirish Moodalbail  */
3326e91bba0SGirish Moodalbail #define	SIOCGLIFDADSTATE	_IOWR('i', 190, struct lifreq)
3336e91bba0SGirish Moodalbail 
3346e91bba0SGirish Moodalbail /*
3356e91bba0SGirish Moodalbail  * IOCTL used to generate an IPv6 address using the given prefix and the
3366e91bba0SGirish Moodalbail  * default token for the interface.
3376e91bba0SGirish Moodalbail  */
3386e91bba0SGirish Moodalbail #define	SIOCSLIFPREFIX		_IOWR('i', 191, struct lifreq)
3396e91bba0SGirish Moodalbail 
340a6911619SDarren Reed #define	SIOCGLIFHWADDR	_IOWR('i', 192, struct lifreq)
341a6911619SDarren Reed 
3427c478bd9Sstevel@tonic-gate #ifdef	__cplusplus
3437c478bd9Sstevel@tonic-gate }
3447c478bd9Sstevel@tonic-gate #endif
3457c478bd9Sstevel@tonic-gate 
3467c478bd9Sstevel@tonic-gate #endif	/* _SYS_SOCKIO_H */
347