The networking_cisco.apps.saf.agent.iptables_driver
Module¶
-
class
networking_cisco.apps.saf.agent.iptables_driver.
IpMacPort
(ip, mac, port)¶ Bases:
object
This class keeps host rule information.
-
class
networking_cisco.apps.saf.agent.iptables_driver.
IptablesDriver
(cfg)¶ Bases:
object
This class provides API to update iptables rule.
-
add_rule_entry
(rule_info)¶ Add host data object to the rule_info list.
-
create_thread
()¶ Create a task to process event for updating iptables.
-
enqueue_event
(event)¶ Enqueue the given event.
The event contains host data (ip, mac, port) which will be used to update the spoofing rule for the host in the iptables.
-
process_rule_info
()¶ Task responsible for processing event queue.
-
remove_rule_entry
(rule_info)¶ Remove host data object from rule_info list.
-
update_ip_rule
(ip, mac)¶ Update a rule associated with given ip and mac.
-
update_iptables
()¶ Update iptables based on information in the rule_info.
-
update_rule_entry
(rule_info)¶ Update the rule_info list.
-