authorgravatar for 94622947+mohanavel15@users.noreply.github.comMohanavel S K <94622947+mohanavel15@users.noreply.github.com> 2024-08-19 22:51:26+05:30
committergravatar for noreply@github.comGitHub <noreply@github.com> 2024-08-19 20:21:26+03:00
log82b676ef798f8d7ae91af2f87dff0ffbfa0b4644
tree086ac02e86e13877a15ef2051a4d202234e2ec0f
parent54e48f7b7dec96c8cdd1a0a0491554b118767817
signaturebadge-check Signed by PGP key B5690EEEBB952194

Added Constants Related To Ioctl (sockios.h)


1 files changed, 251 insertions(+), 0 deletions(-)

lib/std/os/linux.zig+251
...@@ -6784,7 +6784,258 @@ pub const termios2 = if (is_mips) extern struct {...@@ -6784,7 +6784,258 @@ pub const termios2 = if (is_mips) extern struct {
6784 ospeed: speed_t,6784 ospeed: speed_t,
6785};6785};
67866786
6787/// Linux-specific socket ioctls
6788pub const SIOCINQ = T.FIONREAD;
6789
6790/// Linux-specific socket ioctls
6791/// output queue size (not sent + not acked)
6792pub const SIOCOUTQ = T.IOCOUTQ;
6793
6794pub const SOCK_IOC_TYPE = 0x89;
6795
6796pub const SIOCGSTAMP_NEW = IOCTL.IOR(SOCK_IOC_TYPE, 0x06, i64[2]);
6797pub const SIOCGSTAMP_OLD = IOCTL.IOR('s', 100, timeval);
6798
6799/// Get stamp (timeval)
6800pub const SIOCGSTAMP = if (native_arch == .x86_64 or @sizeOf(timeval) == 8) SIOCGSTAMP_OLD else SIOCGSTAMP_NEW;
6801
6802pub const SIOCGSTAMPNS_NEW = IOCTL.IOR(SOCK_IOC_TYPE, 0x07, i64[2]);
6803pub const SIOCGSTAMPNS_OLD = IOCTL.IOR('s', 101, kernel_timespec);
6804
6805/// Get stamp (timespec)
6806pub const SIOCGSTAMPNS = if (native_arch == .x86_64 or @sizeOf(timespec) == 8) SIOCGSTAMPNS_OLD else SIOCGSTAMPNS_NEW;
6807
6808// Routing table calls.
6809/// Add routing table entry
6810pub const SIOCADDRT = 0x890B;
6811
6812/// Delete routing table entry
6813pub const SIOCDELRT = 0x890C;
6814
6815/// Unused
6816pub const SIOCRTMSG = 0x890D;
6817
6818// Socket configuration controls.
6819/// Get iface name
6820pub const SIOCGIFNAME = 0x8910;
6821
6822/// Set iface channel
6823pub const SIOCSIFLINK = 0x8911;
6824
6825/// Get iface list
6826pub const SIOCGIFCONF = 0x8912;
6827
6828/// Get flags
6829pub const SIOCGIFFLAGS = 0x8913;
6830
6831/// Set flags
6832pub const SIOCSIFFLAGS = 0x8914;
6833
6834/// Get PA address
6835pub const SIOCGIFADDR = 0x8915;
6836
6837/// Set PA address
6838pub const SIOCSIFADDR = 0x8916;
6839
6840/// Get remote PA address
6841pub const SIOCGIFDSTADDR = 0x8917;
6842
6843/// Set remote PA address
6844pub const SIOCSIFDSTADDR = 0x8918;
6845
6846/// Get broadcast PA address
6847pub const SIOCGIFBRDADDR = 0x8919;
6848
6849/// Set broadcast PA address
6850pub const SIOCSIFBRDADDR = 0x891a;
6851
6852/// Get network PA mask
6853pub const SIOCGIFNETMASK = 0x891b;
6854
6855/// Set network PA mask
6856pub const SIOCSIFNETMASK = 0x891c;
6857
6858/// Get metric
6859pub const SIOCGIFMETRIC = 0x891d;
6860
6861/// Set metric
6862pub const SIOCSIFMETRIC = 0x891e;
6863
6864/// Get memory address (BSD)
6865pub const SIOCGIFMEM = 0x891f;
6866
6867/// Set memory address (BSD)
6868pub const SIOCSIFMEM = 0x8920;
6869
6870/// Get MTU size
6871pub const SIOCGIFMTU = 0x8921;
6872
6873/// Set MTU size
6874pub const SIOCSIFMTU = 0x8922;
6875
6876/// Set interface name
6877pub const SIOCSIFNAME = 0x8923;
6878
6879/// Set hardware address
6880pub const SIOCSIFHWADDR = 0x8924;
6881
6882/// Get encapsulations
6883pub const SIOCGIFENCAP = 0x8925;
6884
6885/// Set encapsulations
6886pub const SIOCSIFENCAP = 0x8926;
6887
6888/// Get hardware address
6889pub const SIOCGIFHWADDR = 0x8927;
6890
6891/// Driver slaving support
6892pub const SIOCGIFSLAVE = 0x8929;
6893
6894/// Driver slaving support
6895pub const SIOCSIFSLAVE = 0x8930;
6896
6897/// Add to Multicast address lists
6898pub const SIOCADDMULTI = 0x8931;
6899
6900/// Delete from Multicast address lists
6901pub const SIOCDELMULTI = 0x8932;
6902
6903/// name -> if_index mapping
6787pub const SIOCGIFINDEX = 0x8933;6904pub const SIOCGIFINDEX = 0x8933;
6905
6906/// Set extended flags set
6907pub const SIOCSIFPFLAGS = 0x8934;
6908
6909/// Get extended flags set
6910pub const SIOCGIFPFLAGS = 0x8935;
6911
6912/// Delete PA address
6913pub const SIOCDIFADDR = 0x8936;
6914
6915/// Set hardware broadcast addr
6916pub const SIOCSIFHWBROADCAST = 0x8937;
6917
6918/// Get number of devices
6919pub const SIOCGIFCOUNT = 0x8938;
6920
6921/// Bridging support
6922pub const SIOCGIFBR = 0x8940;
6923
6924/// Set bridging options
6925pub const SIOCSIFBR = 0x8941;
6926
6927/// Get the tx queue length
6928pub const SIOCGIFTXQLEN = 0x8942;
6929
6930/// Set the tx queue length
6931pub const SIOCSIFTXQLEN = 0x8943;
6932
6933/// Ethtool interface
6934pub const SIOCETHTOOL = 0x8946;
6935
6936/// Get address of MII PHY in use.
6937pub const SIOCGMIIPHY = 0x8947;
6938
6939/// Read MII PHY register.
6940pub const SIOCGMIIREG = 0x8948;
6941
6942/// Write MII PHY register.
6943pub const SIOCSMIIREG = 0x8949;
6944
6945/// Get / Set netdev parameters
6946pub const SIOCWANDEV = 0x894A;
6947
6948/// Output queue size (not sent only)
6949pub const SIOCOUTQNSD = 0x894B;
6950
6951/// Get socket network namespace
6952pub const SIOCGSKNS = 0x894C;
6953
6954// ARP cache control calls.
6955// 0x8950 - 0x8952 obsolete calls.
6956/// Delete ARP table entry
6957pub const SIOCDARP = 0x8953;
6958
6959/// Get ARP table entry
6960pub const SIOCGARP = 0x8954;
6961
6962/// Set ARP table entry
6963pub const SIOCSARP = 0x8955;
6964
6965// RARP cache control calls.
6966/// Delete RARP table entry
6967pub const SIOCDRARP = 0x8960;
6968
6969/// Get RARP table entry
6970pub const SIOCGRARP = 0x8961;
6971
6972/// Set RARP table entry
6973pub const SIOCSRARP = 0x8962;
6974
6975// Driver configuration calls
6976/// Get device parameters
6977pub const SIOCGIFMAP = 0x8970;
6978
6979/// Set device parameters
6980pub const SIOCSIFMAP = 0x8971;
6981
6982// DLCI configuration calls
6983/// Create new DLCI device
6984pub const SIOCADDDLCI = 0x8980;
6985
6986/// Delete DLCI device
6987pub const SIOCDELDLCI = 0x8981;
6988
6989/// 802.1Q VLAN support
6990pub const SIOCGIFVLAN = 0x8982;
6991
6992/// Set 802.1Q VLAN options
6993pub const SIOCSIFVLAN = 0x8983;
6994
6995// bonding calls
6996/// Enslave a device to the bond
6997pub const SIOCBONDENSLAVE = 0x8990;
6998
6999/// Release a slave from the bond
7000pub const SIOCBONDRELEASE = 0x8991;
7001
7002/// Set the hw addr of the bond
7003pub const SIOCBONDSETHWADDR = 0x8992;
7004
7005/// rtn info about slave state
7006pub const SIOCBONDSLAVEINFOQUERY = 0x8993;
7007
7008/// rtn info about bond state
7009pub const SIOCBONDINFOQUERY = 0x8994;
7010
7011/// Update to a new active slave
7012pub const SIOCBONDCHANGEACTIVE = 0x8995;
7013
7014// Bridge calls
7015/// Create new bridge device
7016pub const SIOCBRADDBR = 0x89a0;
7017
7018/// Remove bridge device
7019pub const SIOCBRDELBR = 0x89a1;
7020
7021/// Add interface to bridge
7022pub const SIOCBRADDIF = 0x89a2;
7023
7024/// Remove interface from bridge
7025pub const SIOCBRDELIF = 0x89a3;
7026
7027/// Get hardware time stamp config
7028pub const SIOCSHWTSTAMP = 0x89b0;
7029
7030/// Set hardware time stamp config
7031pub const SIOCGHWTSTAMP = 0x89b1;
7032
7033/// Device private ioctl calls
7034pub const SIOCDEVPRIVATE = 0x89F0;
7035
7036/// These 16 ioctl calls are protocol private
7037pub const SIOCPROTOPRIVATE = 0x89E0;
7038
6788pub const IFNAMESIZE = 16;7039pub const IFNAMESIZE = 16;
67897040
6790pub const ifmap = extern struct {7041pub const ifmap = extern struct {