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 574e20cfeSnh145002 * Common Development and Distribution License (the "License"). 674e20cfeSnh145002 * 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 /* 2274e20cfeSnh145002 * Copyright 2007 Sun Microsystems, Inc. All rights reserved. 237c478bd9Sstevel@tonic-gate * Use is subject to license terms. 247c478bd9Sstevel@tonic-gate */ 257c478bd9Sstevel@tonic-gate 267c478bd9Sstevel@tonic-gate /* Copyright (c) 1983, 1984, 1985, 1986, 1987, 1988, 1989 AT&T */ 277c478bd9Sstevel@tonic-gate /* 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 #pragma ident "%Z%%M% %I% %E% SMI" 437c478bd9Sstevel@tonic-gate 447c478bd9Sstevel@tonic-gate /* 457c478bd9Sstevel@tonic-gate * General socket ioctl definitions. 467c478bd9Sstevel@tonic-gate */ 477c478bd9Sstevel@tonic-gate 487c478bd9Sstevel@tonic-gate #include <sys/ioccom.h> 497c478bd9Sstevel@tonic-gate 507c478bd9Sstevel@tonic-gate #ifdef __cplusplus 517c478bd9Sstevel@tonic-gate extern "C" { 527c478bd9Sstevel@tonic-gate #endif 537c478bd9Sstevel@tonic-gate 547c478bd9Sstevel@tonic-gate /* socket i/o controls */ 557c478bd9Sstevel@tonic-gate #define SIOCSHIWAT _IOW('s', 0, int) /* set high watermark */ 567c478bd9Sstevel@tonic-gate #define SIOCGHIWAT _IOR('s', 1, int) /* get high watermark */ 577c478bd9Sstevel@tonic-gate #define SIOCSLOWAT _IOW('s', 2, int) /* set low watermark */ 587c478bd9Sstevel@tonic-gate #define SIOCGLOWAT _IOR('s', 3, int) /* get low watermark */ 597c478bd9Sstevel@tonic-gate #define SIOCATMARK _IOR('s', 7, int) /* at oob mark? */ 607c478bd9Sstevel@tonic-gate #define SIOCSPGRP _IOW('s', 8, int) /* set process group */ 617c478bd9Sstevel@tonic-gate #define SIOCGPGRP _IOR('s', 9, int) /* get process group */ 627c478bd9Sstevel@tonic-gate 637c478bd9Sstevel@tonic-gate /* 647c478bd9Sstevel@tonic-gate * SIOCADDRT and SIOCDELRT ioctls need to be defined using _IOWN macro to 657c478bd9Sstevel@tonic-gate * make them datamodel independent. 667c478bd9Sstevel@tonic-gate */ 677c478bd9Sstevel@tonic-gate #define SIOCADDRT _IOWN('r', 10, 48) /* add route */ 687c478bd9Sstevel@tonic-gate #define SIOCDELRT _IOWN('r', 11, 48) /* delete route */ 697c478bd9Sstevel@tonic-gate 707c478bd9Sstevel@tonic-gate /* For multicast routing. These might change in future release */ 717c478bd9Sstevel@tonic-gate #define SIOCGETVIFCNT _IOWR('r', 20, struct sioc_vif_req) 727c478bd9Sstevel@tonic-gate /* get vif pkt count */ 737c478bd9Sstevel@tonic-gate #define SIOCGETSGCNT _IOWR('r', 21, struct sioc_sg_req) 747c478bd9Sstevel@tonic-gate /* get s,g pkt count */ 757c478bd9Sstevel@tonic-gate #define SIOCGETLSGCNT _IOWR('r', 21, struct sioc_lsg_req) 767c478bd9Sstevel@tonic-gate /* get s,g pkt count */ 777c478bd9Sstevel@tonic-gate 787c478bd9Sstevel@tonic-gate /* 797c478bd9Sstevel@tonic-gate * Obsolete interface ioctls using struct ifreq that are supported 807c478bd9Sstevel@tonic-gate * for compatibility. New interface ioctls use struct lifreq. 817c478bd9Sstevel@tonic-gate */ 827c478bd9Sstevel@tonic-gate #define SIOCSIFADDR _IOW('i', 12, struct ifreq) /* set if address */ 837c478bd9Sstevel@tonic-gate #define SIOCGIFADDR _IOWR('i', 13, struct ifreq) /* get if address */ 847c478bd9Sstevel@tonic-gate #define SIOCSIFDSTADDR _IOW('i', 14, struct ifreq) /* set p-p address */ 857c478bd9Sstevel@tonic-gate #define SIOCGIFDSTADDR _IOWR('i', 15, struct ifreq) /* get p-p address */ 867c478bd9Sstevel@tonic-gate #define SIOCSIFFLAGS _IOW('i', 16, struct ifreq) /* set if flags */ 877c478bd9Sstevel@tonic-gate #define SIOCGIFFLAGS _IOWR('i', 17, struct ifreq) /* get if flags */ 887c478bd9Sstevel@tonic-gate #define SIOCSIFMEM _IOW('i', 18, struct ifreq) /* set interface mem */ 897c478bd9Sstevel@tonic-gate #define SIOCGIFMEM _IOWR('i', 19, struct ifreq) /* get interface mem */ 907c478bd9Sstevel@tonic-gate 917c478bd9Sstevel@tonic-gate /* 927c478bd9Sstevel@tonic-gate * Needs to be defined using _IOWRN macro to make it datamodel independent. 937c478bd9Sstevel@tonic-gate * Argument is a struct ifconf. 947c478bd9Sstevel@tonic-gate */ 957c478bd9Sstevel@tonic-gate #define O_SIOCGIFCONF _IOWRN('i', 20, 8) /* old get if list */ 967c478bd9Sstevel@tonic-gate 977c478bd9Sstevel@tonic-gate #define SIOCSIFMTU _IOW('i', 21, struct ifreq) /* set if mtu */ 987c478bd9Sstevel@tonic-gate #define SIOCGIFMTU _IOWR('i', 22, struct ifreq) /* get if mtu */ 997c478bd9Sstevel@tonic-gate 1007c478bd9Sstevel@tonic-gate /* from 4.3BSD */ 1017c478bd9Sstevel@tonic-gate #define SIOCGIFBRDADDR _IOWR('i', 23, struct ifreq) /* get broadcast addr */ 1027c478bd9Sstevel@tonic-gate #define SIOCSIFBRDADDR _IOW('i', 24, struct ifreq) /* set broadcast addr */ 1037c478bd9Sstevel@tonic-gate #define SIOCGIFNETMASK _IOWR('i', 25, struct ifreq) /* get subnetmask */ 1047c478bd9Sstevel@tonic-gate #define SIOCSIFNETMASK _IOW('i', 26, struct ifreq) /* set subnetmask */ 1057c478bd9Sstevel@tonic-gate #define SIOCGIFMETRIC _IOWR('i', 27, struct ifreq) /* get if metric */ 1067c478bd9Sstevel@tonic-gate #define SIOCSIFMETRIC _IOW('i', 28, struct ifreq) /* set if metric */ 1077c478bd9Sstevel@tonic-gate 1087c478bd9Sstevel@tonic-gate #define SIOCSARP _IOW('i', 30, struct arpreq) /* set arp entry */ 1097c478bd9Sstevel@tonic-gate #define SIOCGARP _IOWR('i', 31, struct arpreq) /* get arp entry */ 1107c478bd9Sstevel@tonic-gate #define SIOCDARP _IOW('i', 32, struct arpreq) /* delete arp entry */ 1117c478bd9Sstevel@tonic-gate #define SIOCUPPER _IOW('i', 40, struct ifreq) /* attach upper layer */ 1127c478bd9Sstevel@tonic-gate #define SIOCLOWER _IOW('i', 41, struct ifreq) /* attach lower layer */ 1137c478bd9Sstevel@tonic-gate #define SIOCSETSYNC _IOW('i', 44, struct ifreq) /* set syncmode */ 1147c478bd9Sstevel@tonic-gate #define SIOCGETSYNC _IOWR('i', 45, struct ifreq) /* get syncmode */ 1157c478bd9Sstevel@tonic-gate #define SIOCSSDSTATS _IOWR('i', 46, struct ifreq) /* sync data stats */ 1167c478bd9Sstevel@tonic-gate #define SIOCSSESTATS _IOWR('i', 47, struct ifreq) /* sync error stats */ 1177c478bd9Sstevel@tonic-gate 1187c478bd9Sstevel@tonic-gate #define SIOCSPROMISC _IOW('i', 48, int) /* request promisc */ 1197c478bd9Sstevel@tonic-gate /* mode on/off */ 1207c478bd9Sstevel@tonic-gate #define SIOCADDMULTI _IOW('i', 49, struct ifreq) /* set m/c address */ 1217c478bd9Sstevel@tonic-gate #define SIOCDELMULTI _IOW('i', 50, struct ifreq) /* clr m/c address */ 1227c478bd9Sstevel@tonic-gate 1237c478bd9Sstevel@tonic-gate /* STREAMS based socket emulation */ 1247c478bd9Sstevel@tonic-gate 1257c478bd9Sstevel@tonic-gate #define SIOCGETNAME _IOR('s', 52, struct sockaddr) /* getsockname */ 1267c478bd9Sstevel@tonic-gate #define SIOCGETPEER _IOR('s', 53, struct sockaddr) /* getpeername */ 1277c478bd9Sstevel@tonic-gate #define IF_UNITSEL _IOW('s', 54, int) /* set unit number */ 1287c478bd9Sstevel@tonic-gate #define SIOCXPROTO _IO('s', 55) /* empty proto table */ 1297c478bd9Sstevel@tonic-gate 1307c478bd9Sstevel@tonic-gate #define SIOCIFDETACH _IOW('i', 56, struct ifreq) /* detach interface */ 1317c478bd9Sstevel@tonic-gate #define SIOCGENPSTATS _IOWR('i', 57, struct ifreq) /* get ENP stats */ 1327c478bd9Sstevel@tonic-gate #define SIOCX25XMT _IOWR('i', 59, struct ifreq) /* start a slp proc */ 1337c478bd9Sstevel@tonic-gate /* in x25if */ 1347c478bd9Sstevel@tonic-gate #define SIOCX25RCV _IOWR('i', 60, struct ifreq) /* start a slp proc */ 1357c478bd9Sstevel@tonic-gate /* in x25if */ 1367c478bd9Sstevel@tonic-gate #define SIOCX25TBL _IOWR('i', 61, struct ifreq) /* xfer lun table to */ 1377c478bd9Sstevel@tonic-gate /* kernel */ 1387c478bd9Sstevel@tonic-gate #define SIOCSLGETREQ _IOWR('i', 71, struct ifreq) /* wait for switched */ 1397c478bd9Sstevel@tonic-gate /* SLIP request */ 1407c478bd9Sstevel@tonic-gate #define SIOCSLSTAT _IOW('i', 72, struct ifreq) /* pass SLIP info to */ 1417c478bd9Sstevel@tonic-gate /* kernel */ 1427c478bd9Sstevel@tonic-gate #define SIOCSIFNAME _IOW('i', 73, struct ifreq) /* set interface name */ 1437c478bd9Sstevel@tonic-gate #define SIOCGENADDR _IOWR('i', 85, struct ifreq) /* Get ethernet addr */ 1447c478bd9Sstevel@tonic-gate #define SIOCGIFNUM _IOR('i', 87, int) /* get number of ifs */ 1457c478bd9Sstevel@tonic-gate 1467c478bd9Sstevel@tonic-gate #define SIOCGIFMUXID _IOWR('i', 88, struct ifreq) /* get if muxid */ 1477c478bd9Sstevel@tonic-gate #define SIOCSIFMUXID _IOW('i', 89, struct ifreq) /* set if muxid */ 1487c478bd9Sstevel@tonic-gate 1497c478bd9Sstevel@tonic-gate #define SIOCGIFINDEX _IOWR('i', 90, struct ifreq) /* get if index */ 1507c478bd9Sstevel@tonic-gate #define SIOCSIFINDEX _IOW('i', 91, struct ifreq) /* set if index */ 1517c478bd9Sstevel@tonic-gate #define SIOCGIFCONF _IOWRN('i', 92, 8) /* get if list */ 1527c478bd9Sstevel@tonic-gate 1537c478bd9Sstevel@tonic-gate /* 1547c478bd9Sstevel@tonic-gate * New interface ioctls that use the struct lifreq. Can be used for 1557c478bd9Sstevel@tonic-gate * both IPv4 and IPv6. 1567c478bd9Sstevel@tonic-gate */ 1577c478bd9Sstevel@tonic-gate #define SIOCLIFREMOVEIF _IOW('i', 110, struct lifreq) /* delete logical */ 1587c478bd9Sstevel@tonic-gate #define SIOCLIFADDIF _IOWR('i', 111, struct lifreq) /* create logical */ 1597c478bd9Sstevel@tonic-gate 1607c478bd9Sstevel@tonic-gate #define SIOCSLIFADDR _IOW('i', 112, struct lifreq) /* set if address */ 1617c478bd9Sstevel@tonic-gate #define SIOCGLIFADDR _IOWR('i', 113, struct lifreq) /* get if address */ 1627c478bd9Sstevel@tonic-gate #define SIOCSLIFDSTADDR _IOW('i', 114, struct lifreq) /* set p-p address */ 1637c478bd9Sstevel@tonic-gate #define SIOCGLIFDSTADDR _IOWR('i', 115, struct lifreq) /* get p-p address */ 1647c478bd9Sstevel@tonic-gate #define SIOCSLIFFLAGS _IOW('i', 116, struct lifreq) /* set if flags */ 1657c478bd9Sstevel@tonic-gate #define SIOCGLIFFLAGS _IOWR('i', 117, struct lifreq) /* get if flags */ 1667c478bd9Sstevel@tonic-gate 1677c478bd9Sstevel@tonic-gate /* 1687c478bd9Sstevel@tonic-gate * Needs to be defined using _IOWRN macro to make it datamodel independent. 1697c478bd9Sstevel@tonic-gate * Argument is a struct lifconf. 1707c478bd9Sstevel@tonic-gate */ 1717c478bd9Sstevel@tonic-gate #define O_SIOCGLIFCONF _IOWRN('i', 120, 16) /* old get if list */ 1727c478bd9Sstevel@tonic-gate #define SIOCSLIFMTU _IOW('i', 121, struct lifreq) /* set if mtu */ 1737c478bd9Sstevel@tonic-gate #define SIOCGLIFMTU _IOWR('i', 122, struct lifreq) /* get if mtu */ 1747c478bd9Sstevel@tonic-gate #define SIOCGLIFBRDADDR _IOWR('i', 123, struct lifreq) /* get broadcast addr */ 1757c478bd9Sstevel@tonic-gate #define SIOCSLIFBRDADDR _IOW('i', 124, struct lifreq) /* set broadcast addr */ 1767c478bd9Sstevel@tonic-gate #define SIOCGLIFNETMASK _IOWR('i', 125, struct lifreq) /* get subnetmask */ 1777c478bd9Sstevel@tonic-gate #define SIOCSLIFNETMASK _IOW('i', 126, struct lifreq) /* set subnetmask */ 1787c478bd9Sstevel@tonic-gate #define SIOCGLIFMETRIC _IOWR('i', 127, struct lifreq) /* get if metric */ 1797c478bd9Sstevel@tonic-gate #define SIOCSLIFMETRIC _IOW('i', 128, struct lifreq) /* set if metric */ 1807c478bd9Sstevel@tonic-gate #define SIOCSLIFNAME _IOWR('i', 129, struct lifreq) /* set interface name */ 1817c478bd9Sstevel@tonic-gate #define SIOCGLIFNUM _IOWR('i', 130, struct lifnum) /* get number of ifs */ 1827c478bd9Sstevel@tonic-gate #define SIOCGLIFMUXID _IOWR('i', 131, struct lifreq) /* get if muxid */ 1837c478bd9Sstevel@tonic-gate #define SIOCSLIFMUXID _IOW('i', 132, struct lifreq) /* set if muxid */ 1847c478bd9Sstevel@tonic-gate 1857c478bd9Sstevel@tonic-gate #define SIOCGLIFINDEX _IOWR('i', 133, struct lifreq) /* get if index */ 1867c478bd9Sstevel@tonic-gate #define SIOCSLIFINDEX _IOW('i', 134, struct lifreq) /* set if index */ 1877c478bd9Sstevel@tonic-gate 1887c478bd9Sstevel@tonic-gate #define SIOCSLIFTOKEN _IOW('i', 135, struct lifreq) /* Set token for link */ 1897c478bd9Sstevel@tonic-gate /* local address and */ 1907c478bd9Sstevel@tonic-gate /* autoconf */ 1917c478bd9Sstevel@tonic-gate #define SIOCGLIFTOKEN _IOWR('i', 136, struct lifreq) /* Get token for link */ 1927c478bd9Sstevel@tonic-gate /* local address and */ 1937c478bd9Sstevel@tonic-gate /* autoconf */ 1947c478bd9Sstevel@tonic-gate 1957c478bd9Sstevel@tonic-gate #define SIOCSLIFSUBNET _IOW('i', 137, struct lifreq) /* set subnet prefix */ 1967c478bd9Sstevel@tonic-gate #define SIOCGLIFSUBNET _IOWR('i', 138, struct lifreq) /* get subnet prefix */ 1977c478bd9Sstevel@tonic-gate 1987c478bd9Sstevel@tonic-gate #define SIOCSLIFLNKINFO _IOW('i', 139, struct lifreq) /* set link info */ 1997c478bd9Sstevel@tonic-gate #define SIOCGLIFLNKINFO _IOWR('i', 140, struct lifreq) /* get link info */ 2007c478bd9Sstevel@tonic-gate 2017c478bd9Sstevel@tonic-gate #define SIOCLIFDELND _IOW('i', 141, struct lifreq) /* Delete ND entry */ 2027c478bd9Sstevel@tonic-gate #define SIOCLIFGETND _IOWR('i', 142, struct lifreq) /* Get ND entry */ 2037c478bd9Sstevel@tonic-gate #define SIOCLIFSETND _IOW('i', 143, struct lifreq) /* Set ND entry */ 2047c478bd9Sstevel@tonic-gate 2057c478bd9Sstevel@tonic-gate /* 2067c478bd9Sstevel@tonic-gate * Address querying ioctls. 2077c478bd9Sstevel@tonic-gate */ 2087c478bd9Sstevel@tonic-gate #define SIOCTMYADDR _IOWR('i', 144, struct sioc_addrreq) 2097c478bd9Sstevel@tonic-gate /* My address? */ 2107c478bd9Sstevel@tonic-gate #define SIOCTONLINK _IOWR('i', 145, struct sioc_addrreq) 2117c478bd9Sstevel@tonic-gate /* Address on-link? */ 2127c478bd9Sstevel@tonic-gate #define SIOCTMYSITE _IOWR('i', 146, struct sioc_addrreq) 2137c478bd9Sstevel@tonic-gate /* In this site? */ 2147c478bd9Sstevel@tonic-gate 2157c478bd9Sstevel@tonic-gate #define SIOCGTUNPARAM _IOR('i', 147, struct iftun_req) 2167c478bd9Sstevel@tonic-gate /* get tunnel */ 2177c478bd9Sstevel@tonic-gate /* parameters */ 2187c478bd9Sstevel@tonic-gate #define SIOCSTUNPARAM _IOW('i', 148, struct iftun_req) 2197c478bd9Sstevel@tonic-gate /* set tunnel */ 2207c478bd9Sstevel@tonic-gate /* parameters */ 2217c478bd9Sstevel@tonic-gate 2227c478bd9Sstevel@tonic-gate #define SIOCFIPSECONFIG _IOW('i', 149, 0) /* Flush Policy */ 2237c478bd9Sstevel@tonic-gate #define SIOCSIPSECONFIG _IOW('i', 150, 0) /* Set Policy */ 2247c478bd9Sstevel@tonic-gate #define SIOCDIPSECONFIG _IOW('i', 151, 0) /* Delete Policy */ 2257c478bd9Sstevel@tonic-gate #define SIOCLIPSECONFIG _IOW('i', 152, 0) /* List Policy */ 2267c478bd9Sstevel@tonic-gate 2277c478bd9Sstevel@tonic-gate /* 2287c478bd9Sstevel@tonic-gate * IOCTLS for implementing load balancing and failover within IP. 2297c478bd9Sstevel@tonic-gate */ 2307c478bd9Sstevel@tonic-gate #define SIOCLIFFAILOVER _IOW('i', 153, struct lifreq) /* Failover */ 2317c478bd9Sstevel@tonic-gate #define SIOCLIFFAILBACK _IOW('i', 154, struct lifreq) /* Failback */ 2327c478bd9Sstevel@tonic-gate #define SIOCSLIFGROUPNAME _IOW('i', 155, struct lifreq) /* Group interfaces */ 2337c478bd9Sstevel@tonic-gate #define SIOCGLIFGROUPNAME _IOWR('i', 156, struct lifreq) /* Get group name */ 2347c478bd9Sstevel@tonic-gate #define SIOCGLIFOINDEX _IOWR('i', 157, struct lifreq) /* get orig if index */ 2357c478bd9Sstevel@tonic-gate 2367c478bd9Sstevel@tonic-gate /* 2377c478bd9Sstevel@tonic-gate * Leave 158 - 160 unused; used to be SIOC*IFARP ioctls. 2387c478bd9Sstevel@tonic-gate */ 2397c478bd9Sstevel@tonic-gate 2407c478bd9Sstevel@tonic-gate /* 2417c478bd9Sstevel@tonic-gate * IOCTL for implementing load balancing and failover within IP. 2427c478bd9Sstevel@tonic-gate */ 2437c478bd9Sstevel@tonic-gate #define SIOCSLIFOINDEX _IOWR('i', 161, struct lifreq) /* set orig if index */ 2447c478bd9Sstevel@tonic-gate 2457c478bd9Sstevel@tonic-gate /* 2467c478bd9Sstevel@tonic-gate * IOCTLS which provide an interface to the IPv6 address selection policy. 2477c478bd9Sstevel@tonic-gate */ 2487c478bd9Sstevel@tonic-gate #define SIOCGIP6ADDRPOLICY _IOWRN('i', 162, 0) 2497c478bd9Sstevel@tonic-gate #define SIOCSIP6ADDRPOLICY _IOWN('i', 163, 0) 2507c478bd9Sstevel@tonic-gate 2517c478bd9Sstevel@tonic-gate /* 2527c478bd9Sstevel@tonic-gate * IOCTL for retrieving sorting info for a list of destination addrs. 2537c478bd9Sstevel@tonic-gate * Use the _IOWRN macro to make it datamodel independent. Argument 2547c478bd9Sstevel@tonic-gate * is a struct dstinfo. 2557c478bd9Sstevel@tonic-gate */ 2567c478bd9Sstevel@tonic-gate #define SIOCGDSTINFO _IOWRN('i', 164, 0) 2577c478bd9Sstevel@tonic-gate #define SIOCGLIFCONF _IOWRN('i', 165, 16) /* get if list */ 2587c478bd9Sstevel@tonic-gate 2597c478bd9Sstevel@tonic-gate /* 2607c478bd9Sstevel@tonic-gate * Extended IOCTLS for manipulating ARP cache entries. 2617c478bd9Sstevel@tonic-gate */ 2627c478bd9Sstevel@tonic-gate #define SIOCSXARP _IOW('i', 166, struct xarpreq) /* set an ARP entry */ 2637c478bd9Sstevel@tonic-gate #define SIOCGXARP _IOWR('i', 167, struct xarpreq) /* get an ARP entry */ 2647c478bd9Sstevel@tonic-gate #define SIOCDXARP _IOW('i', 168, struct xarpreq) /* delete ARP entry */ 2657c478bd9Sstevel@tonic-gate 2667c478bd9Sstevel@tonic-gate /* 267ff550d0eSmasputra * IOCTL private to sockfs. 2687c478bd9Sstevel@tonic-gate */ 269ff550d0eSmasputra #define _SIOCSOCKFALLBACK _IOW('i', 169, 0) 2707c478bd9Sstevel@tonic-gate 2717c478bd9Sstevel@tonic-gate /* 2727c478bd9Sstevel@tonic-gate * IOCTLs for getting and setting zone associated with an interface, and 2737c478bd9Sstevel@tonic-gate * unplumbing interfaces associated with a given zone. 2747c478bd9Sstevel@tonic-gate */ 2757c478bd9Sstevel@tonic-gate #define SIOCGLIFZONE _IOWR('i', 170, struct lifreq) /* get zone id */ 2767c478bd9Sstevel@tonic-gate #define SIOCSLIFZONE _IOW('i', 171, struct lifreq) /* set zone id */ 2777c478bd9Sstevel@tonic-gate 2787c478bd9Sstevel@tonic-gate /* 2797c478bd9Sstevel@tonic-gate * IOCTLS for handling SCTP options. 2807c478bd9Sstevel@tonic-gate */ 2817c478bd9Sstevel@tonic-gate #define SIOCSCTPSOPT _IOWN('i', 172, 16) /* Set SCTP option */ 2827c478bd9Sstevel@tonic-gate #define SIOCSCTPGOPT _IOWRN('i', 173, 16) /* Get SCTP option */ 2837c478bd9Sstevel@tonic-gate #define SIOCSCTPPEELOFF _IOWR('i', 174, int) /* SCTP peeloff */ 2847c478bd9Sstevel@tonic-gate 2857c478bd9Sstevel@tonic-gate /* 2867c478bd9Sstevel@tonic-gate * IOCTLs for getting and setting the source address that is used for packets 2877c478bd9Sstevel@tonic-gate * going out on the given interface. 2887c478bd9Sstevel@tonic-gate */ 2897c478bd9Sstevel@tonic-gate #define SIOCGLIFUSESRC _IOWR('i', 175, struct lifreq) /* get src addr */ 2907c478bd9Sstevel@tonic-gate #define SIOCSLIFUSESRC _IOW('i', 176, struct lifreq) /* set src addr */ 2917c478bd9Sstevel@tonic-gate 2927c478bd9Sstevel@tonic-gate /* 2937c478bd9Sstevel@tonic-gate * IOCTL used to get all the interfaces that use the the specified interfaces' 2947c478bd9Sstevel@tonic-gate * source address 2957c478bd9Sstevel@tonic-gate */ 2967c478bd9Sstevel@tonic-gate #define SIOCGLIFSRCOF _IOWRN('i', 177, 16) /* source of */ 2977c478bd9Sstevel@tonic-gate 2987c478bd9Sstevel@tonic-gate /* 2997c478bd9Sstevel@tonic-gate * IOCTLs for source specific multicast; get or set a socket's 3007c478bd9Sstevel@tonic-gate * source filter for a particular multicast group. Argument is 3017c478bd9Sstevel@tonic-gate * a struct group_filter. Defined in RFC 3678. 3027c478bd9Sstevel@tonic-gate */ 3037c478bd9Sstevel@tonic-gate #define SIOCGMSFILTER _IOWR('i', 178, 0) 3047c478bd9Sstevel@tonic-gate #define SIOCSMSFILTER _IOW('i', 179, 0) 3057c478bd9Sstevel@tonic-gate /* 3067c478bd9Sstevel@tonic-gate * IPv4-specific versions of the above; get or set a socket's source 3077c478bd9Sstevel@tonic-gate * filter for a particular multicast group, for PF_INET sockets only. 3087c478bd9Sstevel@tonic-gate * Argument is a struct ip_msfilter. 3097c478bd9Sstevel@tonic-gate */ 3107c478bd9Sstevel@tonic-gate #define SIOCGIPMSFILTER _IOWR('i', 180, 0) 3117c478bd9Sstevel@tonic-gate #define SIOCSIPMSFILTER _IOW('i', 181, 0) 3127c478bd9Sstevel@tonic-gate 31349df4566Sethindra /* 31449df4566Sethindra * IOCTL for implementing "disable FAILBACK" IPMP configuration. 31549df4566Sethindra */ 31649df4566Sethindra #define SIOCSIPMPFAILBACK _IOW('i', 182, int) /* enable/disable */ 31749df4566Sethindra /* FAILBACK */ 31849df4566Sethindra 319*bbfe764eSse146197 #define SIOCSENABLESDP _IOWR('i', 183, int) /* Enable SDP */ 32074e20cfeSnh145002 3217c478bd9Sstevel@tonic-gate #ifdef __cplusplus 3227c478bd9Sstevel@tonic-gate } 3237c478bd9Sstevel@tonic-gate #endif 3247c478bd9Sstevel@tonic-gate 3257c478bd9Sstevel@tonic-gate #endif /* _SYS_SOCKIO_H */ 326