Commit Graph

79 Commits

Author SHA1 Message Date
Ruihan Li b891d7d215 Introduce `Endpoint` and `EndpointState` 2025-06-24 15:41:53 +08:00
Ruihan Li 4a9977d9a7 Make zero reads/writes' behavior right 2025-06-17 16:09:33 +08:00
Ruihan Li 837f908690 Fix some pollee mistakes 2025-06-17 16:06:48 +08:00
Marsman1996 5a514f6163 Check `VSOCK_GLOBAL` when creating `VsockStreamSocket` 2025-06-16 14:43:17 +08:00
Ruihan Li 796635486c Handle broken netlink attributes 2025-06-13 11:27:22 +08:00
Ruihan Li deab9b6f72 Truncate netlink messages 2025-06-13 11:27:22 +08:00
Ruihan Li 0e8106abfa Restrict visibility for TCP internals 2025-06-13 11:07:11 +08:00
Ruihan Li 639bc91e31 Clean up public re-exports under `net/` 2025-06-13 11:07:11 +08:00
jiangjianfeng f0957d2f54 Fix clippy warnings in kernel crate 2025-06-06 18:22:09 +08:00
jiangjianfeng f946f09ee4 Implement netlink uevent socket 2025-06-06 11:33:09 +08:00
Ruihan Li 26253829bb Use `datagram_common` in netlink 2025-04-23 20:37:40 +08:00
Ruihan Li c9f939bcc4 Create `datagram_common` and use it in UDP 2025-04-23 20:37:40 +08:00
Ruihan Li 96e62b8fa5 Reorder socket locks 2025-04-23 20:37:40 +08:00
jiangjianfeng 961ad73847 Poll the correct iface in irq handler 2025-04-23 00:32:37 +08:00
jiangjianfeng 5d84ac7775 Generate kernel response to user request 2025-04-15 17:20:12 +08:00
jiangjianfeng 3e66732889 Parse netlink message 2025-04-15 17:20:12 +08:00
jiangjianfeng ac42e83387 Add basic structure for netlink route socket 2025-04-15 17:20:12 +08:00
Ruihan Li d40d452e9d Receive RST packets as `ECONNRESET` errors 2025-03-10 18:08:08 +08:00
Ruihan Li aa29640ed7 Send RST packets when appropriate 2025-03-10 18:08:08 +08:00
Ruihan Li eef56c770b Simplify the TCP state check 2025-03-10 18:08:08 +08:00
jiangjianfeng 388eec449a Add ip level socket option 2025-03-07 13:38:02 +08:00
Ruihan Li d37e60d082 Report socket errors in `send`/`recv` 2025-03-05 19:48:28 +08:00
Ruihan Li 68cf99993e Remove socket errors from `SocketOptionSet` 2025-03-05 19:48:28 +08:00
Ruihan Li 8187fa2f1b Fix timeout mechanism in `wait_events` 2025-02-23 23:11:05 +08:00
jiangjianfeng 3f951e0c0c Enable gVisor tcp_socket_test 2025-02-11 10:50:20 +08:00
Ruihan Li 418f58ec89 Avoid locking twice in UDP `send` 2025-02-08 15:44:44 +08:00
Ruihan Li 6a13787c49 Implementing `FileLike` for all `Socket`s 2025-02-08 15:44:44 +08:00
Ruihan Li 3c6737a4ca Revise doc comments for `Socket` 2025-02-08 15:44:44 +08:00
Ruihan Li 0dca168717 Use `#[expect(lint)]`, not `#[allow(lint)]` 2025-02-08 15:10:04 +08:00
Ruihan Li 16db96e496 Adjust `as_socket` signature 2025-01-09 10:58:16 +08:00
jiangjianfeng 39cc0dca26 Add socket hash table 2024-12-30 09:46:14 +08:00
anbo225 e75b6320ad Add support for group-based permission checking in ext2 2024-12-26 17:07:55 +08:00
jiangjianfeng 72cb160539 Add keepidle tcp option 2024-12-18 13:19:34 +08:00
Ruihan Li 776fd6a892 Create backlog sockets on demand 2024-12-17 20:14:53 +08:00
jiangjianfeng 58cf8ea681 Set keepalive and tcp_nodelay on underlying sockets 2024-12-15 16:50:43 +08:00
Ruihan Li 53b873f647 Add `get_mut` methods for locks 2024-12-15 16:36:54 +08:00
Ruihan Li 8bbbde4ccb Use `Ordering::Relaxed` for `is_nonblocking` 2024-12-12 20:50:12 +08:00
Ruihan Li 1207161afe Protect socket states with `PreemptDisabled` 2024-12-12 20:50:12 +08:00
Ruihan Li 1716f4f324 Use `Pollee` as the socket observer 2024-12-12 20:50:12 +08:00
Ruihan Li fa76afb3a9 Make `Ext` a trait 2024-12-12 20:50:12 +08:00
Marsman1996 2ec907875c Replace `debug_assert` with `warn` for `SendRecvFlags` 2024-12-11 16:53:03 +08:00
Ruihan Li 36fc1d3757 Move FS things to `PosixThread` 2024-12-05 13:44:09 +08:00
Ruihan Li a260411a2a Implement `WriteIrqDisabled` 2024-12-03 12:07:24 +08:00
jiangjianfeng 495c93c2ad Refactor Rwlock to take type parameter 2024-11-21 15:46:10 +08:00
Ruihan Li ec2c6ab7a3 Make `Pollee` semi-stateless 2024-11-20 16:39:18 +08:00
Ruihan Li 1c1da8ea06 Don't poll ifaces if not necessary 2024-11-20 16:39:18 +08:00
Ruihan Li fab61f5f66 Make `Pollee` stateless 2024-11-20 16:39:18 +08:00
Ruihan Li 197d53c0ab Accept sockets in the ESTABLISHED state 2024-11-16 13:25:19 +08:00
Ruihan Li ac71234b89 Remove `{,un}register_observer` 2024-11-13 14:15:44 +08:00
Ruihan Li e32fb2f91b Introduce `PollAdaptor` and `Poller` 2024-11-13 14:15:44 +08:00