public override int Parse(ScreenOSCommand command, int baseParamIndex)
        {
            base.Parse(command, baseParamIndex);

            Protocol     = command.GetParam(baseParamIndex);
            ProtocolType = ProtocolTypeEnum.Sun_rpc;
            baseParamIndex++;

            if (command.GetParam(baseParamIndex) == "program")
            {
                string[] commandString = command.GetParam(baseParamIndex + 1).Split('-');
                if (commandString.Length == 2)
                {
                    ProgramStart = commandString[0];
                    if (int.Parse(ProgramStart) < _minProgram)
                    {
                        ProgramStart = _minProgram.ToString();
                    }
                    ProgramEnd = commandString[1];
                    if (int.Parse(ProgramEnd) > _maxProgram)
                    {
                        ProgramEnd = _maxProgram.ToString();
                    }

                    if (ProgramStart != ProgramEnd)
                    {
                        ConversionIncidentMessage = "ScreenOS SUN-RPC service object with program range is not supported in Check Point. Using only first program number in range";
                    }
                }
            }

            return(baseParamIndex + 2);
        }
        public override int Parse(ScreenOSCommand command, int baseParamIndex)
        {
            base.Parse(command, baseParamIndex);

            /* Get Ip protocol id if exist*/
            ProtocolType = ProtocolTypeEnum.Ip;
            Protocol     = command.GetParam(baseParamIndex);
            baseParamIndex++;

            /* Source port range*/
            if (command.GetParam(baseParamIndex) == "src-port")
            {
                string[] stringCommand = command.GetParam(baseParamIndex + 1).Split('-');
                SrcPortStart = int.Parse(stringCommand[0]);
                SrcPortEnd   = int.Parse(stringCommand[1]);
            }

            /* Destination port range*/
            if (command.GetParam(baseParamIndex + 2) == "dst-port")
            {
                string[] stringCommand = command.GetParam(baseParamIndex + 3).Split('-');
                DestPortStart = int.Parse(stringCommand[0]);
                DestPortEnd   = int.Parse(stringCommand[1]);
            }

            return(baseParamIndex + 4);
        }
        public override int Parse(ScreenOSCommand command, int baseParamIndex)
        {
            base.Parse(command, baseParamIndex);

            Protocol     = command.GetParam(baseParamIndex);
            ProtocolType = ProtocolTypeEnum.Ms_rpc;
            baseParamIndex++;

            if (command.GetParam(baseParamIndex) == "uuid")
            {
                Uuid = command.GetParam(baseParamIndex + 1);
            }

            return(baseParamIndex + 2);
        }
        public override int Parse(ScreenOSCommand command, int baseParamIndex)
        {
            base.Parse(command, baseParamIndex);

            ProtocolType = ProtocolTypeEnum.Icmp;
            Protocol     = command.GetParam(baseParamIndex);
            baseParamIndex++;

            /* Type*/
            if (command.GetParam(baseParamIndex) == "type")
            {
                IcmpType = byte.Parse(command.GetParam(baseParamIndex + 1));
            }

            /* Code*/
            if (command.GetParam(baseParamIndex + 2) == "code")
            {
                IcmpCode = byte.Parse(command.GetParam(baseParamIndex + 3));
            }

            return(baseParamIndex + 4);
        }