diff options
author | Thomas Graf <tgraf@suug.ch> | 2011-07-21 15:52:43 (GMT) |
---|---|---|
committer | Thomas Graf <tgraf@suug.ch> | 2011-07-21 15:52:43 (GMT) |
commit | 20e979765249206f48ec5a9427f38123e7b8af29 (patch) | |
tree | c56d0f0417962539614e490d889033dbe2394469 /python | |
parent | bf1b5d28c01a5c21f2432fdb56ad69bbf19cd288 (diff) | |
download | libnl-20e979765249206f48ec5a9427f38123e7b8af29.zip libnl-20e979765249206f48ec5a9427f38123e7b8af29.tar.gz libnl-20e979765249206f48ec5a9427f38123e7b8af29.tar.bz2 |
use rtnl_link_set/get_type()
Diffstat (limited to 'python')
-rw-r--r-- | python/.gitignore | 2 | ||||
-rw-r--r-- | python/netlink/route/capi.i | 4 | ||||
-rw-r--r-- | python/netlink/route/link.py | 4 |
3 files changed, 6 insertions, 4 deletions
diff --git a/python/.gitignore b/python/.gitignore index 378eac2..9f3c73b 100644 --- a/python/.gitignore +++ b/python/.gitignore @@ -1 +1,3 @@ build +capi_wrap.c +capi.py diff --git a/python/netlink/route/capi.i b/python/netlink/route/capi.i index 204f93a..ae3592d 100644 --- a/python/netlink/route/capi.i +++ b/python/netlink/route/capi.i @@ -142,8 +142,8 @@ extern int rtnl_link_get_num_vf(struct rtnl_link *, uint32_t *); extern uint64_t rtnl_link_get_stat(struct rtnl_link *, int); extern int rtnl_link_set_stat(struct rtnl_link *, const unsigned int, const uint64_t); -extern int rtnl_link_set_info_type(struct rtnl_link *, const char *); -extern char *rtnl_link_get_info_type(struct rtnl_link *); +extern int rtnl_link_set_type(struct rtnl_link *, const char *); +extern char *rtnl_link_get_type(struct rtnl_link *); /* <netlink/route/link/vlan.h> */ diff --git a/python/netlink/route/link.py b/python/netlink/route/link.py index c4eb20c..e613f2e 100644 --- a/python/netlink/route/link.py +++ b/python/netlink/route/link.py @@ -386,11 +386,11 @@ class Link(netlink.Object): @property def type(self): """Link type""" - return capi.rtnl_link_get_info_type(self._rtnl_link) + return capi.rtnl_link_get_type(self._rtnl_link) @type.setter def type(self, value): - if capi.rtnl_link_set_info_type(self._rtnl_link, value) < 0: + if capi.rtnl_link_set_type(self._rtnl_link, value) < 0: raise NameError("unknown info type") self._module_lookup('netlink.route.links.' + value) |