---
title: getMediumWithIndex
framework: kernel
role: pseudoSymbol
path: kernel/ionetworkmedium/1810208-getmediumwithindex
---

# getMediumWithIndex

Finds a medium object from a dictionary with a given index.

## Declaration

```occ
static IONetworkMedium * getMediumWithIndex(
 const OSDictionary *dict, 
 UInt32 index, 
 UInt32 mask = 0); 
```

## Parameters

- `dict`: The dictionary to look for a matching entry.
- `index`: Search for an entry with the given index.
- `mask`: The don't care bits in index. Defaults to 0, which implies that a perfect match is desired.

## Return Value

Return Value Returns the first matching IONetworkMedium entry found, or 0 if no match was found.

## Overview

Overview This method iterates through a dictionary and returns an IONetworkMedium entry with the given index. An optional mask supplies the don't care bits.

## See Also

### Miscellaneous

- [addMedium](kernel/ionetworkmedium/1810064-addmedium.md)
- [free](kernel/ionetworkmedium/1810085-free.md)
- [getFlags](kernel/ionetworkmedium/1810101-getflags.md)
- [getIndex](kernel/ionetworkmedium/1810123-getindex.md)
- [getKey](kernel/ionetworkmedium/1810155-getkey.md)
- [getMediumWithType](kernel/ionetworkmedium/1810258-getmediumwithtype.md)
- [getName](kernel/ionetworkmedium/1810301-getname.md)
- [getSpeed](kernel/ionetworkmedium/1810359-getspeed.md)
- [getType](kernel/ionetworkmedium/1810404-gettype.md)
- [init](kernel/ionetworkmedium/1810453-init.md)
- [isEqualTo(const IONetworkMedium *)](kernel/ionetworkmedium/1810500-isequalto.md)
- [isEqualTo(const OSMetaClassBase *)](kernel/ionetworkmedium/1810544-isequalto.md)
- [medium](kernel/ionetworkmedium/1810580-medium.md)
- [nameForType](kernel/ionetworkmedium/1810627-namefortype.md)
- [removeMedium](kernel/ionetworkmedium/1810658-removemedium.md)
- [serialize](kernel/ionetworkmedium/1810690-serialize.md)
