예제 #1
0
        public INetfilterChain GetChain(INetfilterAdapterClient client, string table, string chain)
        {
            INetfilterChainSet tableRules = GetRules(client, table);

            if (tableRules == null)
            {
                throw new IpTablesNetException("Unable to get a chainset for table: " + table);
            }
            return(tableRules.GetChainOrDefault(chain, table));
        }
예제 #2
0
        public INetfilterChain GetChain(string table, string chain, int ipVersion)
        {
            INetfilterChainSet tableRules = GetRules(table, ipVersion);

            if (tableRules == null)
            {
                throw new IpTablesNetException("Unable to get a chainset for table: " + table);
            }
            return(tableRules.GetChainOrDefault(chain, table));
        }