diff options
author | Andrew Cann <shum@canndrew.org> | 2018-05-30 17:27:18 +0800 |
---|---|---|
committer | Andrew Cann <shum@canndrew.org> | 2018-05-30 17:27:18 +0800 |
commit | 93f9167bea0216f2726ac57f89a23de96a8413cb (patch) | |
tree | 858c002be03344d42ed153d9cb95e47d2fd6dffc | |
parent | 4083c89d5468a1c34d3d3ad60f667105104615e9 (diff) | |
download | rust-libc-93f9167bea0216f2726ac57f89a23de96a8413cb.tar.gz |
Add linux socket ioctl defs
-rw-r--r-- | libc-test/build.rs | 1 | ||||
-rw-r--r-- | src/unix/notbsd/mod.rs | 38 |
2 files changed, 39 insertions, 0 deletions
diff --git a/libc-test/build.rs b/libc-test/build.rs index 7dd248b8ca..5396cd2530 100644 --- a/libc-test/build.rs +++ b/libc-test/build.rs @@ -241,6 +241,7 @@ fn main() { cfg.header("sys/personality.h"); cfg.header("sys/swap.h"); cfg.header("pty.h"); + cfg.header("linux/sockios.h"); if !uclibc { cfg.header("sys/sysinfo.h"); } diff --git a/src/unix/notbsd/mod.rs b/src/unix/notbsd/mod.rs index f6fa04ab07..4dcbccb9db 100644 --- a/src/unix/notbsd/mod.rs +++ b/src/unix/notbsd/mod.rs @@ -825,6 +825,44 @@ pub const POLLNVAL: ::c_short = 0x20; pub const POLLRDNORM: ::c_short = 0x040; pub const POLLRDBAND: ::c_short = 0x080; +pub const SIOCADDRT: ::c_ulong = 0x0000890B; +pub const SIOCDELRT: ::c_ulong = 0x0000890C; +pub const SIOCGIFNAME: ::c_ulong = 0x00008910; +pub const SIOCSIFLINK: ::c_ulong = 0x00008911; +pub const SIOCGIFCONF: ::c_ulong = 0x00008912; +pub const SIOCGIFFLAGS: ::c_ulong = 0x00008913; +pub const SIOCSIFFLAGS: ::c_ulong = 0x00008914; +pub const SIOCGIFADDR: ::c_ulong = 0x00008915; +pub const SIOCSIFADDR: ::c_ulong = 0x00008916; +pub const SIOCGIFDSTADDR: ::c_ulong = 0x00008917; +pub const SIOCSIFDSTADDR: ::c_ulong = 0x00008918; +pub const SIOCGIFBRDADDR: ::c_ulong = 0x00008919; +pub const SIOCSIFBRDADDR: ::c_ulong = 0x0000891A; +pub const SIOCGIFNETMASK: ::c_ulong = 0x0000891B; +pub const SIOCSIFNETMASK: ::c_ulong = 0x0000891C; +pub const SIOCGIFMETRIC: ::c_ulong = 0x0000891D; +pub const SIOCSIFMETRIC: ::c_ulong = 0x0000891E; +pub const SIOCGIFMEM: ::c_ulong = 0x0000891F; +pub const SIOCSIFMEM: ::c_ulong = 0x00008920; +pub const SIOCGIFMTU: ::c_ulong = 0x00008921; +pub const SIOCSIFMTU: ::c_ulong = 0x00008922; +pub const SIOCSIFHWADDR: ::c_ulong = 0x00008924; +pub const SIOCGIFENCAP: ::c_ulong = 0x00008925; +pub const SIOCSIFENCAP: ::c_ulong = 0x00008926; +pub const SIOCGIFHWADDR: ::c_ulong = 0x00008927; +pub const SIOCGIFSLAVE: ::c_ulong = 0x00008929; +pub const SIOCSIFSLAVE: ::c_ulong = 0x00008930; +pub const SIOCADDMULTI: ::c_ulong = 0x00008931; +pub const SIOCDELMULTI: ::c_ulong = 0x00008932; +pub const SIOCDARP: ::c_ulong = 0x00008950; +pub const SIOCGARP: ::c_ulong = 0x00008951; +pub const SIOCSARP: ::c_ulong = 0x00008952; +pub const SIOCDRARP: ::c_ulong = 0x00008960; +pub const SIOCGRARP: ::c_ulong = 0x00008961; +pub const SIOCSRARP: ::c_ulong = 0x00008962; +pub const SIOCGIFMAP: ::c_ulong = 0x00008970; +pub const SIOCSIFMAP: ::c_ulong = 0x00008971; + f! { pub fn FD_CLR(fd: ::c_int, set: *mut fd_set) -> () { let fd = fd as usize; |