---
title: NEPacket
framework: networkextension
role: symbol
role_heading: Class
path: networkextension/nepacket
---

# NEPacket

A network packet and its associated properties.

## Declaration

```swift
class NEPacket
```

## Topics

### Initializing a packet

- [init(data:protocolFamily:)](networkextension/nepacket/init(data:protocolfamily:).md)

### Accessing packet properties

- [data](networkextension/nepacket/data.md)
- [metadata](networkextension/nepacket/metadata.md)
- [protocolFamily](networkextension/nepacket/protocolfamily.md)
- [direction](networkextension/nepacket/direction.md)
- [NETrafficDirection](networkextension/netrafficdirection.md)

## Relationships

### Inherits From

- [NSObject](objectivec/nsobject-swift.class.md)

### Conforms To

- [CVarArg](swift/cvararg.md)
- [CustomDebugStringConvertible](swift/customdebugstringconvertible.md)
- [CustomStringConvertible](swift/customstringconvertible.md)
- [Equatable](swift/equatable.md)
- [Hashable](swift/hashable.md)
- [NSCoding](foundation/nscoding.md)
- [NSCopying](foundation/nscopying.md)
- [NSObjectProtocol](objectivec/nsobjectprotocol.md)
- [NSSecureCoding](foundation/nssecurecoding.md)

## See Also

### Packet handling

- [NEPacketTunnelFlow](networkextension/nepackettunnelflow.md)
- [In-Provider Networking](networkextension/in-provider-networking.md)
