MCPcopy Create free account
hub / github.com/NVIDIA/OpenShell / canonical_ports

Function canonical_ports

crates/openshell-policy/src/merge.rs:620–628  ·  view source on GitHub ↗
(endpoint: &NetworkEndpoint)

Source from the content-addressed store, hash-verified

618}
619
620fn canonical_ports(endpoint: &NetworkEndpoint) -> Vec<u32> {
621 if !endpoint.ports.is_empty() {
622 endpoint.ports.clone()
623 } else if endpoint.port > 0 {
624 vec![endpoint.port]
625 } else {
626 vec![]
627 }
628}
629
630fn find_matching_endpoint_mut<'a>(
631 endpoints: &'a mut [NetworkEndpoint],

Callers 6

merge_endpointFunction · 0.85
merge_endpoint_portsFunction · 0.85
endpoints_overlapFunction · 0.85
normalize_endpointFunction · 0.85
remove_endpointFunction · 0.85

Calls 1

is_emptyMethod · 0.45

Tested by

no test coverage detected