]> granicus.if.org Git - libnl/commitdiff
add python module for generic netlink library
authorArend van Spriel <arend@broadcom.com>
Mon, 15 Jul 2013 10:09:12 +0000 (12:09 +0200)
committerThomas Graf <tgraf@suug.ch>
Thu, 18 Jul 2013 21:22:18 +0000 (23:22 +0200)
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>
configure.ac
python/netlink/Makefile.am
python/netlink/genl/Makefile.am [new file with mode: 0644]
python/netlink/genl/__init__.py [new file with mode: 0644]
python/netlink/genl/capi.i [new file with mode: 0644]
python/setup.py.in

index 34e8c9fdfe9ff1d095bc9366351bfee55c5120d3..46b216bc7c976f7c390b6099cd70f2921ad3651a 100644 (file)
@@ -132,6 +132,7 @@ man/Makefile
 python/Makefile
 python/setup.py
 python/netlink/Makefile
+python/netlink/genl/Makefile
 python/netlink/route/Makefile
 include/netlink/version.h
 ])
index 0f1045b463f5f2a386c8fd691b189e7dab0b3556..246fbf65de7ad9b1ce381d3f6b42ef168b022148 100644 (file)
@@ -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 (file)
index 0000000..9e30904
--- /dev/null
@@ -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 (file)
index 0000000..e69de29
diff --git a/python/netlink/genl/capi.i b/python/netlink/genl/capi.i
new file mode 100644 (file)
index 0000000..229184b
--- /dev/null
@@ -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>
+
index 7ba90d76872f31c9dff47f17c6c15954061906df..813dfc99ee0acbc552131586ee391e88d6bdd237 100644 (file)
@@ -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'],
      )