Example #1
0
            public apply_result apply(TopPipe_Args TopPipe_Args)
            {
                apply_result result;
                ActionBase   RA = lookup?[TopPipe_Args.outCtrl.outputPort];

                if (RA == null)
                {
                    result = new apply_result(false, default_action.Action);
                    RA     = default_action;
                }
                else
                {
                    result = new apply_result(true, RA.Action);
                }
                RA.OnApply(TopPipe_Args);
                return(result);
            }
Example #2
0
            public apply_result apply(TopPipe_Args TopPipe_Args)
            {
                apply_result result;
                ActionBase   RA = lookup?[TopPipe_Args.headers.ip.dstAddr];

                if (RA == null)
                {
                    result = new apply_result(false, default_action.Action);
                    RA     = default_action;
                }
                else
                {
                    result = new apply_result(true, RA.Action);
                }
                RA.OnApply(TopPipe_Args);
                return(result);
            }
Example #3
0
                public apply_result apply(TopPipe_Args args)
                {
                    apply_result result;

                    ActionBase RA = table.Lookup(args.outCtrl.outputPort);

                    if (RA == null)
                    {
                        result = new apply_result(false, default_action.Action);
                    }
                    else
                    {
                        result = new apply_result(true, RA.Action);
                    }
                    //evaluate_and_copy_in_RA_args(RA);
                    //execute(RA);
                    //copy_out_RA_args(RA);
                    //copy_out_table_args(args);
                    RA.OnApply(args);
                    return(result);
                }
Example #4
0
                public apply_result apply(TopPipe_Args args, ref IPv4Address nextHop)
                {
                    // FIXME sort out copy-semantics for args

                    apply_result result;

                    // Would chain lookups here if multiple fields
                    ActionBase RA = table.Lookup(args.headers.ip.dstAddr);

                    if (RA == null)
                    {
                        result = new apply_result(false, default_action.Action);
                    }
                    else
                    {
                        result = new apply_result(true, RA.Action);
                    }
                    //evaluate_and_copy_in_RA_args(RA);
                    //execute(RA);
                    //copy_out_RA_args(RA);
                    //copy_out_table_args(args);
                    RA.OnApply(args, ref nextHop);
                    return(result);
                }