![]() |
|
|||
0001 /* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */ 0002 /* 0003 * INET An implementation of the TCP/IP protocol suite for the LINUX 0004 * operating system. INET is implemented using the BSD Socket 0005 * interface as the means of communication with the user level. 0006 * 0007 * Definitions of the socket-level I/O control calls. 0008 * 0009 * Version: @(#)sockios.h 1.0.2 03/09/93 0010 * 0011 * Authors: Ross Biro 0012 * Fred N. van Kempen, <waltje@uWalt.NL.Mugnet.ORG> 0013 * 0014 * This program is free software; you can redistribute it and/or 0015 * modify it under the terms of the GNU General Public License 0016 * as published by the Free Software Foundation; either version 0017 * 2 of the License, or (at your option) any later version. 0018 */ 0019 #ifndef _LINUX_SOCKIOS_H 0020 #define _LINUX_SOCKIOS_H 0021 0022 #include <asm/bitsperlong.h> 0023 #include <asm/sockios.h> 0024 0025 /* Linux-specific socket ioctls */ 0026 #define SIOCINQ FIONREAD 0027 #define SIOCOUTQ TIOCOUTQ /* output queue size (not sent + not acked) */ 0028 0029 #define SOCK_IOC_TYPE 0x89 0030 0031 /* 0032 * the timeval/timespec data structure layout is defined by libc, 0033 * so we need to cover both possible versions on 32-bit. 0034 */ 0035 /* Get stamp (timeval) */ 0036 #define SIOCGSTAMP_NEW _IOR(SOCK_IOC_TYPE, 0x06, long long[2]) 0037 /* Get stamp (timespec) */ 0038 #define SIOCGSTAMPNS_NEW _IOR(SOCK_IOC_TYPE, 0x07, long long[2]) 0039 0040 #if __BITS_PER_LONG == 64 || (defined(__x86_64__) && defined(__ILP32__)) 0041 /* on 64-bit and x32, avoid the ?: operator */ 0042 #define SIOCGSTAMP SIOCGSTAMP_OLD 0043 #define SIOCGSTAMPNS SIOCGSTAMPNS_OLD 0044 #else 0045 #define SIOCGSTAMP ((sizeof(struct timeval)) == 8 ? \ 0046 SIOCGSTAMP_OLD : SIOCGSTAMP_NEW) 0047 #define SIOCGSTAMPNS ((sizeof(struct timespec)) == 8 ? \ 0048 SIOCGSTAMPNS_OLD : SIOCGSTAMPNS_NEW) 0049 #endif 0050 0051 /* Routing table calls. */ 0052 #define SIOCADDRT 0x890B /* add routing table entry */ 0053 #define SIOCDELRT 0x890C /* delete routing table entry */ 0054 #define SIOCRTMSG 0x890D /* unused */ 0055 0056 /* Socket configuration controls. */ 0057 #define SIOCGIFNAME 0x8910 /* get iface name */ 0058 #define SIOCSIFLINK 0x8911 /* set iface channel */ 0059 #define SIOCGIFCONF 0x8912 /* get iface list */ 0060 #define SIOCGIFFLAGS 0x8913 /* get flags */ 0061 #define SIOCSIFFLAGS 0x8914 /* set flags */ 0062 #define SIOCGIFADDR 0x8915 /* get PA address */ 0063 #define SIOCSIFADDR 0x8916 /* set PA address */ 0064 #define SIOCGIFDSTADDR 0x8917 /* get remote PA address */ 0065 #define SIOCSIFDSTADDR 0x8918 /* set remote PA address */ 0066 #define SIOCGIFBRDADDR 0x8919 /* get broadcast PA address */ 0067 #define SIOCSIFBRDADDR 0x891a /* set broadcast PA address */ 0068 #define SIOCGIFNETMASK 0x891b /* get network PA mask */ 0069 #define SIOCSIFNETMASK 0x891c /* set network PA mask */ 0070 #define SIOCGIFMETRIC 0x891d /* get metric */ 0071 #define SIOCSIFMETRIC 0x891e /* set metric */ 0072 #define SIOCGIFMEM 0x891f /* get memory address (BSD) */ 0073 #define SIOCSIFMEM 0x8920 /* set memory address (BSD) */ 0074 #define SIOCGIFMTU 0x8921 /* get MTU size */ 0075 #define SIOCSIFMTU 0x8922 /* set MTU size */ 0076 #define SIOCSIFNAME 0x8923 /* set interface name */ 0077 #define SIOCSIFHWADDR 0x8924 /* set hardware address */ 0078 #define SIOCGIFENCAP 0x8925 /* get/set encapsulations */ 0079 #define SIOCSIFENCAP 0x8926 0080 #define SIOCGIFHWADDR 0x8927 /* Get hardware address */ 0081 #define SIOCGIFSLAVE 0x8929 /* Driver slaving support */ 0082 #define SIOCSIFSLAVE 0x8930 0083 #define SIOCADDMULTI 0x8931 /* Multicast address lists */ 0084 #define SIOCDELMULTI 0x8932 0085 #define SIOCGIFINDEX 0x8933 /* name -> if_index mapping */ 0086 #define SIOGIFINDEX SIOCGIFINDEX /* misprint compatibility :-) */ 0087 #define SIOCSIFPFLAGS 0x8934 /* set/get extended flags set */ 0088 #define SIOCGIFPFLAGS 0x8935 0089 #define SIOCDIFADDR 0x8936 /* delete PA address */ 0090 #define SIOCSIFHWBROADCAST 0x8937 /* set hardware broadcast addr */ 0091 #define SIOCGIFCOUNT 0x8938 /* get number of devices */ 0092 0093 #define SIOCGIFBR 0x8940 /* Bridging support */ 0094 #define SIOCSIFBR 0x8941 /* Set bridging options */ 0095 0096 #define SIOCGIFTXQLEN 0x8942 /* Get the tx queue length */ 0097 #define SIOCSIFTXQLEN 0x8943 /* Set the tx queue length */ 0098 0099 /* SIOCGIFDIVERT was: 0x8944 Frame diversion support */ 0100 /* SIOCSIFDIVERT was: 0x8945 Set frame diversion options */ 0101 0102 #define SIOCETHTOOL 0x8946 /* Ethtool interface */ 0103 0104 #define SIOCGMIIPHY 0x8947 /* Get address of MII PHY in use. */ 0105 #define SIOCGMIIREG 0x8948 /* Read MII PHY register. */ 0106 #define SIOCSMIIREG 0x8949 /* Write MII PHY register. */ 0107 0108 #define SIOCWANDEV 0x894A /* get/set netdev parameters */ 0109 0110 #define SIOCOUTQNSD 0x894B /* output queue size (not sent only) */ 0111 #define SIOCGSKNS 0x894C /* get socket network namespace */ 0112 0113 /* ARP cache control calls. */ 0114 /* 0x8950 - 0x8952 * obsolete calls, don't re-use */ 0115 #define SIOCDARP 0x8953 /* delete ARP table entry */ 0116 #define SIOCGARP 0x8954 /* get ARP table entry */ 0117 #define SIOCSARP 0x8955 /* set ARP table entry */ 0118 0119 /* RARP cache control calls. */ 0120 #define SIOCDRARP 0x8960 /* delete RARP table entry */ 0121 #define SIOCGRARP 0x8961 /* get RARP table entry */ 0122 #define SIOCSRARP 0x8962 /* set RARP table entry */ 0123 0124 /* Driver configuration calls */ 0125 0126 #define SIOCGIFMAP 0x8970 /* Get device parameters */ 0127 #define SIOCSIFMAP 0x8971 /* Set device parameters */ 0128 0129 /* DLCI configuration calls */ 0130 0131 #define SIOCADDDLCI 0x8980 /* Create new DLCI device */ 0132 #define SIOCDELDLCI 0x8981 /* Delete DLCI device */ 0133 0134 #define SIOCGIFVLAN 0x8982 /* 802.1Q VLAN support */ 0135 #define SIOCSIFVLAN 0x8983 /* Set 802.1Q VLAN options */ 0136 0137 /* bonding calls */ 0138 0139 #define SIOCBONDENSLAVE 0x8990 /* enslave a device to the bond */ 0140 #define SIOCBONDRELEASE 0x8991 /* release a slave from the bond*/ 0141 #define SIOCBONDSETHWADDR 0x8992 /* set the hw addr of the bond */ 0142 #define SIOCBONDSLAVEINFOQUERY 0x8993 /* rtn info about slave state */ 0143 #define SIOCBONDINFOQUERY 0x8994 /* rtn info about bond state */ 0144 #define SIOCBONDCHANGEACTIVE 0x8995 /* update to a new active slave */ 0145 0146 /* bridge calls */ 0147 #define SIOCBRADDBR 0x89a0 /* create new bridge device */ 0148 #define SIOCBRDELBR 0x89a1 /* remove bridge device */ 0149 #define SIOCBRADDIF 0x89a2 /* add interface to bridge */ 0150 #define SIOCBRDELIF 0x89a3 /* remove interface from bridge */ 0151 0152 /* hardware time stamping: parameters in linux/net_tstamp.h */ 0153 #define SIOCSHWTSTAMP 0x89b0 /* set and get config */ 0154 #define SIOCGHWTSTAMP 0x89b1 /* get config */ 0155 0156 /* Device private ioctl calls */ 0157 0158 /* 0159 * These 16 ioctls are available to devices via the do_ioctl() device 0160 * vector. Each device should include this file and redefine these names 0161 * as their own. Because these are device dependent it is a good idea 0162 * _NOT_ to issue them to random objects and hope. 0163 * 0164 * THESE IOCTLS ARE _DEPRECATED_ AND WILL DISAPPEAR IN 2.5.X -DaveM 0165 */ 0166 0167 #define SIOCDEVPRIVATE 0x89F0 /* to 89FF */ 0168 0169 /* 0170 * These 16 ioctl calls are protocol private 0171 */ 0172 0173 #define SIOCPROTOPRIVATE 0x89E0 /* to 89EF */ 0174 #endif /* _LINUX_SOCKIOS_H */
[ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
This page was automatically generated by the 2.1.0 LXR engine. The LXR team |
![]() ![]() |