]> granicus.if.org Git - libnl/commitdiff
use rtnl_link_set/get_type()
authorThomas Graf <tgraf@suug.ch>
Thu, 21 Jul 2011 15:52:43 +0000 (17:52 +0200)
committerThomas Graf <tgraf@suug.ch>
Thu, 21 Jul 2011 15:52:43 +0000 (17:52 +0200)
python/.gitignore
python/netlink/route/capi.i
python/netlink/route/link.py

index 378eac25d311703f3f2cd456d8036da525cd0366..9f3c73bb9449658c4a149ed712639fb6fe8844a3 100644 (file)
@@ -1 +1,3 @@
 build
+capi_wrap.c
+capi.py
index 204f93a61880cfcaab93ca94b01246abdabbcab1..ae3592db78636622fa90df30be93ee6f0ab91c45 100644 (file)
@@ -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> */
 
index c4eb20cf4835fbd22dfbd051bb3876cfccb2ce27..e613f2e26cb8b8567589cdb04d41980fb1d23109 100644 (file)
@@ -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)