mirror of
https://gitee.com/openharmony/third_party_libnl
synced 2024-12-04 09:13:33 +00:00
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:
parent
e77ea939c4
commit
7dc033f5cc
@ -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
|
||||
])
|
||||
|
@ -1,6 +1,6 @@
|
||||
# -*- Makefile -*-
|
||||
|
||||
SUBDIRS = route
|
||||
SUBDIRS = route genl
|
||||
|
||||
EXTRA_DIST = \
|
||||
capi.i \
|
||||
|
5
python/netlink/genl/Makefile.am
Normal file
5
python/netlink/genl/Makefile.am
Normal file
@ -0,0 +1,5 @@
|
||||
# -*- Makefile -*-
|
||||
|
||||
EXTRA_DIST = \
|
||||
capi.i \
|
||||
__init__.py
|
0
python/netlink/genl/__init__.py
Normal file
0
python/netlink/genl/__init__.py
Normal file
11
python/netlink/genl/capi.i
Normal file
11
python/netlink/genl/capi.i
Normal 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>
|
||||
|
@ -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'],
|
||||
)
|
||||
|
Loading…
Reference in New Issue
Block a user