<!--
{
  "availability" : [
    "DriverKit: -",
    "iOS: -",
    "iPadOS: -",
    "macOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "DriverKit",
  "identifier" : "/documentation/DriverKit/IOReporter/addChannel",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "DriverKit"
    ],
    "preciseIdentifier" : "c:@S@IOReporter@F@addChannel#k#*1C#"
  },
  "title" : "addChannel"
}
-->

# addChannel

Add an additional, similar channel to the reporter.

```
IOReturn addChannel(uint64_t channelID, const char *channelName);
```

## Parameters

`channelID`

Identifier for the channel to be added.

`channelName`

An optional human-readble name for the channel.

## Return Value

Appropriate `IOReturn` code.

## Discussion

The reporter will allocate memory to track a new channel with the
provided ID and name (if any). Its other traits (type, etc) will
be those provided when the reporter was initialized.  If no channel
name is provided and the channelID consists solely of ASCII bytes,
those bytes (ignoring any NUL bytes) will be used as the
human-readable channel name in user space.  The `IOREPORT_MAKEID()`
macro in `IOReportTypes.h` can be used to create ASCII channel IDs.

Locking: same-instance concurrency SAFE, MAY BLOCK

---

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)