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 = "haiku", 13 target_os = "illumos", 14 target_os = "ios", 15 target_os = "macos", 16 target_os = "netbsd", 17 target_os = "openbsd", 18 target_os = "solaris", 19 )))] 20 const CONFIRM = c::MSG_CONFIRM; 21 /// `MSG_DONTROUTE` 22 const DONTROUTE = c::MSG_DONTROUTE; 23 /// `MSG_DONTWAIT` 24 #[cfg(not(windows))] 25 const DONTWAIT = c::MSG_DONTWAIT; 26 /// `MSG_EOR` 27 #[cfg(not(windows))] 28 const EOT = c::MSG_EOR; 29 /// `MSG_MORE` 30 #[cfg(not(any( 31 windows, 32 target_os = "dragonfly", 33 target_os = "freebsd", 34 target_os = "haiku", 35 target_os = "illumos", 36 target_os = "ios", 37 target_os = "macos", 38 target_os = "netbsd", 39 target_os = "openbsd", 40 target_os = "solaris", 41 )))] 42 const MORE = c::MSG_MORE; 43 #[cfg(not(any(windows, target_os = "ios", target_os = "macos")))] 44 /// `MSG_NOSIGNAL` 45 const NOSIGNAL = c::MSG_NOSIGNAL; 46 /// `MSG_OOB` 47 const OOB = c::MSG_OOB; 48 } 49 } 50 51 bitflags! { 52 /// `MSG_*` 53 pub struct RecvFlags: i32 { 54 #[cfg(not(any(windows, target_os = "haiku", target_os = "illumos", target_os = "ios", target_os = "macos", target_os = "solaris")))] 55 /// `MSG_CMSG_CLOEXEC` 56 const CMSG_CLOEXEC = c::MSG_CMSG_CLOEXEC; 57 /// `MSG_DONTWAIT` 58 #[cfg(not(windows))] 59 const DONTWAIT = c::MSG_DONTWAIT; 60 /// `MSG_ERRQUEUE` 61 #[cfg(not(any( 62 windows, 63 target_os = "dragonfly", 64 target_os = "freebsd", 65 target_os = "haiku", 66 target_os = "illumos", 67 target_os = "ios", 68 target_os = "macos", 69 target_os = "netbsd", 70 target_os = "openbsd", 71 target_os = "solaris", 72 )))] 73 const ERRQUEUE = c::MSG_ERRQUEUE; 74 /// `MSG_OOB` 75 const OOB = c::MSG_OOB; 76 /// `MSG_PEEK` 77 const PEEK = c::MSG_PEEK; 78 /// `MSG_TRUNC` 79 const TRUNC = c::MSG_TRUNC as c::c_int; 80 /// `MSG_WAITALL` 81 const WAITALL = c::MSG_WAITALL; 82 } 83 } 84