feat(cli): add support for configuring outgoing TTL and hop limit
Introduce a `--ttl` flag to allow users to set the IPv4 TTL or IPv6 hop limit, providing control over packet lifespan and helping diagnose network topology issues.
This commit is contained in:
1 parent
a80a5e2b7b
commit
d93e10ba45
8 files changed
+204
-7
No files matched your search
@@ -392,6 +392,27 @@ fn backend_basic_open_echo_close() {
|
||||
client.close(ClientTimestamp::now()).unwrap();
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn backend_ttl_smoke() {
|
||||
let params = default_params();
|
||||
let peer = BackendPeer::start_open_echo(params.clone(), None);
|
||||
let mut config = config_for_params(peer.addr(), ¶ms);
|
||||
config.socket_config.ttl = Some(64);
|
||||
let mut client = Client::connect(config).unwrap();
|
||||
|
||||
let outcome = client.open(ClientTimestamp::now()).unwrap();
|
||||
assert!(matches!(outcome, irtt_client::OpenOutcome::Started { .. }));
|
||||
|
||||
let sent = client.send_probe().unwrap();
|
||||
assert_eq!(sent.len(), 1);
|
||||
|
||||
let events = client.recv_once().unwrap();
|
||||
assert_eq!(events.len(), 1);
|
||||
assert!(matches!(events[0], ClientEvent::EchoReply { .. }));
|
||||
|
||||
client.close(ClientTimestamp::now()).unwrap();
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn dscp_configured_open_close_smoke() {
|
||||
let mut params = default_params();
|
||||
|
||||
Reference in new issue
Block a user