sockio.h revision 83625
11541Srgrimes/*-
21541Srgrimes * Copyright (c) 1982, 1986, 1990, 1993, 1994
31541Srgrimes *	The Regents of the University of California.  All rights reserved.
41541Srgrimes *
51541Srgrimes * Redistribution and use in source and binary forms, with or without
61541Srgrimes * modification, are permitted provided that the following conditions
71541Srgrimes * are met:
81541Srgrimes * 1. Redistributions of source code must retain the above copyright
91541Srgrimes *    notice, this list of conditions and the following disclaimer.
101541Srgrimes * 2. Redistributions in binary form must reproduce the above copyright
111541Srgrimes *    notice, this list of conditions and the following disclaimer in the
121541Srgrimes *    documentation and/or other materials provided with the distribution.
131541Srgrimes * 3. All advertising materials mentioning features or use of this software
141541Srgrimes *    must display the following acknowledgement:
151541Srgrimes *	This product includes software developed by the University of
161541Srgrimes *	California, Berkeley and its contributors.
171541Srgrimes * 4. Neither the name of the University nor the names of its contributors
181541Srgrimes *    may be used to endorse or promote products derived from this software
191541Srgrimes *    without specific prior written permission.
201541Srgrimes *
211541Srgrimes * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
221541Srgrimes * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
231541Srgrimes * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
241541Srgrimes * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
251541Srgrimes * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
261541Srgrimes * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
271541Srgrimes * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
281541Srgrimes * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
291541Srgrimes * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
301541Srgrimes * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
311541Srgrimes * SUCH DAMAGE.
321541Srgrimes *
331541Srgrimes *	@(#)sockio.h	8.1 (Berkeley) 3/28/94
3450477Speter * $FreeBSD: head/sys/sys/sockio.h 83625 2001-09-18 17:42:25Z jlemon $
351541Srgrimes */
361541Srgrimes
371541Srgrimes#ifndef	_SYS_SOCKIO_H_
381541Srgrimes#define	_SYS_SOCKIO_H_
391541Srgrimes
401541Srgrimes#include <sys/ioccom.h>
411541Srgrimes
421541Srgrimes/* Socket ioctl's. */
431541Srgrimes#define	SIOCSHIWAT	 _IOW('s',  0, int)		/* set high watermark */
441541Srgrimes#define	SIOCGHIWAT	 _IOR('s',  1, int)		/* get high watermark */
451541Srgrimes#define	SIOCSLOWAT	 _IOW('s',  2, int)		/* set low watermark */
461541Srgrimes#define	SIOCGLOWAT	 _IOR('s',  3, int)		/* get low watermark */
471541Srgrimes#define	SIOCATMARK	 _IOR('s',  7, int)		/* at oob mark? */
481541Srgrimes#define	SIOCSPGRP	 _IOW('s',  8, int)		/* set process group */
491541Srgrimes#define	SIOCGPGRP	 _IOR('s',  9, int)		/* get process group */
501541Srgrimes
511541Srgrimes#define	SIOCADDRT	 _IOW('r', 10, struct ortentry)	/* add route */
521541Srgrimes#define	SIOCDELRT	 _IOW('r', 11, struct ortentry)	/* delete route */
5318466Sbde#define	SIOCGETVIFCNT	_IOWR('r', 15, struct sioc_vif_req)/* get vif pkt cnt */
5418466Sbde#define	SIOCGETSGCNT	_IOWR('r', 16, struct sioc_sg_req) /* get s,g pkt cnt */
551541Srgrimes
561541Srgrimes#define	SIOCSIFADDR	 _IOW('i', 12, struct ifreq)	/* set ifnet address */
571541Srgrimes#define	OSIOCGIFADDR	_IOWR('i', 13, struct ifreq)	/* get ifnet address */
581541Srgrimes#define	SIOCGIFADDR	_IOWR('i', 33, struct ifreq)	/* get ifnet address */
591541Srgrimes#define	SIOCSIFDSTADDR	 _IOW('i', 14, struct ifreq)	/* set p-p address */
601541Srgrimes#define	OSIOCGIFDSTADDR	_IOWR('i', 15, struct ifreq)	/* get p-p address */
611541Srgrimes#define	SIOCGIFDSTADDR	_IOWR('i', 34, struct ifreq)	/* get p-p address */
621541Srgrimes#define	SIOCSIFFLAGS	 _IOW('i', 16, struct ifreq)	/* set ifnet flags */
631541Srgrimes#define	SIOCGIFFLAGS	_IOWR('i', 17, struct ifreq)	/* get ifnet flags */
641541Srgrimes#define	OSIOCGIFBRDADDR	_IOWR('i', 18, struct ifreq)	/* get broadcast addr */
651541Srgrimes#define	SIOCGIFBRDADDR	_IOWR('i', 35, struct ifreq)	/* get broadcast addr */
661541Srgrimes#define	SIOCSIFBRDADDR	 _IOW('i', 19, struct ifreq)	/* set broadcast addr */
671541Srgrimes#define	OSIOCGIFCONF	_IOWR('i', 20, struct ifconf)	/* get ifnet list */
681541Srgrimes#define	SIOCGIFCONF	_IOWR('i', 36, struct ifconf)	/* get ifnet list */
691541Srgrimes#define	OSIOCGIFNETMASK	_IOWR('i', 21, struct ifreq)	/* get net addr mask */
701541Srgrimes#define	SIOCGIFNETMASK	_IOWR('i', 37, struct ifreq)	/* get net addr mask */
711541Srgrimes#define	SIOCSIFNETMASK	 _IOW('i', 22, struct ifreq)	/* set net addr mask */
721541Srgrimes#define	SIOCGIFMETRIC	_IOWR('i', 23, struct ifreq)	/* get IF metric */
731541Srgrimes#define	SIOCSIFMETRIC	 _IOW('i', 24, struct ifreq)	/* set IF metric */
741541Srgrimes#define	SIOCDIFADDR	 _IOW('i', 25, struct ifreq)	/* delete IF addr */
751541Srgrimes#define	SIOCAIFADDR	 _IOW('i', 26, struct ifaliasreq)/* add/chg IF alias */
761541Srgrimes
7783625Sjlemon#define	SIOCALIFADDR	 _IOW('i', 27, struct if_laddrreq) /* add IF addr */
7852904Sshin#define	SIOCGLIFADDR	_IOWR('i', 28, struct if_laddrreq) /* get IF addr */
7983625Sjlemon#define	SIOCDLIFADDR	 _IOW('i', 29, struct if_laddrreq) /* delete IF addr */
8083625Sjlemon#define	SIOCSIFCAP	 _IOW('i', 30, struct ifreq)	/* set IF features */
8183625Sjlemon#define	SIOCGIFCAP	_IOWR('i', 31, struct ifreq)	/* get IF features */
8252904Sshin
831541Srgrimes#define	SIOCADDMULTI	 _IOW('i', 49, struct ifreq)	/* add m'cast addr */
841541Srgrimes#define	SIOCDELMULTI	 _IOW('i', 50, struct ifreq)	/* del m'cast addr */
8518466Sbde#define	SIOCGIFMTU	_IOWR('i', 51, struct ifreq)	/* get IF mtu */
8618466Sbde#define	SIOCSIFMTU	 _IOW('i', 52, struct ifreq)	/* set IF mtu */
8718466Sbde#define	SIOCGIFPHYS	_IOWR('i', 53, struct ifreq)	/* get IF wire */
8818466Sbde#define	SIOCSIFPHYS	 _IOW('i', 54, struct ifreq)	/* set IF wire */
8925432Speter#define	SIOCSIFMEDIA	_IOWR('i', 55, struct ifreq)	/* set net media */
9025432Speter#define	SIOCGIFMEDIA	_IOWR('i', 56, struct ifmediareq) /* get net media */
9152904Sshin
9252904Sshin#define	SIOCSIFPHYADDR   _IOW('i', 70, struct ifaliasreq) /* set gif addres */
9352904Sshin#define	SIOCGIFPSRCADDR	_IOWR('i', 71, struct ifreq)	/* get gif psrc addr */
9452904Sshin#define	SIOCGIFPDSTADDR	_IOWR('i', 72, struct ifreq)	/* get gif pdst addr */
9562587Sitojun#define	SIOCDIFPHYADDR	 _IOW('i', 73, struct ifreq)	/* delete gif addrs */
9678064Sume#define	SIOCSLIFPHYADDR	 _IOW('i', 74, struct if_laddrreq) /* set gif addrs */
9778064Sume#define	SIOCGLIFPHYADDR	_IOWR('i', 75, struct if_laddrreq) /* get gif addrs */
9862587Sitojun
9930198Sjoerg#define	SIOCSIFGENERIC	 _IOW('i', 57, struct ifreq)	/* generic IF set op */
10030198Sjoerg#define	SIOCGIFGENERIC	_IOWR('i', 58, struct ifreq)	/* generic IF get op */
1011541Srgrimes
10248021Sphk#define	SIOCGIFSTATUS	_IOWR('i', 59, struct ifstat)	/* get IF status */
10383625Sjlemon#define	SIOCSIFLLADDR	 _IOW('i', 60, struct ifreq)	/* set linklevel addr */
10448021Sphk
10579103Sbrooks#define SIOCIFCREATE	_IOWR('i', 122, struct ifreq)	/* create clone if */
10679103Sbrooks#define SIOCIFDESTROY	 _IOW('i', 121, struct ifreq)	/* destroy clone if */
10779103Sbrooks#define SIOCIFGCLONERS	_IOWR('i', 120, struct if_clonereq) /* get cloners */
10879103Sbrooks
1091541Srgrimes#endif /* !_SYS_SOCKIO_H_ */
110