コード例 #1
0
ファイル: RuleBuilder.cs プロジェクト: splitice/YFW.Net
 public RuleBuilder(IpTablesSystem system, String nfbpf, Dictionary<int, IpTablesRuleSet> ruleSets, FunctionRegistry functions = null)
 {
     if (functions == null)
     {
         functions = new FunctionRegistry();
     }
     _system = system.System;
     _nfbpf = nfbpf;
     var chainsDict =
         ruleSets.Select((a) => new KeyValuePair<int, IpTablesChainSet>(a.Key, a.Value.Chains))
             .ToDictionary((a) => a.Key, (a) => a.Value);
     _dcr = new DynamicChainRegister(system, chainsDict);
     _formatDb = new DynamicDictionary<object>(_mappings);
     _ruleSets = ruleSets;
     _interpreter = new Interpreter();
     _interpreter.SetVariable("var", _mappings);
     functions.LoadFunctions(_interpreter);
 }
コード例 #2
0
ファイル: Program.cs プロジェクト: splitice/IPACL.Sync.Net
 public Program(IAclProvider aclProvider)
 {
     _aclProvider = aclProvider;
     ISystemFactory system = new LocalFactory();
     _system = new IpTablesSystem(system, new IPTablesBinaryAdapter(), new IpSetBinaryAdapter(system));
 }
コード例 #3
0
 public DynamicChainRegister(IpTablesSystem system, Dictionary<int,IpTablesChainSet> chains)
 {
     _system = system;
     _chains = chains;
 }
コード例 #4
0
ファイル: ModelLoad.cs プロジェクト: splitice/YFW.Net
 public ModelLoad(IpTablesSystem iptables, Dictionary<int, IpTablesRuleSet> ruleSets, IpSetSets sets)
 {
     _iptables = iptables;
     _ruleSets = ruleSets;
     _sets = sets;
 }