summaryrefslogtreecommitdiff
path: root/python/doc/route_addr.rst
diff options
context:
space:
mode:
authorThomas Graf <tgraf@suug.ch>2011-05-10 12:17:33 +0200
committerThomas Graf <tgraf@suug.ch>2011-05-10 12:17:33 +0200
commitf443be6e744ac9be2ad48bd59432d5c2215d4e51 (patch)
treef3d6920634ddeee7eef6c2a39f50a90f79698c5d /python/doc/route_addr.rst
parent023c66232704a5afe7c0e9e675b389649ea70bd4 (diff)
downloadlibnl-f443be6e744ac9be2ad48bd59432d5c2215d4e51.tar.gz
python interface to netlink protocols
currently includes experimental support for links, addresses and some traffic control
Diffstat (limited to 'python/doc/route_addr.rst')
-rw-r--r--python/doc/route_addr.rst47
1 files changed, 47 insertions, 0 deletions
diff --git a/python/doc/route_addr.rst b/python/doc/route_addr.rst
new file mode 100644
index 0000000..2cfe139
--- /dev/null
+++ b/python/doc/route_addr.rst
@@ -0,0 +1,47 @@
+=================
+Network Addresses
+=================
+
+The **Address** module provides access to the network address configuration
+of the kernel. It provides an interface to fetch all configured addresses,
+add new addresses and to delete existing addresses.
+
+Fetching the list of network addresses is achieved by creating a new
+address cache::
+
+ import netlink.route.address as Address
+
+ addr_cache = Address.AddressCache()
+ addr_cache.refill()
+
+ for addr in addr_cache:
+ print addr
+
+.. py:module:: netlink.route.addr
+
+
+AddressCache
+------------
+
+.. py:class:: AddressCache
+
+ Represents a cache containing all or a subset of network addresses.
+
+ .. py:method:: lookup(ifindex, local)
+
+ Lookup the address which matches ifindex and local address
+
+ :raises: KeyError if address is not found.
+
+Address
+-------
+
+.. py:class:: Address
+
+ Representation of a configured network address.
+
+ .. py:attribute:: ifindex
+
+ Interface index
+
+ :rtype: int