<!--
{
  "availability" : [
    "iOS: 12.0.0 -",
    "iPadOS: 12.0.0 -",
    "macCatalyst: 12.0.0 -",
    "macOS: 10.14.0 -",
    "tvOS: 12.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 5.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Network",
  "identifier" : "/documentation/Network/NWProtocolIP/Metadata",
  "metadataVersion" : "0.1.0",
  "role" : "Class",
  "symbol" : {
    "kind" : "Class",
    "modules" : [
      "Network"
    ],
    "preciseIdentifier" : "s:7Network12NWProtocolIPC8MetadataC"
  },
  "title" : "NWProtocolIP.Metadata"
}
-->

# NWProtocolIP.Metadata

Per-packet IP metadata you configure when sending and receiving packets.

```
class Metadata
```

## Topics

### Sending IP Options

[`init()`](/documentation/Network/NWProtocolIP/Metadata/init())

Initializes an IP packet configuration with default settings.

[`ecn`](/documentation/Network/NWProtocolIP/Metadata/ecn)

A specific Explicit Congestion Notification flag value to set on an IP packet.

[`ECN`](/documentation/Network/NWProtocolIP/ECN)

Flag values for Explicit Congestion Notifications in IP packets.

[`serviceClass`](/documentation/Network/NWProtocolIP/Metadata/serviceClass)

A specific service class to mark on an IP packet.

### Receiving IP Packets

[`receiveTime`](/documentation/Network/NWProtocolIP/Metadata/receiveTime)

The time at which a packet was received, in nanoseconds, based on `CLOCK_MONOTONIC_RAW`.

## Relationships

### Conforms To

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

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

### Inherits From

[`NWProtocolMetadata`](/documentation/Network/NWProtocolMetadata)

---

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)