<!--
{
  "availability" : [
    "*: -",
    "DriverKit: -"
  ],
  "documentType" : "symbol",
  "framework" : "NetworkingDriverKit",
  "identifier" : "/documentation/NetworkingDriverKit/IOUserNetworkEthernet/SelectMediaType",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "NetworkingDriverKit"
    ],
    "preciseIdentifier" : "c:@S@IOUserNetworkEthernet@F@SelectMediaType#i#"
  },
  "title" : "SelectMediaType"
}
-->

# SelectMediaType

Selects the media type to use when communicating with the network stack.

```
virtual kern_return_t SelectMediaType(IOUserNetworkMediaType mediaType);
```

## Parameters

`mediaType`

The media type to use for network communication. This type must be one that you declared previous when calling the [`ReportAvailableMediaTypes`](/documentation/NetworkingDriverKit/IOUserNetworkEthernet/ReportAvailableMediaTypes) method.

## Return Value

`kIOReturnSuccess` on success, or another value if an error occurred.

## Discussion

Override this method and use it to configure your driver for the specified media type. In your implementation, validate the requested media type and make any adjustments as needed. For example, if the `mediaType` parameter is [`kIOUserNetworkMediaEthernetAuto`](/documentation/NetworkingDriverKit/kIOUserNetworkMediaEthernetAuto), you might choose an explicit media type instead. After validating the type, configure your driver for that type and call the [`ReportLinkStatus`](/documentation/NetworkingDriverKit/IOUserNetworkEthernet/ReportLinkStatus-5cxiq) method to report the driver’s status back to the system.

---

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)