Ejemplo n.º 1
0
        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);
        }
Ejemplo n.º 2
0
 public static void removeFilter(FilterItem FItem)
 {
     FilterList.Remove(FItem);
 }
Ejemplo n.º 3
0
 public static void addFilter(FilterItem FItem)
 {
     FilterList.Add(FItem);
 }