diff options
author | Arend van Spriel <arend@broadcom.com> | 2013-07-15 10:09:12 (GMT) |
---|---|---|
committer | Thomas Graf <tgraf@suug.ch> | 2013-07-18 21:22:18 (GMT) |
commit | 7dc033f5cce68481484dc59755f2a6bad6eef21e (patch) | |
tree | 7062363b0296bb3d5f200d3e9a937087d133df38 /python | |
parent | e77ea939c44b9d7241d00f8324f63294cc0279c0 (diff) | |
download | libnl-7dc033f5cce68481484dc59755f2a6bad6eef21e.zip libnl-7dc033f5cce68481484dc59755f2a6bad6eef21e.tar.gz libnl-7dc033f5cce68481484dc59755f2a6bad6eef21e.tar.bz2 |
add python module for generic netlink library
This commit adds creation of the netlink.genl package. The actual
capi.i will be filled in upcoming commits so the module is rather
dumb for now.
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Thomas Graf <tgraf@suug.ch>
Diffstat (limited to 'python')
-rw-r--r-- | python/netlink/Makefile.am | 2 | ||||
-rw-r--r-- | python/netlink/genl/Makefile.am | 5 | ||||
-rw-r--r-- | python/netlink/genl/__init__.py | 0 | ||||
-rw-r--r-- | python/netlink/genl/capi.i | 11 | ||||
-rw-r--r-- | python/setup.py.in | 13 |
5 files changed, 27 insertions, 4 deletions
diff --git a/python/netlink/Makefile.am b/python/netlink/Makefile.am index 0f1045b..246fbf6 100644 --- a/python/netlink/Makefile.am +++ b/python/netlink/Makefile.am @@ -1,6 +1,6 @@ # -*- Makefile -*- -SUBDIRS = route +SUBDIRS = route genl EXTRA_DIST = \ capi.i \ diff --git a/python/netlink/genl/Makefile.am b/python/netlink/genl/Makefile.am new file mode 100644 index 0000000..9e30904 --- /dev/null +++ b/python/netlink/genl/Makefile.am @@ -0,0 +1,5 @@ +# -*- Makefile -*- + +EXTRA_DIST = \ + capi.i \ + __init__.py diff --git a/python/netlink/genl/__init__.py b/python/netlink/genl/__init__.py new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/python/netlink/genl/__init__.py diff --git a/python/netlink/genl/capi.i b/python/netlink/genl/capi.i new file mode 100644 index 0000000..229184b --- /dev/null +++ b/python/netlink/genl/capi.i @@ -0,0 +1,11 @@ +%module capi +%{ +#include <netlink/genl/ctrl.h> +#include <netlink/genl/family.h> +#include <netlink/genl/genl.h> +#include <netlink/genl/mngt.h> +%} + +%include <stdint.i> +%include <cstring.i> + diff --git a/python/setup.py.in b/python/setup.py.in index 7ba90d7..813dfc9 100644 --- a/python/setup.py.in +++ b/python/setup.py.in @@ -19,12 +19,19 @@ route_capi = Extension('netlink/route/_capi', libraries = ['nl-3', 'nl-route-3'], ) +genl_capi = Extension('netlink/genl/_capi', + sources = ['netlink/genl/capi.i'], + include_dirs = include, + swig_opts = opts, + libraries = ['nl-3', 'nl-genl-3'], + ) + setup(name = 'netlink', version = '1.0', description = 'Python wrapper for netlink protocols', author = 'Thomas Graf', author_email = 'tgraf@suug.ch', - ext_modules = [netlink_capi, route_capi], - packages = ['netlink', 'netlink.route', 'netlink.route.links', - 'netlink.route.qdisc'], + ext_modules = [netlink_capi, route_capi, genl_capi], + packages = ['netlink', 'netlink.genl', 'netlink.route', + 'netlink.route.links', 'netlink.route.qdisc'], ) |