コード例 #1
0
ファイル: SdnatModule.cs プロジェクト: pvkovalev/IPTables.Net
        public int Feed(CommandParser parser, bool not)
        {
            switch (parser.GetCurrentArg())
            {
            case OptionToSource:
                ToSource = IPPortOrRange.Parse(parser.GetNextArg());
                return(1);

            case OptionToDestination:
                ToDestination = IPPortOrRange.Parse(parser.GetNextArg());
                return(1);

            case OptionRandom:
                Random = true;
                return(0);

            case OptionPersisent:
                Persistent = true;
                return(0);

            case OptionCtMark:
                CtMark = FlexibleUInt32.Parse(parser.GetNextArg());
                return(1);

            case OptionCtMask:
                CtMask = FlexibleUInt32.Parse(parser.GetNextArg());
                return(1);
            }

            return(0);
        }
コード例 #2
0
ファイル: SnatModule.cs プロジェクト: pvkovalev/IPTables.Net
        public int Feed(CommandParser parser, bool not)
        {
            switch (parser.GetCurrentArg())
            {
            case OptionToSource:
                ToSource = IPPortOrRange.Parse(parser.GetNextArg());
                return(1);

            case OptionRandom:
                Random = true;
                return(0);

            case OptionPersisent:
                Persistent = true;
                return(0);
            }

            return(0);
        }
コード例 #3
0
        int IIpTablesModuleInternal.Feed(RuleParser parser, bool not)
        {
            switch (parser.GetCurrentArg())
            {
            case OptionToDestination:
                ToDestination = IPPortOrRange.Parse(parser.GetNextArg());
                return(1);

            case OptionRandom:
                Random = true;
                return(0);

            case OptionPersisent:
                Persistent = true;
                return(0);
            }

            return(0);
        }