---
title: getNamePrefix
framework: kernel
role: pseudoSymbol
path: kernel/ioethernetinterface/1810711-getnameprefix
---

# getNamePrefix

Returns a string containing the prefix to use when creating a BSD name for this interface.

## Declaration

```occ
virtual const char * getNamePrefix() const; 
```

## Return Value

Return Value Returns a pointer to a constant C string "en". Therefore, Ethernet interfaces will be registered with BSD as en0, en1, etc.

## Overview

Overview The BSD name for each interface object is created by concatenating a string returned by this method, with an unique unit number assigned by IONetworkStack.

## See Also

### Miscellaneous

- [controllerDidChangePowerState](kernel/ioethernetinterface/1810626-controllerdidchangepowerstate.md)
- [controllerDidOpen](kernel/ioethernetinterface/1810636-controllerdidopen.md)
- [controllerWillChangePowerState](kernel/ioethernetinterface/1810670-controllerwillchangepowerstate.md)
- [controllerWillClose](kernel/ioethernetinterface/1810684-controllerwillclose.md)
- [free](kernel/ioethernetinterface/1810696-free.md)
- [init](kernel/ioethernetinterface/1810722-init.md)
- [performCommand](kernel/ioethernetinterface/1810736-performcommand.md)
