Exemplo n.º 1
0
    def print_tree_view(self, dump_ctx, verbose, raw):
        print_dr(dr_print_color.DOMAIN, self.dump_str())
        inc_indent()
        if verbose > 1:
            if self.dev_attr:
                print_dr(dr_print_color.DOMAIN, self.dev_attr.dump_string())
            if self.caps:
                print_dr(dr_print_color.DOMAIN, self.caps.dump_string())
            if self.send_ring:
                print_dr(dr_print_color.DOMAIN, self.send_ring.dump_string())
        if verbose > 2:
            if len(self.flex_parsers) > 0:
                for f_p in self.flex_parsers:
                    print_dr(dr_print_color.DOMAIN, f_p.dump_string())
            if len(self.vports) > 0:
                for vport in self.vports:
                    print_dr(dr_print_color.DOMAIN, vport.dump_string())

        inc_indent()
        for t in self.table_list:
            dump_ctx.table = t
            dump_ctx.matcher = None
            dump_ctx.rule = None
            t.print_tree_view(dump_ctx, verbose, raw)

        dec_indent()
        dec_indent()
Exemplo n.º 2
0
    def print_tree_view(self, dump_ctx, verbose, raw):
        print_dr(dr_print_color.TABLE, self.dump_str(verbose))
        inc_indent()

        for m in self.matcher_list:
            dump_ctx.matcher = m
            dump_ctx.rule = None
            m.print_tree_view(dump_ctx, verbose, raw)

        dec_indent()
Exemplo n.º 3
0
    def print_tree_view(self, dump_ctx, verbose, raw):
        print_dr(dr_print_color.MATCHER, self.dump_str())
        inc_indent()
        print_dr(dr_print_color.MATCHER_MASK, self.mask.dump_str())
        dec_indent()

        inc_indent()
        for r in self.rule_list:
            dump_ctx.rule = None
            r.print_tree_view(dump_ctx, verbose, raw)
        dec_indent()
Exemplo n.º 4
0
    def print_rule_view(self, dump_ctx, verbose, raw):
        dmn_str = "domain %s, " % (_srd(dump_ctx.domain.data, "id"))
        tbl_str = "table %s, " % (_srd(dump_ctx.table.data, "id"))
        matcher_str = "matcher %s, " % (_srd(dump_ctx.matcher.data, "id"))

        print_dr(dr_print_color.DOMAIN, dmn_str)
        print_dr(dr_print_color.TABLE, tbl_str)
        print_dr(dr_print_color.MATCHER, matcher_str)
        print_dr(dr_print_color.RULE, self.dump_str())

        inc_indent()
        print_dr(dr_print_color.RULE_MATCH, self.dump_match_str(verbose, raw))
        print_dr(dr_print_color.RULE_ACTIONS, self.dump_actions_str(verbose))
        dec_indent()
Exemplo n.º 5
0
 def print_tree_view(self, dump_ctx, verbose, raw):
     print_dr(dr_print_color.RULE, self.dump_str())
     inc_indent()
     print_dr(dr_print_color.RULE_MATCH, self.dump_match_str(verbose, raw))
     print_dr(dr_print_color.RULE_ACTIONS, self.dump_actions_str(verbose))
     dec_indent()