sockio.h revision 223735
154803Srwatson/*- 2160146Srwatson * Copyright (c) 1982, 1986, 1990, 1993, 1994 354803Srwatson * The Regents of the University of California. All rights reserved. 454803Srwatson * 585845Srwatson * Redistribution and use in source and binary forms, with or without 685845Srwatson * modification, are permitted provided that the following conditions 754803Srwatson * are met: 854803Srwatson * 1. Redistributions of source code must retain the above copyright 954803Srwatson * notice, this list of conditions and the following disclaimer. 1054803Srwatson * 2. Redistributions in binary form must reproduce the above copyright 1154803Srwatson * notice, this list of conditions and the following disclaimer in the 1254803Srwatson * documentation and/or other materials provided with the distribution. 1354803Srwatson * 4. Neither the name of the University nor the names of its contributors 1454803Srwatson * may be used to endorse or promote products derived from this software 1554803Srwatson * without specific prior written permission. 1654803Srwatson * 1754803Srwatson * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 1854803Srwatson * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 1954803Srwatson * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 2054803Srwatson * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 2154803Srwatson * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 2254803Srwatson * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 2354803Srwatson * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 2454803Srwatson * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 2554803Srwatson * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 2654803Srwatson * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 2754803Srwatson * SUCH DAMAGE. 2854803Srwatson * 2973890Srwatson * @(#)sockio.h 8.1 (Berkeley) 3/28/94 30160146Srwatson * $FreeBSD: head/sys/sys/sockio.h 223735 2011-07-03 12:22:02Z bz $ 31160146Srwatson */ 32160146Srwatson 3354803Srwatson#ifndef _SYS_SOCKIO_H_ 3454803Srwatson#define _SYS_SOCKIO_H_ 35116182Sobrien 36116182Sobrien#include <sys/ioccom.h> 37116182Sobrien 3854803Srwatson/* Socket ioctl's. */ 3954803Srwatson#define SIOCSHIWAT _IOW('s', 0, int) /* set high watermark */ 4054803Srwatson#define SIOCGHIWAT _IOR('s', 1, int) /* get high watermark */ 41177785Skib#define SIOCSLOWAT _IOW('s', 2, int) /* set low watermark */ 4254803Srwatson#define SIOCGLOWAT _IOR('s', 3, int) /* get low watermark */ 4354803Srwatson#define SIOCATMARK _IOR('s', 7, int) /* at oob mark? */ 44150262Scsjp#define SIOCSPGRP _IOW('s', 8, int) /* set process group */ 4554803Srwatson#define SIOCGPGRP _IOR('s', 9, int) /* get process group */ 4654803Srwatson 4782713Sdillon#define SIOCADDRT _IOW('r', 10, struct ortentry) /* add route */ 4854803Srwatson#define SIOCDELRT _IOW('r', 11, struct ortentry) /* delete route */ 4954803Srwatson#define SIOCGETVIFCNT _IOWR('r', 15, struct sioc_vif_req)/* get vif pkt cnt */ 50108524Salfred#define SIOCGETSGCNT _IOWR('r', 16, struct sioc_sg_req) /* get s,g pkt cnt */ 5154803Srwatson 5254803Srwatson#define SIOCSIFADDR _IOW('i', 12, struct ifreq) /* set ifnet address */ 5354803Srwatson#define OSIOCGIFADDR _IOWR('i', 13, struct ifreq) /* get ifnet address */ 5454803Srwatson#define SIOCGIFADDR _IOWR('i', 33, struct ifreq) /* get ifnet address */ 55163606Srwatson#define SIOCSIFDSTADDR _IOW('i', 14, struct ifreq) /* set p-p address */ 56163606Srwatson#define OSIOCGIFDSTADDR _IOWR('i', 15, struct ifreq) /* get p-p address */ 57192586Strasz#define SIOCGIFDSTADDR _IOWR('i', 34, struct ifreq) /* get p-p address */ 5854803Srwatson#define SIOCSIFFLAGS _IOW('i', 16, struct ifreq) /* set ifnet flags */ 59192586Strasz#define SIOCGIFFLAGS _IOWR('i', 17, struct ifreq) /* get ifnet flags */ 60192586Strasz#define OSIOCGIFBRDADDR _IOWR('i', 18, struct ifreq) /* get broadcast addr */ 6198927Srwatson#define SIOCGIFBRDADDR _IOWR('i', 35, struct ifreq) /* get broadcast addr */ 6298927Srwatson#define SIOCSIFBRDADDR _IOW('i', 19, struct ifreq) /* set broadcast addr */ 6398927Srwatson#define OSIOCGIFCONF _IOWR('i', 20, struct ifconf) /* get ifnet list */ 6498927Srwatson#define SIOCGIFCONF _IOWR('i', 36, struct ifconf) /* get ifnet list */ 6585582Srwatson#define OSIOCGIFNETMASK _IOWR('i', 21, struct ifreq) /* get net addr mask */ 6698927Srwatson#define SIOCGIFNETMASK _IOWR('i', 37, struct ifreq) /* get net addr mask */ 6754803Srwatson#define SIOCSIFNETMASK _IOW('i', 22, struct ifreq) /* set net addr mask */ 68192586Strasz#define SIOCGIFMETRIC _IOWR('i', 23, struct ifreq) /* get IF metric */ 69192586Strasz#define SIOCSIFMETRIC _IOW('i', 24, struct ifreq) /* set IF metric */ 70192586Strasz#define SIOCDIFADDR _IOW('i', 25, struct ifreq) /* delete IF addr */ 71192586Strasz#define SIOCAIFADDR _IOW('i', 26, struct ifaliasreq)/* add/chg IF alias */ 72192586Strasz 73192586Strasz#define SIOCALIFADDR _IOW('i', 27, struct if_laddrreq) /* add IF addr */ 74192586Strasz#define SIOCGLIFADDR _IOWR('i', 28, struct if_laddrreq) /* get IF addr */ 75192586Strasz#define SIOCDLIFADDR _IOW('i', 29, struct if_laddrreq) /* delete IF addr */ 76192586Strasz#define SIOCSIFCAP _IOW('i', 30, struct ifreq) /* set IF features */ 77192586Strasz#define SIOCGIFCAP _IOWR('i', 31, struct ifreq) /* get IF features */ 78192586Strasz#define SIOCGIFINDEX _IOWR('i', 32, struct ifreq) /* get IF index */ 79192586Strasz#define SIOCGIFMAC _IOWR('i', 38, struct ifreq) /* get IF MAC label */ 80192586Strasz#define SIOCSIFMAC _IOW('i', 39, struct ifreq) /* set IF MAC label */ 81192586Strasz#define SIOCSIFNAME _IOW('i', 40, struct ifreq) /* set IF name */ 82192586Strasz#define SIOCSIFDESCR _IOW('i', 41, struct ifreq) /* set ifnet descr */ 83192586Strasz#define SIOCGIFDESCR _IOWR('i', 42, struct ifreq) /* get ifnet descr */ 84192586Strasz 85192586Strasz#define SIOCADDMULTI _IOW('i', 49, struct ifreq) /* add m'cast addr */ 86192586Strasz#define SIOCDELMULTI _IOW('i', 50, struct ifreq) /* del m'cast addr */ 87192586Strasz#define SIOCGIFMTU _IOWR('i', 51, struct ifreq) /* get IF mtu */ 88192586Strasz#define SIOCSIFMTU _IOW('i', 52, struct ifreq) /* set IF mtu */ 89192586Strasz#define SIOCGIFPHYS _IOWR('i', 53, struct ifreq) /* get IF wire */ 90192586Strasz#define SIOCSIFPHYS _IOW('i', 54, struct ifreq) /* set IF wire */ 91192586Strasz#define SIOCSIFMEDIA _IOWR('i', 55, struct ifreq) /* set net media */ 92192586Strasz#define SIOCGIFMEDIA _IOWR('i', 56, struct ifmediareq) /* get net media */ 93192586Strasz 94192586Strasz#define SIOCSIFGENERIC _IOW('i', 57, struct ifreq) /* generic IF set op */ 95192586Strasz#define SIOCGIFGENERIC _IOWR('i', 58, struct ifreq) /* generic IF get op */ 96192586Strasz 97192586Strasz#define SIOCGIFSTATUS _IOWR('i', 59, struct ifstat) /* get IF status */ 98192586Strasz#define SIOCSIFLLADDR _IOW('i', 60, struct ifreq) /* set linklevel addr */ 99192586Strasz 100192586Strasz#define SIOCSIFPHYADDR _IOW('i', 70, struct ifaliasreq) /* set gif addres */ 101192586Strasz#define SIOCGIFPSRCADDR _IOWR('i', 71, struct ifreq) /* get gif psrc addr */ 102192586Strasz#define SIOCGIFPDSTADDR _IOWR('i', 72, struct ifreq) /* get gif pdst addr */ 103192586Strasz#define SIOCDIFPHYADDR _IOW('i', 73, struct ifreq) /* delete gif addrs */ 104192586Strasz#define SIOCSLIFPHYADDR _IOW('i', 74, struct if_laddrreq) /* set gif addrs */ 105192586Strasz#define SIOCGLIFPHYADDR _IOWR('i', 75, struct if_laddrreq) /* get gif addrs */ 106192586Strasz 107192586Strasz#define SIOCGPRIVATE_0 _IOWR('i', 80, struct ifreq) /* device private 0 */ 108192586Strasz#define SIOCGPRIVATE_1 _IOWR('i', 81, struct ifreq) /* device private 1 */ 109192586Strasz 110192586Strasz#define SIOCSIFVNET _IOWR('i', 90, struct ifreq) /* move IF jail/vnet */ 11154803Srwatson#define SIOCSIFRVNET _IOWR('i', 91, struct ifreq) /* reclaim vnet IF */ 112192586Strasz 113192586Strasz#define SIOCGIFFIB _IOWR('i', 92, struct ifreq) /* get IF fib */ 114192586Strasz#define SIOCSIFFIB _IOW('i', 93, struct ifreq) /* set IF fib */ 115192586Strasz 116192586Strasz#define SIOCSDRVSPEC _IOW('i', 123, struct ifdrv) /* set driver-specific 117192586Strasz parameters */ 118192586Strasz#define SIOCGDRVSPEC _IOWR('i', 123, struct ifdrv) /* get driver-specific 119192586Strasz parameters */ 120192586Strasz 121192586Strasz#define SIOCIFCREATE _IOWR('i', 122, struct ifreq) /* create clone if */ 122192586Strasz#define SIOCIFCREATE2 _IOWR('i', 124, struct ifreq) /* create clone if */ 123192586Strasz#define SIOCIFDESTROY _IOW('i', 121, struct ifreq) /* destroy clone if */ 124192586Strasz#define SIOCIFGCLONERS _IOWR('i', 120, struct if_clonereq) /* get cloners */ 125192586Strasz 126192586Strasz#define SIOCAIFGROUP _IOW('i', 135, struct ifgroupreq) /* add an ifgroup */ 127192586Strasz#define SIOCGIFGROUP _IOWR('i', 136, struct ifgroupreq) /* get ifgroups */ 128192586Strasz#define SIOCDIFGROUP _IOW('i', 137, struct ifgroupreq) /* delete ifgroup */ 129192586Strasz#define SIOCGIFGMEMB _IOWR('i', 138, struct ifgroupreq) /* get members */ 130192586Strasz 131192586Strasz#endif /* !_SYS_SOCKIO_H_ */ 132192586Strasz