libnl/python/netlink
Arend van Spriel 522cf98fc2 python: allow callback function to be a class method
The callback functionality only worked for regular Python
functions. With this patch it also allows the callback
to be a class method (bounded or unbounded) as show in
example below.

class test_class(object):
	def my_callback(self, msg, arg):
		print('handling %s' % str(msg))

s = netlink.core.Socket()
testobj = test_class()
netlink.capi.py_nl_cb_set(cb, netlink.capi.NL_CB_VALID,
			  netlink.capi.NL_CB_CUSTOM,
			  test_class.my_callback, testobj)
netlink.capi.py_nl_cb_err(cb, netlink.capi.NL_CB_CUSTOM,
                          test_class.my_callback, s)

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
..
genl add generic netlink functions to swig 2013-07-18 23:22:18 +02:00
route Add VXLAN support. 2013-08-04 15:43:54 +09:00
__init__.py python interface to netlink protocols 2011-05-10 12:17:33 +02:00
capi.i python: allow callback function to be a class method 2013-09-05 17:46:00 +02:00
core.py use Callback object constructing Socket 2013-09-05 17:46:00 +02:00
fixes.h python interface to netlink protocols 2011-05-10 12:17:33 +02:00
Makefile.am add python module for generic netlink library 2013-07-18 23:22:18 +02:00
util.py netlink.nlattr re-implemented in more pythonic way 2012-06-08 22:26:35 +06:00
utils.h python: rework netlink callback handling 2013-09-05 17:46:00 +02:00