]> git.proxmox.com Git - rustc.git/blame - vendor/rustix/src/backend/linux_raw/net/send_recv.rs
New upstream version 1.75.0+dfsg1
[rustc.git] / vendor / rustix / src / backend / linux_raw / net / send_recv.rs
CommitLineData
fe692bf9 1use crate::backend::c;
064997fb
FG
2use bitflags::bitflags;
3
4bitflags! {
ed00b5ec
FG
5 /// `MSG_*` flags for use with [`send`], [`send_to`], and related
6 /// functions.
49aad941
FG
7 ///
8 /// [`send`]: crate::net::send
9 /// [`sendto`]: crate::net::sendto
fe692bf9
FG
10 #[repr(transparent)]
11 #[derive(Copy, Clone, Eq, PartialEq, Hash, Debug)]
064997fb
FG
12 pub struct SendFlags: u32 {
13 /// `MSG_CONFIRM`
14 const CONFIRM = c::MSG_CONFIRM;
15 /// `MSG_DONTROUTE`
16 const DONTROUTE = c::MSG_DONTROUTE;
17 /// `MSG_DONTWAIT`
18 const DONTWAIT = c::MSG_DONTWAIT;
19 /// `MSG_EOT`
20 const EOT = c::MSG_EOR;
21 /// `MSG_MORE`
22 const MORE = c::MSG_MORE;
23 /// `MSG_NOSIGNAL`
24 const NOSIGNAL = c::MSG_NOSIGNAL;
25 /// `MSG_OOB`
26 const OOB = c::MSG_OOB;
781aab86 27
ed00b5ec 28 /// <https://docs.rs/bitflags/*/bitflags/#externally-defined-flags>
781aab86 29 const _ = !0;
064997fb
FG
30 }
31}
32
33bitflags! {
ed00b5ec
FG
34 /// `MSG_*` flags for use with [`recv`], [`recvfrom`], and related
35 /// functions.
49aad941
FG
36 ///
37 /// [`recv`]: crate::net::recv
38 /// [`recvfrom`]: crate::net::recvfrom
fe692bf9
FG
39 #[repr(transparent)]
40 #[derive(Copy, Clone, Eq, PartialEq, Hash, Debug)]
064997fb
FG
41 pub struct RecvFlags: u32 {
42 /// `MSG_CMSG_CLOEXEC`
43 const CMSG_CLOEXEC = c::MSG_CMSG_CLOEXEC;
44 /// `MSG_DONTWAIT`
45 const DONTWAIT = c::MSG_DONTWAIT;
46 /// `MSG_ERRQUEUE`
47 const ERRQUEUE = c::MSG_ERRQUEUE;
48 /// `MSG_OOB`
49 const OOB = c::MSG_OOB;
50 /// `MSG_PEEK`
51 const PEEK = c::MSG_PEEK;
52 /// `MSG_TRUNC`
53 const TRUNC = c::MSG_TRUNC;
54 /// `MSG_WAITALL`
55 const WAITALL = c::MSG_WAITALL;
781aab86 56
ed00b5ec 57 /// <https://docs.rs/bitflags/*/bitflags/#externally-defined-flags>
781aab86 58 const _ = !0;
064997fb
FG
59 }
60}