Lines Matching refs:Netlink

21 class Netlink:  class
102 self.type = self._type & ~Netlink.NLA_TYPE_MASK
199 if self.nl_type == Netlink.NLMSG_ERROR:
203 elif self.nl_type == Netlink.NLMSG_DONE:
208 if self.nl_flags & Netlink.NLM_F_ACK_TLVS and extack_off:
212 if extack.type == Netlink.NLMSGERR_ATTR_MSG:
214 elif extack.type == Netlink.NLMSGERR_ATTR_MISS_TYPE:
216 elif extack.type == Netlink.NLMSGERR_ATTR_MISS_NEST:
218 elif extack.type == Netlink.NLMSGERR_ATTR_OFFS:
279 with socket.socket(socket.AF_NETLINK, socket.SOCK_RAW, Netlink.NETLINK_GENERIC) as sock:
280 sock.setsockopt(Netlink.SOL_NETLINK, Netlink.NETLINK_CAP_ACK, 1)
282 msg = _genl_msg(Netlink.GENL_ID_CTRL,
283 Netlink.NLM_F_REQUEST | Netlink.NLM_F_ACK | Netlink.NLM_F_DUMP,
284 Netlink.CTRL_CMD_GETFAMILY, 1)
305 if attr.type == Netlink.CTRL_ATTR_FAMILY_ID:
307 elif attr.type == Netlink.CTRL_ATTR_FAMILY_NAME:
309 elif attr.type == Netlink.CTRL_ATTR_MAXATTR:
311 elif attr.type == Netlink.CTRL_ATTR_MCAST_GROUPS:
317 if entry_attr.type == Netlink.CTRL_ATTR_MCAST_GRP_NAME:
319 elif entry_attr.type == Netlink.CTRL_ATTR_MCAST_GRP_ID:
378 super().__init__(family_name, Netlink.NETLINK_GENERIC)
422 self.sock.setsockopt(Netlink.SOL_NETLINK, Netlink.NETLINK_CAP_ACK, 1)
423 self.sock.setsockopt(Netlink.SOL_NETLINK, Netlink.NETLINK_EXT_ACK, 1)
424 self.sock.setsockopt(Netlink.SOL_NETLINK, Netlink.NETLINK_GET_STRICT_CHK, 1)
441 self.sock.setsockopt(Netlink.SOL_NETLINK, Netlink.NETLINK_ADD_MEMBERSHIP,
451 nl_type |= Netlink.NLA_F_NESTED
664 nl_flags = Netlink.NLM_F_REQUEST | Netlink.NLM_F_ACK
668 nl_flags |= Netlink.NLM_F_DUMP