<!--
{
  "availability" : [
    "macOS: 10.15.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "NetworkExtension",
  "identifier" : "/documentation/NetworkExtension/NENetworkRule/Protocol",
  "metadataVersion" : "0.1.0",
  "role" : "Enumeration",
  "symbol" : {
    "kind" : "Enumeration",
    "modules" : [
      "Network Extension",
      "NetworkExtension"
    ],
    "preciseIdentifier" : "c:@E@NENetworkRuleProtocol"
  },
  "title" : "NENetworkRule.Protocol"
}
-->

# NENetworkRule.Protocol

A type to represent network protocols used by routing rules.

```
enum `Protocol`
```

## Topics

### Protocols

[`NENetworkRuleProtocolTCP`](/documentation/NetworkExtension/NENetworkRule/Protocol/TCP)

A rule protocol to match TCP traffic.

[`NENetworkRuleProtocolUDP`](/documentation/NetworkExtension/NENetworkRule/Protocol/UDP)

A rule protocol to match UDP traffic.

[`NENetworkRuleProtocolAny`](/documentation/NetworkExtension/NENetworkRule/Protocol/any)

A rule protocol to match TCP and UDP traffic.

## Relationships

### Conforms To

[`SendableMetatype`](/documentation/Swift/SendableMetatype)

[`RawRepresentable`](/documentation/Swift/RawRepresentable)

[`Sendable`](/documentation/Swift/Sendable)

[`BitwiseCopyable`](/documentation/Swift/BitwiseCopyable)

[`Equatable`](/documentation/Swift/Equatable)

[`Hashable`](/documentation/Swift/Hashable)

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)