blob: ae9d89f7ae67f1773d678d8a028c69308a889da9 [file] [log] [blame]
Umesh Krishnaswamy345ee992012-12-13 20:29:48 -08001package net.floodlightcontroller.firewall;
2
3import java.util.List;
4import java.util.Map;
5
6import net.floodlightcontroller.core.module.IFloodlightService;
7
8public 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}