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>
This commit is contained in:
Arend van Spriel 2013-07-15 12:09:12 +02:00 committed by Thomas Graf
parent e77ea939c4
commit 7dc033f5cc
6 changed files with 28 additions and 4 deletions

View 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
])

View File

@ -1,6 +1,6 @@
# -*- Makefile -*-
SUBDIRS = route
SUBDIRS = route genl
EXTRA_DIST = \
capi.i \

View File

@ -0,0 +1,5 @@
# -*- Makefile -*-
EXTRA_DIST = \
capi.i \
__init__.py

View File

View File

@ -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>

View 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'],
)