bors
af69066aa6
Auto merge of #69864 - LinkTed:master, r=Amanieu
...
unix: Extend UnixStream and UnixDatagram to send and receive file descriptors
Add the functions `recv_vectored_fds` and `send_vectored_fds` to `UnixDatagram` and `UnixStream`. With this functions `UnixDatagram` and `UnixStream` can send and receive file descriptors, by using `recvmsg` and `sendmsg` system call.
2020-12-02 17:36:29 +00:00
LinkTed
8983752c12
Add comment for the previous android bug fix
2020-11-26 18:54:13 +01:00
LinkTed
9b9dd4aeea
Bug fix for android platform, because of the wrong behavior of CMSG_NXTHDR
2020-11-24 22:15:04 +01:00
David Tolnay
29128a5aa2
Disambiguate symlink argument names
2020-11-14 14:46:14 -08:00
LinkTed
ead7185db6
Fix docs for MacOs (again)
2020-11-04 19:45:48 +01:00
LinkTed
c779405686
Fix docs for MacOs (correction)
2020-11-03 18:28:04 +01:00
LinkTed
ea5e012ba7
Fix test cases for MacOs
2020-10-28 18:22:16 +01:00
LinkTed
79273fa30c
Fix cannot find type ucred
for MacOs by using fake definitions
2020-10-17 19:36:11 +02:00
Mara Bos
0f0257be10
Take some of sys/vxworks/process/* from sys/unix instead.
2020-10-16 06:22:05 +02:00
Mara Bos
71bb1dc2a0
Take sys/vxworks/{fd,fs,io} from sys/unix instead.
2020-10-16 06:19:00 +02:00
LinkTed
d8c75d9f91
Fix unresolved imports for recv_vectored_with_ancillary_from
, send_vectored_with_ancillary_to
and SocketAncillary
2020-10-11 19:23:41 +02:00
LinkTed
64facfef51
Fix unresolved link to SocketAncillary
2020-10-10 15:19:13 +02:00
LinkTed
7b596f2e13
Fix libc
is ambiguous for Windows
2020-10-10 15:19:13 +02:00
LinkTed
fc65f6a0ce
Fix import errors for #[cfg(doc)]
target
2020-10-10 15:19:13 +02:00
LinkTed
a81764731c
Add fake definitions for Windows
2020-10-10 15:19:13 +02:00
LinkTed
d0069a0cc5
Fix imports for MacOs
2020-10-10 15:19:13 +02:00
LinkTed
1ae54e560a
Change imports for cfg(doc)
2020-10-10 15:19:13 +02:00
LinkTed
e9bf69954c
Remove passcred
for emscripten
2020-10-10 15:19:13 +02:00
LinkTed
6b0c3dfe00
Remove unnecessary trailing semicolon
2020-10-10 15:19:13 +02:00
LinkTed
ce167f8be7
Fix type mismatching for different OSes.
2020-10-10 15:19:13 +02:00
LinkTed
889c9272cb
Remove SocketCred
for emscripten
2020-10-10 15:19:13 +02:00
LinkTed
0fcb834832
Fix unused import for IoSliceMut
for macos
2020-10-10 15:19:13 +02:00
LinkTed
c2a1b50140
Add conditional compilation for import
2020-10-10 15:19:13 +02:00
LinkTed
e0cedba63e
Fix cfg condition for test
2020-10-10 15:19:13 +02:00
LinkTed
d30508f95c
Remove target_os
, which does not have SO_PASSCRED
constant in libc
2020-10-10 15:19:13 +02:00
LinkTed
1f6d7dcc0a
Remove target_os
, which does not have cmsghdr
struct in libc
2020-10-10 15:19:13 +02:00
LinkTed
7b476d87fb
Remove target_os
, which does not have MSG_CMSG_CLOEXEC
constant in libc
2020-10-10 15:19:12 +02:00
LinkTed
db902bca3a
Add the code of the tracking issue
2020-10-10 15:19:12 +02:00
LinkTed
cc085e9170
Replace assert
with unreachable
2020-10-10 15:19:12 +02:00
LinkTed
d0b133cdc6
Remove unsupported target_os for SocketCred
2020-10-10 15:19:12 +02:00
LinkTed
5964d599ac
Change standard types to libc types
2020-10-10 15:19:12 +02:00
LinkTed
1902711f38
Change name of struct to SocketCred
2020-10-10 15:19:12 +02:00
LinkTed
eeea5c23b4
Change API to unsafe and add doc comments
2020-10-10 15:19:12 +02:00
LinkTed
686964f0f5
Add set_passcred
and passcred
methods to UnixStream
and UnixDatagram
2020-10-10 15:19:12 +02:00
LinkTed
19c5fdda7c
Rename test.rs
to tests.rs
2020-10-10 15:19:12 +02:00
LinkTed
a91fd7328c
Add doc comments
2020-10-10 15:19:12 +02:00
LinkTed
46764d48bb
Add doc(cfg(...))
2020-10-10 15:19:12 +02:00
LinkTed
1869141e54
Reduce impl trait by using macro in raw_fd.rs
2020-10-10 15:19:12 +02:00
LinkTed
53791b3ff4
Move conditional compilation to the upper module and sort the target OS list alphabetically
2020-10-10 15:19:12 +02:00
LinkTed
07ed6afc6d
Remove unnecessary path
2020-10-10 15:19:12 +02:00
LinkTed
6ed9bface6
Use fill
instead of memset
2020-10-10 15:19:12 +02:00
LinkTed
1f3195a5df
Remove inner function in bind
, connect
and send_to
2020-10-10 15:19:12 +02:00
LinkTed
4c929a00ee
Remove lifetime annotation in messages
function
2020-10-10 15:19:12 +02:00
LinkTed
b82f29d780
Remove Clone
trait bound in add_to_ancillary_data
2020-10-10 15:19:11 +02:00
LinkTed
3dfab6fb64
Add integer overflow check
2020-10-10 15:19:11 +02:00
LinkTed
e1084052a7
Replace TryFrom
of AncillaryData
with a private method.
2020-10-10 15:19:11 +02:00
LinkTed
8784ffbb4e
Using read_unaligned
instead of memcpy
.
2020-10-10 15:19:11 +02:00
LinkTed
8783b06bd2
Move add_to_ancillary_data
and AncillaryDataIter
to ancillary.rs
2020-10-10 15:19:11 +02:00
LinkTed
e6984eee6f
Add UCred struct
2020-10-10 15:19:11 +02:00
LinkTed
6f82ddf18e
Add AncillaryError
2020-10-10 15:19:11 +02:00