Lines Matching refs:capi
48 from .. import capi as core_capi
49 from . import capi as capi unknown
126 link = capi.rtnl_link_get(self._nl_cache, key)
128 link = capi.rtnl_link_get_by_name(self._nl_cache, key)
166 return cls(capi.link2obj(obj))
170 return capi.obj2link(obj)
186 return capi.rtnl_link_get_ifindex(self._rtnl_link)
190 capi.rtnl_link_set_ifindex(self._rtnl_link, int(value))
194 if capi.rtnl_link_get_ifindex(self._orig) == 0:
195 capi.rtnl_link_set_ifindex(self._orig, int(value))
201 return capi.rtnl_link_get_name(self._rtnl_link)
205 capi.rtnl_link_set_name(self._rtnl_link, value)
211 if capi.rtnl_link_get_name(self._orig) is None:
212 capi.rtnl_link_set_name(self._orig, value)
225 flags = capi.rtnl_link_get_flags(self._rtnl_link)
226 return capi.rtnl_link_flags2str(flags, 256)[0].split(',')
230 i = capi.rtnl_link_str2flags(flag[1:])
231 capi.rtnl_link_unset_flags(self._rtnl_link, i)
233 i = capi.rtnl_link_str2flags(flag[1:])
234 capi.rtnl_link_set_flags(self._rtnl_link, i)
236 i = capi.rtnl_link_str2flags(flag)
237 capi.rtnl_link_set_flags(self._rtnl_link, i)
251 return capi.rtnl_link_get_mtu(self._rtnl_link)
255 capi.rtnl_link_set_mtu(self._rtnl_link, int(value))
261 return capi.rtnl_link_get_family(self._rtnl_link)
265 capi.rtnl_link_set_family(self._rtnl_link, value)
271 a = capi.rtnl_link_get_addr(self._rtnl_link)
276 capi.rtnl_link_set_addr(self._rtnl_link, value._addr)
282 a = capi.rtnl_link_get_broadcast(self._rtnl_link)
287 capi.rtnl_link_set_broadcast(self._rtnl_link, value._addr)
293 return capi.rtnl_link_get_qdisc(self._rtnl_link)
297 capi.rtnl_link_set_qdisc(self._rtnl_link, value)
303 return capi.rtnl_link_get_txqlen(self._rtnl_link)
307 capi.rtnl_link_set_txqlen(self._rtnl_link, int(value))
313 type_ = capi.rtnl_link_get_arptype(self._rtnl_link)
319 capi.rtnl_link_set_arptype(self._rtnl_link, i)
325 operstate = capi.rtnl_link_get_operstate(self._rtnl_link)
326 return capi.rtnl_link_operstate2str(operstate, 32)[0]
330 i = capi.rtnl_link_str2operstate(value)
331 capi.rtnl_link_set_operstate(self._rtnl_link, i)
337 mode = capi.rtnl_link_get_linkmode(self._rtnl_link)
338 return capi.rtnl_link_mode2str(mode, 32)[0]
342 i = capi.rtnl_link_str2mode(value)
343 capi.rtnl_link_set_linkmode(self._rtnl_link, i)
349 return capi.rtnl_link_get_ifalias(self._rtnl_link)
353 capi.rtnl_link_set_ifalias(self._rtnl_link, value)
359 return capi.rtnl_link_get_type(self._rtnl_link)
363 if capi.rtnl_link_set_type(self._rtnl_link, value) < 0:
371 stat = capi.rtnl_link_str2stat(stat)
375 return capi.rtnl_link_get_stat(self._rtnl_link, stat)
381 return capi.rtnl_link_enslave(sock._sock, self._rtnl_link, slave._rtnl_link)
387 return capi.rtnl_link_release(sock._sock, self._rtnl_link, slave._rtnl_link)
396 ret = capi.rtnl_link_add(sock._sock, self._rtnl_link, flags)
407 ret = capi.rtnl_link_change(sock._sock, self._orig, self._rtnl_link, flags)
416 ret = capi.rtnl_link_delete(sock._sock, self._rtnl_link)
541 link = capi.get_from_kernel(sock._sock, 0, name)