]> git.proxmox.com Git - rustc.git/blob - vendor/rustix/src/imp/libc/net/send_recv.rs
New upstream version 1.64.0+dfsg1
[rustc.git] / vendor / rustix / src / imp / libc / net / send_recv.rs
1 use super::super::c;
2 use bitflags::bitflags;
3
4 bitflags! {
5 /// `MSG_*`
6 pub struct SendFlags: i32 {
7 /// `MSG_CONFIRM`
8 #[cfg(not(any(
9 windows,
10 target_os = "dragonfly",
11 target_os = "freebsd",
12 target_os = "illumos",
13 target_os = "ios",
14 target_os = "macos",
15 target_os = "netbsd",
16 target_os = "openbsd",
17 )))]
18 const CONFIRM = c::MSG_CONFIRM;
19 /// `MSG_DONTROUTE`
20 const DONTROUTE = c::MSG_DONTROUTE;
21 /// `MSG_DONTWAIT`
22 #[cfg(not(windows))]
23 const DONTWAIT = c::MSG_DONTWAIT;
24 /// `MSG_EOR`
25 #[cfg(not(windows))]
26 const EOT = c::MSG_EOR;
27 /// `MSG_MORE`
28 #[cfg(not(any(
29 windows,
30 target_os = "dragonfly",
31 target_os = "freebsd",
32 target_os = "illumos",
33 target_os = "ios",
34 target_os = "macos",
35 target_os = "netbsd",
36 target_os = "openbsd",
37 )))]
38 const MORE = c::MSG_MORE;
39 #[cfg(not(any(windows, target_os = "ios", target_os = "macos")))]
40 /// `MSG_NOSIGNAL`
41 const NOSIGNAL = c::MSG_NOSIGNAL;
42 /// `MSG_OOB`
43 const OOB = c::MSG_OOB;
44 }
45 }
46
47 bitflags! {
48 /// `MSG_*`
49 pub struct RecvFlags: i32 {
50 #[cfg(not(any(windows, target_os = "illumos", target_os = "ios", target_os = "macos")))]
51 /// `MSG_CMSG_CLOEXEC`
52 const CMSG_CLOEXEC = c::MSG_CMSG_CLOEXEC;
53 /// `MSG_DONTWAIT`
54 #[cfg(not(windows))]
55 const DONTWAIT = c::MSG_DONTWAIT;
56 /// `MSG_ERRQUEUE`
57 #[cfg(not(any(
58 windows,
59 target_os = "dragonfly",
60 target_os = "freebsd",
61 target_os = "illumos",
62 target_os = "ios",
63 target_os = "macos",
64 target_os = "netbsd",
65 target_os = "openbsd",
66 )))]
67 const ERRQUEUE = c::MSG_ERRQUEUE;
68 /// `MSG_OOB`
69 const OOB = c::MSG_OOB;
70 /// `MSG_PEEK`
71 const PEEK = c::MSG_PEEK;
72 /// `MSG_TRUNC`
73 const TRUNC = c::MSG_TRUNC as c::c_int;
74 /// `MSG_WAITALL`
75 const WAITALL = c::MSG_WAITALL;
76 }
77 }