Umesh Krishnaswamy | 345ee99 | 2012-12-13 20:29:48 -0800 | [diff] [blame] | 1 | package net.floodlightcontroller.firewall; |
| 2 | |
| 3 | import java.util.List; |
| 4 | import java.util.Map; |
| 5 | |
| 6 | import net.floodlightcontroller.core.module.IFloodlightService; |
| 7 | |
| 8 | public interface IFirewallService extends IFloodlightService { |
| 9 | |
| 10 | /** |
| 11 | * Enables/disables the firewall. |
| 12 | * @param enable Whether to enable or disable the firewall. |
| 13 | */ |
| 14 | public void enableFirewall(boolean enable); |
| 15 | |
| 16 | /** |
| 17 | * Returns operational status of the firewall |
| 18 | * @return boolean enabled; |
| 19 | */ |
| 20 | public boolean isEnabled(); |
| 21 | |
| 22 | /** |
| 23 | * Returns all of the firewall rules |
| 24 | * @return List of all rules |
| 25 | */ |
| 26 | public List<FirewallRule> getRules(); |
| 27 | |
| 28 | /** |
| 29 | * Returns the subnet mask |
| 30 | * @return subnet mask |
| 31 | */ |
| 32 | public String getSubnetMask(); |
| 33 | |
| 34 | /** |
| 35 | * Sets the subnet mask |
| 36 | * @param newMask The new subnet mask |
| 37 | */ |
| 38 | public void setSubnetMask(String newMask); |
| 39 | |
| 40 | /** |
| 41 | * Returns all of the firewall rules in storage |
| 42 | * for debugging and unit-testing purposes |
| 43 | * @return List of all rules in storage |
| 44 | */ |
| 45 | public List<Map<String, Object>> getStorageRules(); |
| 46 | |
| 47 | /** |
| 48 | * Adds a new Firewall rule |
| 49 | */ |
| 50 | public void addRule(FirewallRule rule); |
| 51 | |
| 52 | /** |
| 53 | * Deletes a Firewall rule |
| 54 | */ |
| 55 | public void deleteRule(int ruleid); |
| 56 | } |