Modules in progress

There are several modules in the very initial development state, and the help with them will be particularly valuable. You are more than just welcome to help with:

IPSet module

The very basic ipset support.

Right now it is tested only for hash:ip and doesn’t support many useful options. But it can be easily extended, so you are welcome to help with that.

class pyroute2.ipset.IPSet(version=6, attr_revision=2, nfgen_family=2)

NFNetlink socket (family=NETLINK_NETFILTER).

Implements API to the ipset functionality.

add(name, entry, family=2)

Add a member to the ipset

create(name, stype='hash:ip', family=2)

Create an ipset name of type stype, by default hash:ip.

Very simple and stupid method, should be extended to support ipset options.

delete(name, entry, family=2)

Delete a member from the ipset


Destroy an ipset


List installed ipsets. If name is provided, list the named ipset or return an empty list.

It looks like nfnetlink doesn’t return an error, when requested ipset doesn’t exist.

swap(set_a, set_b)

Swap two ipsets

IW module

Experimental wireless module – nl80211 support.

In the very initial state.

Table Of Contents

Previous topic

netns utilities

Next topic

Modules layout

This Page