<--previous | contents | next-->

# IFConfig class

All functionality exposed by the ifconfig module is accessed through an instance of the IFConfig class. This class acts as a dictionary that "contains" the list of network interfaces. Each interface is an instance of the Interface class, which is discussed in the next section.

## Interface

### IFConfig()

The IFConfig class requires no instantiation parameters.

### __getitem__(ifname)

Retrieve an interface of a given name. This special method also allows an interface object to be treated as a dictionary, the keys of which are interface names.

### has_key(ifname)

Does an interface with the name ifname exist.

### keys()

Retrieve a list of interfaces.

### create(ifname)

Create an interface with name ifname.

### destroy(ifname)

Destroy the interface with name ifname.

<--previous | contents | next--> | (12/21/04)

PyOpenbsd v0.1 Manual