mirror of
https://github.com/jmcorgan/fips.git
synced 2026-07-22 07:48:26 +00:00
Add UDP transport implementation
- Convert transport.rs to module directory (transport/mod.rs + transport/udp.rs) - Add packet channel types for transport→Node communication: - ReceivedPacket struct with transport_id, remote_addr, data, timestamp - PacketTx/PacketRx type aliases for tokio mpsc channels - packet_channel() constructor function - Add UdpConfig to config.rs (enabled, bind_addr, mtu) - Implement UdpTransport with async lifecycle: - start_async(): binds socket, spawns receive loop - stop_async(): aborts receive task, closes socket - send_async(): sends packet with MTU validation - discover(): returns empty (peer config is node-level) - Update lib.rs with new re-exports - Add tokio net and time features to Cargo.toml All 185 tests pass.
This commit is contained in:
@@ -18,7 +18,7 @@ tracing-subscriber = { version = "0.3", features = ["env-filter"] }
|
||||
tun = { version = "0.7", features = ["async"] }
|
||||
libc = "0.2"
|
||||
rtnetlink = "0.14"
|
||||
tokio = { version = "1", features = ["rt", "macros", "signal", "sync"] }
|
||||
tokio = { version = "1", features = ["rt", "macros", "signal", "sync", "net", "time"] }
|
||||
futures = "0.3"
|
||||
|
||||
[dev-dependencies]
|
||||
|
||||
Reference in New Issue
Block a user