public static string ToString(int off) { string ret = ""; bool all = true; FilterItem FItem = (FilterItem)FilterList[off]; if (FItem.mode) { ret += "Allow "; } else { ret += "Deny "; } if (FItem.protocol != "") { ret += "Protocol :" + FItem.protocol; all = false; } if (FItem.SourceAddress != "") { ret += "Source Address : " + FItem.SourceAddress + " "; all = false; } if (FItem.SourcePort != -1) { ret += "Source Port : " + FItem.SourcePort + " "; all = false; } if (FItem.DestinationAddress != "") { ret += "Destination Address : " + FItem.DestinationAddress + " "; all = false; } if (FItem.DestinationPort != -1) { ret += "Destination Port : " + FItem.DestinationPort + " "; all = false; } if (all) { ret += "All"; } return(ret); }
public static void removeFilter(FilterItem FItem) { FilterList.Remove(FItem); }
public static void addFilter(FilterItem FItem) { FilterList.Add(FItem); }