linux/include/uapi/linux/sockios.h

/* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */
/*
 * INET		An implementation of the TCP/IP protocol suite for the LINUX
 *		operating system.  INET is implemented using the  BSD Socket
 *		interface as the means of communication with the user level.
 *
 *		Definitions of the socket-level I/O control calls.
 *
 * Version:	@(#)sockios.h	1.0.2	03/09/93
 *
 * Authors:	Ross Biro
 *		Fred N. van Kempen, <[email protected]>
 *
 *		This program is free software; you can redistribute it and/or
 *		modify it under the terms of the GNU General Public License
 *		as published by the Free Software Foundation; either version
 *		2 of the License, or (at your option) any later version.
 */
#ifndef _LINUX_SOCKIOS_H
#define _LINUX_SOCKIOS_H

#include <asm/bitsperlong.h>
#include <asm/sockios.h>

/* Linux-specific socket ioctls */
#define SIOCINQ
#define SIOCOUTQ

#define SOCK_IOC_TYPE

/*
 * the timeval/timespec data structure layout is defined by libc,
 * so we need to cover both possible versions on 32-bit.
 */
/* Get stamp (timeval) */
#define SIOCGSTAMP_NEW
/* Get stamp (timespec) */
#define SIOCGSTAMPNS_NEW

#if __BITS_PER_LONG == 64 || (defined(__x86_64__) && defined(__ILP32__))
/* on 64-bit and x32, avoid the ?: operator */
#define SIOCGSTAMP
#define SIOCGSTAMPNS
#else
#define SIOCGSTAMP
#define SIOCGSTAMPNS
#endif

/* Routing table calls. */
#define SIOCADDRT
#define SIOCDELRT
#define SIOCRTMSG

/* Socket configuration controls. */
#define SIOCGIFNAME
#define SIOCSIFLINK
#define SIOCGIFCONF
#define SIOCGIFFLAGS
#define SIOCSIFFLAGS
#define SIOCGIFADDR
#define SIOCSIFADDR
#define SIOCGIFDSTADDR
#define SIOCSIFDSTADDR
#define SIOCGIFBRDADDR
#define SIOCSIFBRDADDR
#define SIOCGIFNETMASK
#define SIOCSIFNETMASK
#define SIOCGIFMETRIC
#define SIOCSIFMETRIC
#define SIOCGIFMEM
#define SIOCSIFMEM
#define SIOCGIFMTU
#define SIOCSIFMTU
#define SIOCSIFNAME
#define SIOCSIFHWADDR
#define SIOCGIFENCAP
#define SIOCSIFENCAP		
#define SIOCGIFHWADDR
#define SIOCGIFSLAVE
#define SIOCSIFSLAVE
#define SIOCADDMULTI
#define SIOCDELMULTI
#define SIOCGIFINDEX
#define SIOGIFINDEX
#define SIOCSIFPFLAGS
#define SIOCGIFPFLAGS
#define SIOCDIFADDR
#define SIOCSIFHWBROADCAST
#define SIOCGIFCOUNT

#define SIOCGIFBR
#define SIOCSIFBR

#define SIOCGIFTXQLEN
#define SIOCSIFTXQLEN

/* SIOCGIFDIVERT was:	0x8944		Frame diversion support */
/* SIOCSIFDIVERT was:	0x8945		Set frame diversion options */

#define SIOCETHTOOL

#define SIOCGMIIPHY
#define SIOCGMIIREG
#define SIOCSMIIREG

#define SIOCWANDEV

#define SIOCOUTQNSD
#define SIOCGSKNS

/* ARP cache control calls. */
		    /*  0x8950 - 0x8952  * obsolete calls, don't re-use */
#define SIOCDARP
#define SIOCGARP
#define SIOCSARP

/* RARP cache control calls. */
#define SIOCDRARP
#define SIOCGRARP
#define SIOCSRARP

/* Driver configuration calls */

#define SIOCGIFMAP
#define SIOCSIFMAP

/* DLCI configuration calls */

#define SIOCADDDLCI
#define SIOCDELDLCI

#define SIOCGIFVLAN
#define SIOCSIFVLAN

/* bonding calls */

#define SIOCBONDENSLAVE
#define SIOCBONDRELEASE
#define SIOCBONDSETHWADDR
#define SIOCBONDSLAVEINFOQUERY
#define SIOCBONDINFOQUERY
#define SIOCBONDCHANGEACTIVE
			
/* bridge calls */
#define SIOCBRADDBR
#define SIOCBRDELBR
#define SIOCBRADDIF
#define SIOCBRDELIF

/* hardware time stamping: parameters in linux/net_tstamp.h */
#define SIOCSHWTSTAMP
#define SIOCGHWTSTAMP

/* Device private ioctl calls */

/*
 *	These 16 ioctls are available to devices via the do_ioctl() device
 *	vector. Each device should include this file and redefine these names
 *	as their own. Because these are device dependent it is a good idea
 *	_NOT_ to issue them to random objects and hope.
 *
 *	THESE IOCTLS ARE _DEPRECATED_ AND WILL DISAPPEAR IN 2.5.X -DaveM
 */
 
#define SIOCDEVPRIVATE

/*
 *	These 16 ioctl calls are protocol private
 */
 
#define SIOCPROTOPRIVATE
#endif	/* _LINUX_SOCKIOS_H */