Пример #1
0
    def __init__(self, mode=IPQ_COPY_PACKET):
        nl_socket.__init__(self, family=NETLINK_FIREWALL)

        msg = ipq_peer_msg()
        msg.hdr.type = IPQM_MODE
        msg.hdr.flags = NLM_F_REQUEST
        msg.data.mode.value = mode
        msg.data.mode.range = IPQ_MAX_PAYLOAD

        self.send(msg)
Пример #2
0
 def __init__(self,groups = 0):
     nl_socket.__init__(self, family=NETLINK_ROUTE, groups=groups)