Arend van Spriel
2d55872fb1
use Callback object constructing Socket
...
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Thomas Graf <tgraf@suug.ch>
2013-09-05 17:46:00 +02:00
Arend van Spriel
86207d47ab
python: rework netlink callback handling
...
The initial commit adding netlink callback handling also introduced
memory leak issue. The python callback info was stored in an allocated
structure, but that was never freed.
Only exposing nl_cb_alloc() as is. nl_cb_get() is removed as it is
not very useful to use reference counting mechanism. Python uses
that itself internally. To deal properly with Python callback info
the function nl_cb_put() and nl_cb_clone() have a custom wrapper
taking care of Python reference counting.
This commit also adds a Callback python class using the netlink
callback functions.
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Thomas Graf <tgraf@suug.ch>
2013-09-05 17:46:00 +02:00
Коренберг Марк
ffa461d37c
Fixed memory leak in Cache destructor
...
destructor of Cache was missing due to typo
2012-06-08 22:26:35 +06:00
Коренберг Марк
87d370912c
netlink.nlattr re-implemented in more pythonic way
2012-06-08 22:26:35 +06:00
Коренберг Марк (ноутбук дома)
08e8b35d9f
Remove unnecessary comments
2012-06-08 22:26:35 +06:00
Коренберг Марк (ноутбук дома)
482c602b74
Refine some places
...
No real logick change
2012-06-08 22:26:35 +06:00
Коренберг Марк (ноутбук дома)
454ea4a5b4
pylint's first review and trivial fixes
2012-06-08 22:26:35 +06:00
Коренберг Марк (ноутбук дома)
8959d95e22
Using only single quotes now and multi-line lists
...
Nothing algorithmic changed really, just cosmetics
2012-06-08 22:26:35 +06:00
Коренберг Марк (ноутбук дома)
83f06bfbb8
Fix indentation (spaces vs tabs)
...
Now, python files use pseudo-tab equal 4 spaces
2012-06-08 22:26:35 +06:00
Коренберг Марк (ноутбук дома)
fb890a5b5e
Code cleanups
...
1. unused "import struct" removed
2. AddressFamily.__len__ is defined, but why in so way? removed.
3. comparison against instancemethod type fixed
2012-06-08 22:26:35 +06:00
Коренберг Марк (ноутбук дома)
38fefc5c1b
Fixed various str-related logick
2012-06-08 22:26:35 +06:00
Коренберг Марк (ноутбук дома)
b369d22f92
Fix whitespaces at EOL
...
Make git happy with that
2012-06-08 22:26:35 +06:00
Коренберг Марк (ноутбук дома)
4be1ae2ae2
Introduce Python's absolute_imports
...
Helps greatly when porting to Python 3
2012-06-08 22:26:35 +06:00
Thomas Graf
e56eb065b2
Work on libnl-python
...
Changes too numerous to describe them
2011-06-10 13:55:29 +02:00
Thomas Graf
f443be6e74
python interface to netlink protocols
...
currently includes experimental support for links, addresses
and some traffic control
2011-05-10 12:17:33 +02:00