MCPcopy Create free account
hub / github.com/PowerShell/DSC / protocol_supports_ports

Function protocol_supports_ports

resources/windows_firewall/src/firewall.rs:248–250  ·  view source on GitHub ↗
(protocol: i32)

Source from the content-addressed store, hash-verified

246}
247
248fn protocol_supports_ports(protocol: i32) -> bool {
249 protocol == NET_FW_IP_PROTOCOL_TCP.0 || protocol == NET_FW_IP_PROTOCOL_UDP.0
250}
251
252fn validate_protocol(protocol: i32) -> Result<(), FirewallError> {
253 // IANA protocol numbers 0-255 plus the Windows-specific 256 (Any)

Callers 1

apply_rule_propertiesFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected