1*7c478bd9Sstevel@tonic-gate /* 2*7c478bd9Sstevel@tonic-gate * CDDL HEADER START 3*7c478bd9Sstevel@tonic-gate * 4*7c478bd9Sstevel@tonic-gate * The contents of this file are subject to the terms of the 5*7c478bd9Sstevel@tonic-gate * Common Development and Distribution License, Version 1.0 only 6*7c478bd9Sstevel@tonic-gate * (the "License"). You may not use this file except in compliance 7*7c478bd9Sstevel@tonic-gate * with the License. 8*7c478bd9Sstevel@tonic-gate * 9*7c478bd9Sstevel@tonic-gate * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 10*7c478bd9Sstevel@tonic-gate * or http://www.opensolaris.org/os/licensing. 11*7c478bd9Sstevel@tonic-gate * See the License for the specific language governing permissions 12*7c478bd9Sstevel@tonic-gate * and limitations under the License. 13*7c478bd9Sstevel@tonic-gate * 14*7c478bd9Sstevel@tonic-gate * When distributing Covered Code, include this CDDL HEADER in each 15*7c478bd9Sstevel@tonic-gate * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 16*7c478bd9Sstevel@tonic-gate * If applicable, add the following below this CDDL HEADER, with the 17*7c478bd9Sstevel@tonic-gate * fields enclosed by brackets "[]" replaced with your own identifying 18*7c478bd9Sstevel@tonic-gate * information: Portions Copyright [yyyy] [name of copyright owner] 19*7c478bd9Sstevel@tonic-gate * 20*7c478bd9Sstevel@tonic-gate * CDDL HEADER END 21*7c478bd9Sstevel@tonic-gate */ 22*7c478bd9Sstevel@tonic-gate /* 23*7c478bd9Sstevel@tonic-gate * Copyright 2005 Sun Microsystems, Inc. All rights reserved. 24*7c478bd9Sstevel@tonic-gate * Use is subject to license terms. 25*7c478bd9Sstevel@tonic-gate */ 26*7c478bd9Sstevel@tonic-gate 27*7c478bd9Sstevel@tonic-gate /* Copyright (c) 1983, 1984, 1985, 1986, 1987, 1988, 1989 AT&T */ 28*7c478bd9Sstevel@tonic-gate /* All Rights Reserved */ 29*7c478bd9Sstevel@tonic-gate 30*7c478bd9Sstevel@tonic-gate /* 31*7c478bd9Sstevel@tonic-gate * University Copyright- Copyright (c) 1982, 1986, 1988 32*7c478bd9Sstevel@tonic-gate * The Regents of the University of California 33*7c478bd9Sstevel@tonic-gate * All Rights Reserved 34*7c478bd9Sstevel@tonic-gate * 35*7c478bd9Sstevel@tonic-gate * University Acknowledgment- Portions of this document are derived from 36*7c478bd9Sstevel@tonic-gate * software developed by the University of California, Berkeley, and its 37*7c478bd9Sstevel@tonic-gate * contributors. 38*7c478bd9Sstevel@tonic-gate */ 39*7c478bd9Sstevel@tonic-gate 40*7c478bd9Sstevel@tonic-gate #ifndef _SYS_SOCKIO_H 41*7c478bd9Sstevel@tonic-gate #define _SYS_SOCKIO_H 42*7c478bd9Sstevel@tonic-gate 43*7c478bd9Sstevel@tonic-gate #pragma ident "%Z%%M% %I% %E% SMI" 44*7c478bd9Sstevel@tonic-gate 45*7c478bd9Sstevel@tonic-gate /* 46*7c478bd9Sstevel@tonic-gate * General socket ioctl definitions. 47*7c478bd9Sstevel@tonic-gate */ 48*7c478bd9Sstevel@tonic-gate 49*7c478bd9Sstevel@tonic-gate #include <sys/ioccom.h> 50*7c478bd9Sstevel@tonic-gate 51*7c478bd9Sstevel@tonic-gate #ifdef __cplusplus 52*7c478bd9Sstevel@tonic-gate extern "C" { 53*7c478bd9Sstevel@tonic-gate #endif 54*7c478bd9Sstevel@tonic-gate 55*7c478bd9Sstevel@tonic-gate /* socket i/o controls */ 56*7c478bd9Sstevel@tonic-gate #define SIOCSHIWAT _IOW('s', 0, int) /* set high watermark */ 57*7c478bd9Sstevel@tonic-gate #define SIOCGHIWAT _IOR('s', 1, int) /* get high watermark */ 58*7c478bd9Sstevel@tonic-gate #define SIOCSLOWAT _IOW('s', 2, int) /* set low watermark */ 59*7c478bd9Sstevel@tonic-gate #define SIOCGLOWAT _IOR('s', 3, int) /* get low watermark */ 60*7c478bd9Sstevel@tonic-gate #define SIOCATMARK _IOR('s', 7, int) /* at oob mark? */ 61*7c478bd9Sstevel@tonic-gate #define SIOCSPGRP _IOW('s', 8, int) /* set process group */ 62*7c478bd9Sstevel@tonic-gate #define SIOCGPGRP _IOR('s', 9, int) /* get process group */ 63*7c478bd9Sstevel@tonic-gate 64*7c478bd9Sstevel@tonic-gate /* 65*7c478bd9Sstevel@tonic-gate * SIOCADDRT and SIOCDELRT ioctls need to be defined using _IOWN macro to 66*7c478bd9Sstevel@tonic-gate * make them datamodel independent. 67*7c478bd9Sstevel@tonic-gate */ 68*7c478bd9Sstevel@tonic-gate #define SIOCADDRT _IOWN('r', 10, 48) /* add route */ 69*7c478bd9Sstevel@tonic-gate #define SIOCDELRT _IOWN('r', 11, 48) /* delete route */ 70*7c478bd9Sstevel@tonic-gate 71*7c478bd9Sstevel@tonic-gate /* For multicast routing. These might change in future release */ 72*7c478bd9Sstevel@tonic-gate #define SIOCGETVIFCNT _IOWR('r', 20, struct sioc_vif_req) 73*7c478bd9Sstevel@tonic-gate /* get vif pkt count */ 74*7c478bd9Sstevel@tonic-gate #define SIOCGETSGCNT _IOWR('r', 21, struct sioc_sg_req) 75*7c478bd9Sstevel@tonic-gate /* get s,g pkt count */ 76*7c478bd9Sstevel@tonic-gate #define SIOCGETLSGCNT _IOWR('r', 21, struct sioc_lsg_req) 77*7c478bd9Sstevel@tonic-gate /* get s,g pkt count */ 78*7c478bd9Sstevel@tonic-gate 79*7c478bd9Sstevel@tonic-gate /* 80*7c478bd9Sstevel@tonic-gate * Obsolete interface ioctls using struct ifreq that are supported 81*7c478bd9Sstevel@tonic-gate * for compatibility. New interface ioctls use struct lifreq. 82*7c478bd9Sstevel@tonic-gate */ 83*7c478bd9Sstevel@tonic-gate #define SIOCSIFADDR _IOW('i', 12, struct ifreq) /* set if address */ 84*7c478bd9Sstevel@tonic-gate #define SIOCGIFADDR _IOWR('i', 13, struct ifreq) /* get if address */ 85*7c478bd9Sstevel@tonic-gate #define SIOCSIFDSTADDR _IOW('i', 14, struct ifreq) /* set p-p address */ 86*7c478bd9Sstevel@tonic-gate #define SIOCGIFDSTADDR _IOWR('i', 15, struct ifreq) /* get p-p address */ 87*7c478bd9Sstevel@tonic-gate #define SIOCSIFFLAGS _IOW('i', 16, struct ifreq) /* set if flags */ 88*7c478bd9Sstevel@tonic-gate #define SIOCGIFFLAGS _IOWR('i', 17, struct ifreq) /* get if flags */ 89*7c478bd9Sstevel@tonic-gate #define SIOCSIFMEM _IOW('i', 18, struct ifreq) /* set interface mem */ 90*7c478bd9Sstevel@tonic-gate #define SIOCGIFMEM _IOWR('i', 19, struct ifreq) /* get interface mem */ 91*7c478bd9Sstevel@tonic-gate 92*7c478bd9Sstevel@tonic-gate /* 93*7c478bd9Sstevel@tonic-gate * Needs to be defined using _IOWRN macro to make it datamodel independent. 94*7c478bd9Sstevel@tonic-gate * Argument is a struct ifconf. 95*7c478bd9Sstevel@tonic-gate */ 96*7c478bd9Sstevel@tonic-gate #define O_SIOCGIFCONF _IOWRN('i', 20, 8) /* old get if list */ 97*7c478bd9Sstevel@tonic-gate 98*7c478bd9Sstevel@tonic-gate #define SIOCSIFMTU _IOW('i', 21, struct ifreq) /* set if mtu */ 99*7c478bd9Sstevel@tonic-gate #define SIOCGIFMTU _IOWR('i', 22, struct ifreq) /* get if mtu */ 100*7c478bd9Sstevel@tonic-gate 101*7c478bd9Sstevel@tonic-gate /* from 4.3BSD */ 102*7c478bd9Sstevel@tonic-gate #define SIOCGIFBRDADDR _IOWR('i', 23, struct ifreq) /* get broadcast addr */ 103*7c478bd9Sstevel@tonic-gate #define SIOCSIFBRDADDR _IOW('i', 24, struct ifreq) /* set broadcast addr */ 104*7c478bd9Sstevel@tonic-gate #define SIOCGIFNETMASK _IOWR('i', 25, struct ifreq) /* get subnetmask */ 105*7c478bd9Sstevel@tonic-gate #define SIOCSIFNETMASK _IOW('i', 26, struct ifreq) /* set subnetmask */ 106*7c478bd9Sstevel@tonic-gate #define SIOCGIFMETRIC _IOWR('i', 27, struct ifreq) /* get if metric */ 107*7c478bd9Sstevel@tonic-gate #define SIOCSIFMETRIC _IOW('i', 28, struct ifreq) /* set if metric */ 108*7c478bd9Sstevel@tonic-gate 109*7c478bd9Sstevel@tonic-gate #define SIOCSARP _IOW('i', 30, struct arpreq) /* set arp entry */ 110*7c478bd9Sstevel@tonic-gate #define SIOCGARP _IOWR('i', 31, struct arpreq) /* get arp entry */ 111*7c478bd9Sstevel@tonic-gate #define SIOCDARP _IOW('i', 32, struct arpreq) /* delete arp entry */ 112*7c478bd9Sstevel@tonic-gate #define SIOCUPPER _IOW('i', 40, struct ifreq) /* attach upper layer */ 113*7c478bd9Sstevel@tonic-gate #define SIOCLOWER _IOW('i', 41, struct ifreq) /* attach lower layer */ 114*7c478bd9Sstevel@tonic-gate #define SIOCSETSYNC _IOW('i', 44, struct ifreq) /* set syncmode */ 115*7c478bd9Sstevel@tonic-gate #define SIOCGETSYNC _IOWR('i', 45, struct ifreq) /* get syncmode */ 116*7c478bd9Sstevel@tonic-gate #define SIOCSSDSTATS _IOWR('i', 46, struct ifreq) /* sync data stats */ 117*7c478bd9Sstevel@tonic-gate #define SIOCSSESTATS _IOWR('i', 47, struct ifreq) /* sync error stats */ 118*7c478bd9Sstevel@tonic-gate 119*7c478bd9Sstevel@tonic-gate #define SIOCSPROMISC _IOW('i', 48, int) /* request promisc */ 120*7c478bd9Sstevel@tonic-gate /* mode on/off */ 121*7c478bd9Sstevel@tonic-gate #define SIOCADDMULTI _IOW('i', 49, struct ifreq) /* set m/c address */ 122*7c478bd9Sstevel@tonic-gate #define SIOCDELMULTI _IOW('i', 50, struct ifreq) /* clr m/c address */ 123*7c478bd9Sstevel@tonic-gate 124*7c478bd9Sstevel@tonic-gate /* STREAMS based socket emulation */ 125*7c478bd9Sstevel@tonic-gate 126*7c478bd9Sstevel@tonic-gate #define SIOCGETNAME _IOR('s', 52, struct sockaddr) /* getsockname */ 127*7c478bd9Sstevel@tonic-gate #define SIOCGETPEER _IOR('s', 53, struct sockaddr) /* getpeername */ 128*7c478bd9Sstevel@tonic-gate #define IF_UNITSEL _IOW('s', 54, int) /* set unit number */ 129*7c478bd9Sstevel@tonic-gate #define SIOCXPROTO _IO('s', 55) /* empty proto table */ 130*7c478bd9Sstevel@tonic-gate 131*7c478bd9Sstevel@tonic-gate #define SIOCIFDETACH _IOW('i', 56, struct ifreq) /* detach interface */ 132*7c478bd9Sstevel@tonic-gate #define SIOCGENPSTATS _IOWR('i', 57, struct ifreq) /* get ENP stats */ 133*7c478bd9Sstevel@tonic-gate #define SIOCX25XMT _IOWR('i', 59, struct ifreq) /* start a slp proc */ 134*7c478bd9Sstevel@tonic-gate /* in x25if */ 135*7c478bd9Sstevel@tonic-gate #define SIOCX25RCV _IOWR('i', 60, struct ifreq) /* start a slp proc */ 136*7c478bd9Sstevel@tonic-gate /* in x25if */ 137*7c478bd9Sstevel@tonic-gate #define SIOCX25TBL _IOWR('i', 61, struct ifreq) /* xfer lun table to */ 138*7c478bd9Sstevel@tonic-gate /* kernel */ 139*7c478bd9Sstevel@tonic-gate #define SIOCSLGETREQ _IOWR('i', 71, struct ifreq) /* wait for switched */ 140*7c478bd9Sstevel@tonic-gate /* SLIP request */ 141*7c478bd9Sstevel@tonic-gate #define SIOCSLSTAT _IOW('i', 72, struct ifreq) /* pass SLIP info to */ 142*7c478bd9Sstevel@tonic-gate /* kernel */ 143*7c478bd9Sstevel@tonic-gate #define SIOCSIFNAME _IOW('i', 73, struct ifreq) /* set interface name */ 144*7c478bd9Sstevel@tonic-gate #define SIOCGENADDR _IOWR('i', 85, struct ifreq) /* Get ethernet addr */ 145*7c478bd9Sstevel@tonic-gate #define SIOCGIFNUM _IOR('i', 87, int) /* get number of ifs */ 146*7c478bd9Sstevel@tonic-gate 147*7c478bd9Sstevel@tonic-gate #define SIOCGIFMUXID _IOWR('i', 88, struct ifreq) /* get if muxid */ 148*7c478bd9Sstevel@tonic-gate #define SIOCSIFMUXID _IOW('i', 89, struct ifreq) /* set if muxid */ 149*7c478bd9Sstevel@tonic-gate 150*7c478bd9Sstevel@tonic-gate #define SIOCGIFINDEX _IOWR('i', 90, struct ifreq) /* get if index */ 151*7c478bd9Sstevel@tonic-gate #define SIOCSIFINDEX _IOW('i', 91, struct ifreq) /* set if index */ 152*7c478bd9Sstevel@tonic-gate #define SIOCGIFCONF _IOWRN('i', 92, 8) /* get if list */ 153*7c478bd9Sstevel@tonic-gate 154*7c478bd9Sstevel@tonic-gate /* 155*7c478bd9Sstevel@tonic-gate * New interface ioctls that use the struct lifreq. Can be used for 156*7c478bd9Sstevel@tonic-gate * both IPv4 and IPv6. 157*7c478bd9Sstevel@tonic-gate */ 158*7c478bd9Sstevel@tonic-gate #define SIOCLIFREMOVEIF _IOW('i', 110, struct lifreq) /* delete logical */ 159*7c478bd9Sstevel@tonic-gate #define SIOCLIFADDIF _IOWR('i', 111, struct lifreq) /* create logical */ 160*7c478bd9Sstevel@tonic-gate 161*7c478bd9Sstevel@tonic-gate #define SIOCSLIFADDR _IOW('i', 112, struct lifreq) /* set if address */ 162*7c478bd9Sstevel@tonic-gate #define SIOCGLIFADDR _IOWR('i', 113, struct lifreq) /* get if address */ 163*7c478bd9Sstevel@tonic-gate #define SIOCSLIFDSTADDR _IOW('i', 114, struct lifreq) /* set p-p address */ 164*7c478bd9Sstevel@tonic-gate #define SIOCGLIFDSTADDR _IOWR('i', 115, struct lifreq) /* get p-p address */ 165*7c478bd9Sstevel@tonic-gate #define SIOCSLIFFLAGS _IOW('i', 116, struct lifreq) /* set if flags */ 166*7c478bd9Sstevel@tonic-gate #define SIOCGLIFFLAGS _IOWR('i', 117, struct lifreq) /* get if flags */ 167*7c478bd9Sstevel@tonic-gate 168*7c478bd9Sstevel@tonic-gate /* 169*7c478bd9Sstevel@tonic-gate * Needs to be defined using _IOWRN macro to make it datamodel independent. 170*7c478bd9Sstevel@tonic-gate * Argument is a struct lifconf. 171*7c478bd9Sstevel@tonic-gate */ 172*7c478bd9Sstevel@tonic-gate #define O_SIOCGLIFCONF _IOWRN('i', 120, 16) /* old get if list */ 173*7c478bd9Sstevel@tonic-gate #define SIOCSLIFMTU _IOW('i', 121, struct lifreq) /* set if mtu */ 174*7c478bd9Sstevel@tonic-gate #define SIOCGLIFMTU _IOWR('i', 122, struct lifreq) /* get if mtu */ 175*7c478bd9Sstevel@tonic-gate #define SIOCGLIFBRDADDR _IOWR('i', 123, struct lifreq) /* get broadcast addr */ 176*7c478bd9Sstevel@tonic-gate #define SIOCSLIFBRDADDR _IOW('i', 124, struct lifreq) /* set broadcast addr */ 177*7c478bd9Sstevel@tonic-gate #define SIOCGLIFNETMASK _IOWR('i', 125, struct lifreq) /* get subnetmask */ 178*7c478bd9Sstevel@tonic-gate #define SIOCSLIFNETMASK _IOW('i', 126, struct lifreq) /* set subnetmask */ 179*7c478bd9Sstevel@tonic-gate #define SIOCGLIFMETRIC _IOWR('i', 127, struct lifreq) /* get if metric */ 180*7c478bd9Sstevel@tonic-gate #define SIOCSLIFMETRIC _IOW('i', 128, struct lifreq) /* set if metric */ 181*7c478bd9Sstevel@tonic-gate #define SIOCSLIFNAME _IOWR('i', 129, struct lifreq) /* set interface name */ 182*7c478bd9Sstevel@tonic-gate #define SIOCGLIFNUM _IOWR('i', 130, struct lifnum) /* get number of ifs */ 183*7c478bd9Sstevel@tonic-gate #define SIOCGLIFMUXID _IOWR('i', 131, struct lifreq) /* get if muxid */ 184*7c478bd9Sstevel@tonic-gate #define SIOCSLIFMUXID _IOW('i', 132, struct lifreq) /* set if muxid */ 185*7c478bd9Sstevel@tonic-gate 186*7c478bd9Sstevel@tonic-gate #define SIOCGLIFINDEX _IOWR('i', 133, struct lifreq) /* get if index */ 187*7c478bd9Sstevel@tonic-gate #define SIOCSLIFINDEX _IOW('i', 134, struct lifreq) /* set if index */ 188*7c478bd9Sstevel@tonic-gate 189*7c478bd9Sstevel@tonic-gate #define SIOCSLIFTOKEN _IOW('i', 135, struct lifreq) /* Set token for link */ 190*7c478bd9Sstevel@tonic-gate /* local address and */ 191*7c478bd9Sstevel@tonic-gate /* autoconf */ 192*7c478bd9Sstevel@tonic-gate #define SIOCGLIFTOKEN _IOWR('i', 136, struct lifreq) /* Get token for link */ 193*7c478bd9Sstevel@tonic-gate /* local address and */ 194*7c478bd9Sstevel@tonic-gate /* autoconf */ 195*7c478bd9Sstevel@tonic-gate 196*7c478bd9Sstevel@tonic-gate #define SIOCSLIFSUBNET _IOW('i', 137, struct lifreq) /* set subnet prefix */ 197*7c478bd9Sstevel@tonic-gate #define SIOCGLIFSUBNET _IOWR('i', 138, struct lifreq) /* get subnet prefix */ 198*7c478bd9Sstevel@tonic-gate 199*7c478bd9Sstevel@tonic-gate #define SIOCSLIFLNKINFO _IOW('i', 139, struct lifreq) /* set link info */ 200*7c478bd9Sstevel@tonic-gate #define SIOCGLIFLNKINFO _IOWR('i', 140, struct lifreq) /* get link info */ 201*7c478bd9Sstevel@tonic-gate 202*7c478bd9Sstevel@tonic-gate #define SIOCLIFDELND _IOW('i', 141, struct lifreq) /* Delete ND entry */ 203*7c478bd9Sstevel@tonic-gate #define SIOCLIFGETND _IOWR('i', 142, struct lifreq) /* Get ND entry */ 204*7c478bd9Sstevel@tonic-gate #define SIOCLIFSETND _IOW('i', 143, struct lifreq) /* Set ND entry */ 205*7c478bd9Sstevel@tonic-gate 206*7c478bd9Sstevel@tonic-gate /* 207*7c478bd9Sstevel@tonic-gate * Address querying ioctls. 208*7c478bd9Sstevel@tonic-gate */ 209*7c478bd9Sstevel@tonic-gate #define SIOCTMYADDR _IOWR('i', 144, struct sioc_addrreq) 210*7c478bd9Sstevel@tonic-gate /* My address? */ 211*7c478bd9Sstevel@tonic-gate #define SIOCTONLINK _IOWR('i', 145, struct sioc_addrreq) 212*7c478bd9Sstevel@tonic-gate /* Address on-link? */ 213*7c478bd9Sstevel@tonic-gate #define SIOCTMYSITE _IOWR('i', 146, struct sioc_addrreq) 214*7c478bd9Sstevel@tonic-gate /* In this site? */ 215*7c478bd9Sstevel@tonic-gate 216*7c478bd9Sstevel@tonic-gate #define SIOCGTUNPARAM _IOR('i', 147, struct iftun_req) 217*7c478bd9Sstevel@tonic-gate /* get tunnel */ 218*7c478bd9Sstevel@tonic-gate /* parameters */ 219*7c478bd9Sstevel@tonic-gate #define SIOCSTUNPARAM _IOW('i', 148, struct iftun_req) 220*7c478bd9Sstevel@tonic-gate /* set tunnel */ 221*7c478bd9Sstevel@tonic-gate /* parameters */ 222*7c478bd9Sstevel@tonic-gate 223*7c478bd9Sstevel@tonic-gate #define SIOCFIPSECONFIG _IOW('i', 149, 0) /* Flush Policy */ 224*7c478bd9Sstevel@tonic-gate #define SIOCSIPSECONFIG _IOW('i', 150, 0) /* Set Policy */ 225*7c478bd9Sstevel@tonic-gate #define SIOCDIPSECONFIG _IOW('i', 151, 0) /* Delete Policy */ 226*7c478bd9Sstevel@tonic-gate #define SIOCLIPSECONFIG _IOW('i', 152, 0) /* List Policy */ 227*7c478bd9Sstevel@tonic-gate 228*7c478bd9Sstevel@tonic-gate /* 229*7c478bd9Sstevel@tonic-gate * IOCTLS for implementing load balancing and failover within IP. 230*7c478bd9Sstevel@tonic-gate */ 231*7c478bd9Sstevel@tonic-gate #define SIOCLIFFAILOVER _IOW('i', 153, struct lifreq) /* Failover */ 232*7c478bd9Sstevel@tonic-gate #define SIOCLIFFAILBACK _IOW('i', 154, struct lifreq) /* Failback */ 233*7c478bd9Sstevel@tonic-gate #define SIOCSLIFGROUPNAME _IOW('i', 155, struct lifreq) /* Group interfaces */ 234*7c478bd9Sstevel@tonic-gate #define SIOCGLIFGROUPNAME _IOWR('i', 156, struct lifreq) /* Get group name */ 235*7c478bd9Sstevel@tonic-gate #define SIOCGLIFOINDEX _IOWR('i', 157, struct lifreq) /* get orig if index */ 236*7c478bd9Sstevel@tonic-gate 237*7c478bd9Sstevel@tonic-gate /* 238*7c478bd9Sstevel@tonic-gate * Leave 158 - 160 unused; used to be SIOC*IFARP ioctls. 239*7c478bd9Sstevel@tonic-gate */ 240*7c478bd9Sstevel@tonic-gate 241*7c478bd9Sstevel@tonic-gate /* 242*7c478bd9Sstevel@tonic-gate * IOCTL for implementing load balancing and failover within IP. 243*7c478bd9Sstevel@tonic-gate */ 244*7c478bd9Sstevel@tonic-gate #define SIOCSLIFOINDEX _IOWR('i', 161, struct lifreq) /* set orig if index */ 245*7c478bd9Sstevel@tonic-gate 246*7c478bd9Sstevel@tonic-gate /* 247*7c478bd9Sstevel@tonic-gate * IOCTLS which provide an interface to the IPv6 address selection policy. 248*7c478bd9Sstevel@tonic-gate */ 249*7c478bd9Sstevel@tonic-gate #define SIOCGIP6ADDRPOLICY _IOWRN('i', 162, 0) 250*7c478bd9Sstevel@tonic-gate #define SIOCSIP6ADDRPOLICY _IOWN('i', 163, 0) 251*7c478bd9Sstevel@tonic-gate 252*7c478bd9Sstevel@tonic-gate /* 253*7c478bd9Sstevel@tonic-gate * IOCTL for retrieving sorting info for a list of destination addrs. 254*7c478bd9Sstevel@tonic-gate * Use the _IOWRN macro to make it datamodel independent. Argument 255*7c478bd9Sstevel@tonic-gate * is a struct dstinfo. 256*7c478bd9Sstevel@tonic-gate */ 257*7c478bd9Sstevel@tonic-gate #define SIOCGDSTINFO _IOWRN('i', 164, 0) 258*7c478bd9Sstevel@tonic-gate #define SIOCGLIFCONF _IOWRN('i', 165, 16) /* get if list */ 259*7c478bd9Sstevel@tonic-gate 260*7c478bd9Sstevel@tonic-gate /* 261*7c478bd9Sstevel@tonic-gate * Extended IOCTLS for manipulating ARP cache entries. 262*7c478bd9Sstevel@tonic-gate */ 263*7c478bd9Sstevel@tonic-gate #define SIOCSXARP _IOW('i', 166, struct xarpreq) /* set an ARP entry */ 264*7c478bd9Sstevel@tonic-gate #define SIOCGXARP _IOWR('i', 167, struct xarpreq) /* get an ARP entry */ 265*7c478bd9Sstevel@tonic-gate #define SIOCDXARP _IOW('i', 168, struct xarpreq) /* delete ARP entry */ 266*7c478bd9Sstevel@tonic-gate 267*7c478bd9Sstevel@tonic-gate /* 268*7c478bd9Sstevel@tonic-gate * IOCTL to indicate to the transport that the sockmod is being popped 269*7c478bd9Sstevel@tonic-gate */ 270*7c478bd9Sstevel@tonic-gate #define SIOCPOPSOCKFS _IOW('i', 169, 0) 271*7c478bd9Sstevel@tonic-gate 272*7c478bd9Sstevel@tonic-gate /* 273*7c478bd9Sstevel@tonic-gate * IOCTLs for getting and setting zone associated with an interface, and 274*7c478bd9Sstevel@tonic-gate * unplumbing interfaces associated with a given zone. 275*7c478bd9Sstevel@tonic-gate */ 276*7c478bd9Sstevel@tonic-gate #define SIOCGLIFZONE _IOWR('i', 170, struct lifreq) /* get zone id */ 277*7c478bd9Sstevel@tonic-gate #define SIOCSLIFZONE _IOW('i', 171, struct lifreq) /* set zone id */ 278*7c478bd9Sstevel@tonic-gate 279*7c478bd9Sstevel@tonic-gate /* 280*7c478bd9Sstevel@tonic-gate * IOCTLS for handling SCTP options. 281*7c478bd9Sstevel@tonic-gate */ 282*7c478bd9Sstevel@tonic-gate #define SIOCSCTPSOPT _IOWN('i', 172, 16) /* Set SCTP option */ 283*7c478bd9Sstevel@tonic-gate #define SIOCSCTPGOPT _IOWRN('i', 173, 16) /* Get SCTP option */ 284*7c478bd9Sstevel@tonic-gate #define SIOCSCTPPEELOFF _IOWR('i', 174, int) /* SCTP peeloff */ 285*7c478bd9Sstevel@tonic-gate 286*7c478bd9Sstevel@tonic-gate /* 287*7c478bd9Sstevel@tonic-gate * IOCTLs for getting and setting the source address that is used for packets 288*7c478bd9Sstevel@tonic-gate * going out on the given interface. 289*7c478bd9Sstevel@tonic-gate */ 290*7c478bd9Sstevel@tonic-gate #define SIOCGLIFUSESRC _IOWR('i', 175, struct lifreq) /* get src addr */ 291*7c478bd9Sstevel@tonic-gate #define SIOCSLIFUSESRC _IOW('i', 176, struct lifreq) /* set src addr */ 292*7c478bd9Sstevel@tonic-gate 293*7c478bd9Sstevel@tonic-gate /* 294*7c478bd9Sstevel@tonic-gate * IOCTL used to get all the interfaces that use the the specified interfaces' 295*7c478bd9Sstevel@tonic-gate * source address 296*7c478bd9Sstevel@tonic-gate */ 297*7c478bd9Sstevel@tonic-gate #define SIOCGLIFSRCOF _IOWRN('i', 177, 16) /* source of */ 298*7c478bd9Sstevel@tonic-gate 299*7c478bd9Sstevel@tonic-gate /* 300*7c478bd9Sstevel@tonic-gate * IOCTLs for source specific multicast; get or set a socket's 301*7c478bd9Sstevel@tonic-gate * source filter for a particular multicast group. Argument is 302*7c478bd9Sstevel@tonic-gate * a struct group_filter. Defined in RFC 3678. 303*7c478bd9Sstevel@tonic-gate */ 304*7c478bd9Sstevel@tonic-gate #define SIOCGMSFILTER _IOWR('i', 178, 0) 305*7c478bd9Sstevel@tonic-gate #define SIOCSMSFILTER _IOW('i', 179, 0) 306*7c478bd9Sstevel@tonic-gate /* 307*7c478bd9Sstevel@tonic-gate * IPv4-specific versions of the above; get or set a socket's source 308*7c478bd9Sstevel@tonic-gate * filter for a particular multicast group, for PF_INET sockets only. 309*7c478bd9Sstevel@tonic-gate * Argument is a struct ip_msfilter. 310*7c478bd9Sstevel@tonic-gate */ 311*7c478bd9Sstevel@tonic-gate #define SIOCGIPMSFILTER _IOWR('i', 180, 0) 312*7c478bd9Sstevel@tonic-gate #define SIOCSIPMSFILTER _IOW('i', 181, 0) 313*7c478bd9Sstevel@tonic-gate 314*7c478bd9Sstevel@tonic-gate #ifdef __cplusplus 315*7c478bd9Sstevel@tonic-gate } 316*7c478bd9Sstevel@tonic-gate #endif 317*7c478bd9Sstevel@tonic-gate 318*7c478bd9Sstevel@tonic-gate #endif /* _SYS_SOCKIO_H */ 319