1 // arch/powerpc/include/uapi/asm/socket.h 2 3 pub const SOL_SOCKET: ::c_int = 1; 4 5 // Defined in unix/linux_like/mod.rs 6 // pub const SO_DEBUG: ::c_int = 1; 7 pub const SO_REUSEADDR: ::c_int = 2; 8 pub const SO_TYPE: ::c_int = 3; 9 pub const SO_ERROR: ::c_int = 4; 10 pub const SO_DONTROUTE: ::c_int = 5; 11 pub const SO_BROADCAST: ::c_int = 6; 12 pub const SO_SNDBUF: ::c_int = 7; 13 pub const SO_RCVBUF: ::c_int = 8; 14 pub const SO_KEEPALIVE: ::c_int = 9; 15 pub const SO_OOBINLINE: ::c_int = 10; 16 pub const SO_NO_CHECK: ::c_int = 11; 17 pub const SO_PRIORITY: ::c_int = 12; 18 pub const SO_LINGER: ::c_int = 13; 19 pub const SO_BSDCOMPAT: ::c_int = 14; 20 pub const SO_REUSEPORT: ::c_int = 15; 21 // powerpc only differs in these 22 pub const SO_RCVLOWAT: ::c_int = 16; 23 pub const SO_SNDLOWAT: ::c_int = 17; 24 pub const SO_RCVTIMEO: ::c_int = 18; 25 pub const SO_SNDTIMEO: ::c_int = 19; 26 // pub const SO_RCVTIMEO_OLD: ::c_int = 18; 27 // pub const SO_SNDTIMEO_OLD: ::c_int = 19; 28 pub const SO_PASSCRED: ::c_int = 20; 29 pub const SO_PEERCRED: ::c_int = 21; 30 // end 31 pub const SO_SECURITY_AUTHENTICATION: ::c_int = 22; 32 pub const SO_SECURITY_ENCRYPTION_TRANSPORT: ::c_int = 23; 33 pub const SO_SECURITY_ENCRYPTION_NETWORK: ::c_int = 24; 34 pub const SO_BINDTODEVICE: ::c_int = 25; 35 pub const SO_ATTACH_FILTER: ::c_int = 26; 36 pub const SO_DETACH_FILTER: ::c_int = 27; 37 pub const SO_GET_FILTER: ::c_int = SO_ATTACH_FILTER; 38 pub const SO_PEERNAME: ::c_int = 28; 39 pub const SO_TIMESTAMP: ::c_int = 29; 40 // pub const SO_TIMESTAMP_OLD: ::c_int = 29; 41 pub const SO_ACCEPTCONN: ::c_int = 30; 42 pub const SO_PEERSEC: ::c_int = 31; 43 pub const SO_SNDBUFFORCE: ::c_int = 32; 44 pub const SO_RCVBUFFORCE: ::c_int = 33; 45 pub const SO_PASSSEC: ::c_int = 34; 46 pub const SO_TIMESTAMPNS: ::c_int = 35; 47 // pub const SO_TIMESTAMPNS_OLD: ::c_int = 35; 48 pub const SO_MARK: ::c_int = 36; 49 pub const SO_TIMESTAMPING: ::c_int = 37; 50 // pub const SO_TIMESTAMPING_OLD: ::c_int = 37; 51 pub const SO_PROTOCOL: ::c_int = 38; 52 pub const SO_DOMAIN: ::c_int = 39; 53 pub const SO_RXQ_OVFL: ::c_int = 40; 54 pub const SO_WIFI_STATUS: ::c_int = 41; 55 pub const SCM_WIFI_STATUS: ::c_int = SO_WIFI_STATUS; 56 pub const SO_PEEK_OFF: ::c_int = 42; 57 pub const SO_NOFCS: ::c_int = 43; 58 pub const SO_LOCK_FILTER: ::c_int = 44; 59 pub const SO_SELECT_ERR_QUEUE: ::c_int = 45; 60 pub const SO_BUSY_POLL: ::c_int = 46; 61 pub const SO_MAX_PACING_RATE: ::c_int = 47; 62 pub const SO_BPF_EXTENSIONS: ::c_int = 48; 63 pub const SO_INCOMING_CPU: ::c_int = 49; 64 pub const SO_ATTACH_BPF: ::c_int = 50; 65 pub const SO_DETACH_BPF: ::c_int = SO_DETACH_FILTER; 66 pub const SO_ATTACH_REUSEPORT_CBPF: ::c_int = 51; 67 pub const SO_ATTACH_REUSEPORT_EBPF: ::c_int = 52; 68 pub const SO_CNX_ADVICE: ::c_int = 53; 69 pub const SCM_TIMESTAMPING_OPT_STATS: ::c_int = 54; 70 pub const SO_MEMINFO: ::c_int = 55; 71 pub const SO_INCOMING_NAPI_ID: ::c_int = 56; 72 pub const SO_COOKIE: ::c_int = 57; 73 pub const SCM_TIMESTAMPING_PKTINFO: ::c_int = 58; 74 pub const SO_PEERGROUPS: ::c_int = 59; 75 pub const SO_ZEROCOPY: ::c_int = 60; 76 pub const SO_TXTIME: ::c_int = 61; 77 pub const SCM_TXTIME: ::c_int = SO_TXTIME; 78 pub const SO_BINDTOIFINDEX: ::c_int = 62; 79 // pub const SO_TIMESTAMP_NEW: ::c_int = 63; 80 // pub const SO_TIMESTAMPNS_NEW: ::c_int = 64; 81 // pub const SO_TIMESTAMPING_NEW: ::c_int = 65; 82 // pub const SO_RCVTIMEO_NEW: ::c_int = 66; 83 // pub const SO_SNDTIMEO_NEW: ::c_int = 67; 84 // pub const SO_DETACH_REUSEPORT_BPF: ::c_int = 68; 85 // pub const SO_PREFER_BUSY_POLL: ::c_int = 69; 86 // pub const SO_BUSY_POLL_BUDGET: ::c_int = 70; 87 88 pub const FICLONE: ::c_ulong = 0x80049409; 89 pub const FICLONERANGE: ::c_ulong = 0x8020940D; 90 91 // Defined in unix/linux_like/mod.rs 92 // pub const SCM_TIMESTAMP: ::c_int = SO_TIMESTAMP; 93 pub const SCM_TIMESTAMPNS: ::c_int = SO_TIMESTAMPNS; 94 pub const SCM_TIMESTAMPING: ::c_int = SO_TIMESTAMPING; 95 96 // Ioctl Constants 97 98 cfg_if! { 99 if #[cfg(target_env = "gnu")] { 100 pub const TCGETS: ::Ioctl = 0x403c7413; 101 pub const TCSETS: ::Ioctl = 0x803c7414; 102 pub const TCSETSW: ::Ioctl = 0x803c7415; 103 pub const TCSETSF: ::Ioctl = 0x803c7416; 104 } else if #[cfg(target_env = "musl")] { 105 pub const TCGETS: ::Ioctl = 0x402c7413; 106 pub const TCSETS: ::Ioctl = 0x802c7414; 107 pub const TCSETSW: ::Ioctl = 0x802c7415; 108 pub const TCSETSF: ::Ioctl = 0x802c7416; 109 } 110 } 111 112 pub const TCGETA: ::Ioctl = 0x40147417; 113 pub const TCSETA: ::Ioctl = 0x80147418; 114 pub const TCSETAW: ::Ioctl = 0x80147419; 115 pub const TCSETAF: ::Ioctl = 0x8014741C; 116 pub const TCSBRK: ::Ioctl = 0x2000741D; 117 pub const TCXONC: ::Ioctl = 0x2000741E; 118 pub const TCFLSH: ::Ioctl = 0x2000741F; 119 pub const TIOCEXCL: ::Ioctl = 0x540C; 120 pub const TIOCNXCL: ::Ioctl = 0x540D; 121 pub const TIOCSCTTY: ::Ioctl = 0x540E; 122 pub const TIOCGPGRP: ::Ioctl = 0x40047477; 123 pub const TIOCSPGRP: ::Ioctl = 0x80047476; 124 pub const TIOCOUTQ: ::Ioctl = 0x40047473; 125 pub const TIOCSTI: ::Ioctl = 0x5412; 126 pub const TIOCGWINSZ: ::Ioctl = 0x40087468; 127 pub const TIOCSWINSZ: ::Ioctl = 0x80087467; 128 pub const TIOCMGET: ::Ioctl = 0x5415; 129 pub const TIOCMBIS: ::Ioctl = 0x5416; 130 pub const TIOCMBIC: ::Ioctl = 0x5417; 131 pub const TIOCMSET: ::Ioctl = 0x5418; 132 pub const TIOCGSOFTCAR: ::Ioctl = 0x5419; 133 pub const TIOCSSOFTCAR: ::Ioctl = 0x541A; 134 pub const FIONREAD: ::Ioctl = 0x4004667F; 135 pub const TIOCINQ: ::Ioctl = FIONREAD; 136 pub const TIOCLINUX: ::Ioctl = 0x541C; 137 pub const TIOCCONS: ::Ioctl = 0x541D; 138 pub const TIOCGSERIAL: ::Ioctl = 0x541E; 139 pub const TIOCSSERIAL: ::Ioctl = 0x541F; 140 pub const TIOCPKT: ::Ioctl = 0x5420; 141 pub const FIONBIO: ::Ioctl = 0x8004667e; 142 pub const TIOCNOTTY: ::Ioctl = 0x5422; 143 pub const TIOCSETD: ::Ioctl = 0x5423; 144 pub const TIOCGETD: ::Ioctl = 0x5424; 145 pub const TCSBRKP: ::Ioctl = 0x5425; 146 pub const TIOCSBRK: ::Ioctl = 0x5427; 147 pub const TIOCCBRK: ::Ioctl = 0x5428; 148 pub const TIOCGSID: ::Ioctl = 0x5429; 149 pub const TIOCGRS485: ::Ioctl = 0x542e; 150 pub const TIOCSRS485: ::Ioctl = 0x542f; 151 pub const TIOCGPTN: ::Ioctl = 0x40045430; 152 pub const TIOCSPTLCK: ::Ioctl = 0x80045431; 153 pub const TIOCGDEV: ::Ioctl = 0x40045432; 154 pub const TIOCSIG: ::Ioctl = 0x80045436; 155 pub const TIOCVHANGUP: ::Ioctl = 0x5437; 156 pub const TIOCGPKT: ::Ioctl = 0x40045438; 157 pub const TIOCGPTLCK: ::Ioctl = 0x40045439; 158 pub const TIOCGEXCL: ::Ioctl = 0x40045440; 159 pub const TIOCGPTPEER: ::Ioctl = 0x20005441; 160 //pub const TIOCGISO7816: ::Ioctl = 0x40285442; 161 //pub const TIOCSISO7816: ::Ioctl = 0xc0285443; 162 pub const FIONCLEX: ::Ioctl = 0x20006602; 163 pub const FIOCLEX: ::Ioctl = 0x20006601; 164 pub const FIOASYNC: ::Ioctl = 0x8004667d; 165 pub const TIOCSERCONFIG: ::Ioctl = 0x5453; 166 pub const TIOCSERGWILD: ::Ioctl = 0x5454; 167 pub const TIOCSERSWILD: ::Ioctl = 0x5455; 168 pub const TIOCGLCKTRMIOS: ::Ioctl = 0x5456; 169 pub const TIOCSLCKTRMIOS: ::Ioctl = 0x5457; 170 pub const TIOCSERGSTRUCT: ::Ioctl = 0x5458; 171 pub const TIOCSERGETLSR: ::Ioctl = 0x5459; 172 pub const TIOCSERGETMULTI: ::Ioctl = 0x545A; 173 pub const TIOCSERSETMULTI: ::Ioctl = 0x545B; 174 pub const TIOCMIWAIT: ::Ioctl = 0x545C; 175 pub const TIOCGICOUNT: ::Ioctl = 0x545D; 176 pub const BLKIOMIN: ::Ioctl = 0x20001278; 177 pub const BLKIOOPT: ::Ioctl = 0x20001279; 178 pub const BLKSSZGET: ::Ioctl = 0x20001268; 179 pub const BLKPBSZGET: ::Ioctl = 0x2000127B; 180 //pub const FIOQSIZE: ::Ioctl = 0x40086680; 181 182 pub const TIOCM_LE: ::c_int = 0x001; 183 pub const TIOCM_DTR: ::c_int = 0x002; 184 pub const TIOCM_RTS: ::c_int = 0x004; 185 pub const TIOCM_ST: ::c_int = 0x008; 186 pub const TIOCM_SR: ::c_int = 0x010; 187 pub const TIOCM_CTS: ::c_int = 0x020; 188 pub const TIOCM_CAR: ::c_int = 0x040; 189 pub const TIOCM_CD: ::c_int = TIOCM_CAR; 190 pub const TIOCM_RNG: ::c_int = 0x080; 191 pub const TIOCM_RI: ::c_int = TIOCM_RNG; 192 pub const TIOCM_DSR: ::c_int = 0x100; 193 194 pub const BOTHER: ::speed_t = 0o0037; 195 pub const IBSHIFT: ::tcflag_t = 16; 196 197 // RLIMIT Constants 198 199 cfg_if! { 200 if #[cfg(target_env = "gnu")] { 201 202 pub const RLIMIT_CPU: ::__rlimit_resource_t = 0; 203 pub const RLIMIT_FSIZE: ::__rlimit_resource_t = 1; 204 pub const RLIMIT_DATA: ::__rlimit_resource_t = 2; 205 pub const RLIMIT_STACK: ::__rlimit_resource_t = 3; 206 pub const RLIMIT_CORE: ::__rlimit_resource_t = 4; 207 pub const RLIMIT_RSS: ::__rlimit_resource_t = 5; 208 pub const RLIMIT_NPROC: ::__rlimit_resource_t = 6; 209 pub const RLIMIT_NOFILE: ::__rlimit_resource_t = 7; 210 pub const RLIMIT_MEMLOCK: ::__rlimit_resource_t = 8; 211 pub const RLIMIT_AS: ::__rlimit_resource_t = 9; 212 pub const RLIMIT_LOCKS: ::__rlimit_resource_t = 10; 213 pub const RLIMIT_SIGPENDING: ::__rlimit_resource_t = 11; 214 pub const RLIMIT_MSGQUEUE: ::__rlimit_resource_t = 12; 215 pub const RLIMIT_NICE: ::__rlimit_resource_t = 13; 216 pub const RLIMIT_RTPRIO: ::__rlimit_resource_t = 14; 217 pub const RLIMIT_RTTIME: ::__rlimit_resource_t = 15; 218 pub const RLIM_NLIMITS: ::__rlimit_resource_t = 16; 219 pub const RLIMIT_NLIMITS: ::__rlimit_resource_t = RLIM_NLIMITS; 220 221 } else if #[cfg(target_env = "musl")] { 222 223 pub const RLIMIT_CPU: ::c_int = 0; 224 pub const RLIMIT_FSIZE: ::c_int = 1; 225 pub const RLIMIT_DATA: ::c_int = 2; 226 pub const RLIMIT_STACK: ::c_int = 3; 227 pub const RLIMIT_CORE: ::c_int = 4; 228 pub const RLIMIT_RSS: ::c_int = 5; 229 pub const RLIMIT_NPROC: ::c_int = 6; 230 pub const RLIMIT_NOFILE: ::c_int = 7; 231 pub const RLIMIT_MEMLOCK: ::c_int = 8; 232 pub const RLIMIT_AS: ::c_int = 9; 233 pub const RLIMIT_LOCKS: ::c_int = 10; 234 pub const RLIMIT_SIGPENDING: ::c_int = 11; 235 pub const RLIMIT_MSGQUEUE: ::c_int = 12; 236 pub const RLIMIT_NICE: ::c_int = 13; 237 pub const RLIMIT_RTPRIO: ::c_int = 14; 238 pub const RLIMIT_RTTIME: ::c_int = 15; 239 pub const RLIM_NLIMITS: ::c_int = 15; 240 pub const RLIMIT_NLIMITS: ::c_int = RLIM_NLIMITS; 241 } 242 } 243 pub const RLIM_INFINITY: ::rlim_t = !0; 244