Jeremy Soller
0844e6fc90
WIP: use upper fd table
2025-11-15 07:55:37 -07:00
Jeremy Soller
aeb243746c
Add recv/sendmsg flags to metadata
2025-11-13 10:19:45 -07:00
Ibuki Omatsu
e675da5a30
fix: Ignore EOPNOTSUPP error from sys_call in setsockopt.
2025-11-12 06:00:44 -07:00
Ibuki Omatsu
06d5cb0bfd
fix: Fix getpeername for unix sockets adding SocketCall::GetPeerName and using SYS_CALL.
2025-11-10 06:20:46 -07:00
4lDO2
3ad0420b85
Add derive macro to check types vs libc crate.
2025-11-08 17:30:34 +01:00
Jeremy Soller
9eaa9e82b0
Pass through all SOL_SOCKET options, fix getsockopt option_len handling
2025-11-08 08:00:43 -07:00
Jeremy Soller
f7cfacfbc8
Remove leftover dbg
2025-11-07 20:17:16 -07:00
Jeremy Soller
0ee947c389
Fix recvmsg stream being too small by one usize
2025-11-07 20:11:59 -07:00
Jeremy Soller
ef5e54547f
Close accepted socket on getpeername error
2025-11-07 18:46:54 -07:00
Jeremy Soller
443145fdee
On Redox, if recvfrom/sendto has flags, use recvmsg/sendmsg
2025-11-07 11:05:04 -07:00
Jeremy Soller
82084440ad
Support nightly-2025-10-03
2025-10-03 21:51:10 -06:00
Wildan M
8fa68e2927
fmt
2025-09-27 01:13:14 +07:00
Wildan M
7527de3a25
Fix panic on getpeername
2025-09-27 01:02:20 +07:00
Jeremy Soller
9fa3eceaeb
Implement getsockaddr for SO_DOMAIN and SO_TYPE
2025-09-19 14:59:47 -06:00
Jeremy Soller
6dd10a1f11
Fix connect on redox
2025-08-01 10:33:55 -06:00
Ibuki Omatsu
d44010170f
feat: Integrate UDS bind and connect operation with RedoxFS and switch get_proc_credentials to a capability-based approach.
2025-07-18 08:57:49 -06:00
Ibuki Omatsu
206239f9a2
feat: Implement Unix Domain Socket and related features.
2025-07-17 22:48:37 -06:00
Jeremy Soller
1e48b13948
Debug recvmsg on redox
2025-05-04 09:32:10 -06:00
bjorn3
8650ac293e
Fix building on targets with unsigned c_char
2025-03-30 16:35:29 +02:00
Josh Megnauth
a709dd47bf
fix: Multiplication overflow in setsockopt
2024-11-23 19:53:33 +00:00
4lDO2
eee603efa8
Remove the "-1 errno" e() function.
2024-09-27 15:35:04 +02:00
4lDO2
d474163e0e
Switch to Rusty error handling in PalSocket.
2024-09-27 15:35:01 +02:00
4lDO2
8b8b00da01
Use unsigned return values in read()-like Pal fns.
...
Returning a negative number of bytes makes absolutely no sense, besides
the "-1 and errno" pattern, which is now converted to Result<_, Errno>.
2024-09-27 10:39:26 +02:00
4lDO2
4bd0d2a1ef
Move pthread::Errno to separate module.
2024-09-11 23:22:29 +02:00
bjorn3
49c708f537
Remove all uses of the legacy scheme syntax"
2024-08-04 13:49:10 +02:00
4lDO2
4c11b607de
Implement pread and pwrite using the syscalls.
2024-06-14 14:10:47 +02:00
Peter Limkilde Svendsen
a7137512fa
Use standard casing and mangling for internal errno
2024-03-01 00:25:42 +00:00
Peter Limkilde Svendsen
9093f6bc47
Use Cell representation for errno
2024-02-29 14:07:40 +00:00
Jeremy Soller
d4b0e172f0
Add recvmsg (stub on redox)
2024-01-16 19:47:39 -07:00
Jeremy Soller
52612784b6
Add sendmsg stub
2024-01-12 15:36:01 -07:00
Jeremy Soller
9e0c53f222
Make long 32-bits on 32-bit systems
2022-12-01 18:33:00 -07:00
oddcoder
37a462de5d
Apply cargo fmt to the whole repo
2020-07-19 21:27:38 +02:00
jD91mZM2
39ce623d2d
Fix bind/connect's AF_UNIX socket path... again
...
I don't really know for sure what all these silly rules are, but I think
I got it now...
2020-06-29 11:36:07 +02:00
jD91mZM2
f8b49936bc
Various unix socket fixes (+socketpair!)
2020-06-27 16:39:50 +02:00
jD91mZM2
cdc9aa06e3
Fix getpeername
...
Rust's TcpListener fails because of the address format being wrong. The format
comes from `accept`, but there we internally use this function.
2020-06-19 13:56:06 +02:00
oddcoder
92d6735e3f
Add more scanf tests
2020-06-03 23:20:53 +02:00
Jeremy Soller
06429ccc4c
Fix redox socket inner_get_name
2020-05-21 14:59:22 -06:00
oddcoder
c2488b5094
Running ./fmt.sh
...
These files needs formating by the auto formatter and It keeps popping
up every time I format my own code.
2020-03-07 23:52:27 +02:00
Tiago Lam
76f07b163b
platform/redox: Support AF_UNIX in accept.
...
As with the previous commit, accept() was calling inner_get_name() and
assuming only "tcp:" or "udp:" addresses would be received. Thus, in
order to support AF_UNIX sockets, inner_get_name() was split into two,
inner_af_inet() and inner_af_unix() - where the former keeps the
previous logic, dealing with "tcp:" and "udp:" addresses, and the latter
deals now with "chan:" addresses and filling in the sockaddr_un
appropriately.
2020-02-06 08:41:51 +00:00
Tiago Lam
d36cd72788
platform/redox: Support AF_UNIX in bind / connect.
...
Previously, domain AF_INET was assumed while processing bind() /
connect(), which end up calling bind_or_connect!. Instead, match on the
domain type and process the path for AF_UNIX domains.
2020-02-06 08:41:48 +00:00
Tiago Lam
12f6ffd152
platform/redox: Support AF_UNIX in socket.
...
To add support for UNIX sockets (AF_UNIX), of SOCK_STREAM type, the
"chan:" scheme is used, which will be supportedby the ipcd running in
userspace.
Later commits add similar AF_UNIX support for the rest of the methods in
impl PalSocket.
2020-02-06 08:21:12 +00:00
Jeremy Soller
9a449d4f6c
Stub for SO_ERROR to fix curl
2020-01-21 20:29:26 -07:00
jD91mZM2
b8c50c7c64
Format
2019-08-04 19:05:45 +02:00
jD91mZM2
c7d499d4f2
Upgrade to the 2018 edition
...
I didn't think it'd be this useful first, but thank god for `cargo fix --edition`!
2019-08-04 19:05:45 +02:00
Jeremy Soller
25e67b9f58
Add setsockopt support for SO_RCVTIMEO and SO_SNDTIMEO
2019-07-24 17:18:01 -06:00
Jeremy Soller
cfc541019c
Add socketpair on Linux with stub on Redox
2019-04-28 19:12:54 -06:00
Jeremy Soller
73dda0f32c
Add missing cast
2019-04-06 21:38:59 -06:00
Jeremy Soller
f2b86e985c
Ensure that getpeername and getsockname return a sockaddr of family AF_INET
2019-04-06 21:34:56 -06:00
Jeremy Soller
862c76b25f
Correct error for unknown protocol type in socket
2019-04-01 20:35:15 -06:00
Jeremy Soller
47235d44e7
Fix change of sockaddr member sa_data on Redox
2019-01-21 20:38:31 -07:00