[Xorp-hackers] [PATCH 00/15] Add new operators for changing metric in policy code

igorm at etf.rs igorm at etf.rs
Fri Aug 31 04:33:46 PDT 2012


From: Igor Maravic <igorm at etf.rs>

Hi,

As suggested by Phil, I've added new operators for changing metric in policy code.
New operators are *=, /=, <<=, >>=, &=, |= and ^=.

I didn't have the time to test it thouroughly, so any volunteers to test the code are welcome. :)

In the first patch I've added new patern for one line comments.
Everything after %% is considered a comment.

In the last patch I've hacked RIP so the routes that have metric > RIP_INFINITY would be pushed through the EXPORT filter. I've tested it, and it works. Unfortunatelly I'm not 100% sure if this hack is ok.

All other patches should be fine!

BR
Igor

Igor Maravic (15):
  xorp:rtrmgr: Add patern for one line comment
  xorp: policy:backend: Rename backend.y to backend.yy
  xorp:policy:backend: Rename backend.l to backend.ll
  xorp: policy: REname policy.l to policy.ll
  xorp:policy: Rename policy.y to policy.yy
  xorp: policy: Automaticly build lex and yacc fails from policy.ll and
    policy.yy
  xorp:policy:backend: Automaticly build lex and yacc files from
    backend.{ll,yy}
  Remove lex.yy_policy_backend_parser.cc
  Remove yacc.yy_policy_backend_parser.cc
  Remove yacc.yy_policy_backend_parser.cc.h
  Remove lex.yy_policy_parser.cc
  Remove yacc.yy_policy_parser.cc
  Remove yacc.yy_policy_parser.cc.h
  xorp: Add new operators
  xorp: rip: Force RIP to do EXPORT filtering when the route comes

 xorp/etc/templates/bgp.tp                          |    4 +-
 xorp/etc/templates/ospfv2.tp                       |    2 +-
 xorp/etc/templates/ospfv3.tp                       |    2 +-
 xorp/etc/templates/policy.tp                       |    2 +-
 xorp/etc/templates/rip.tp                          |    2 +-
 xorp/etc/templates/ripng.tp                        |    2 +-
 xorp/policy/SConscript                             |   32 +-
 xorp/policy/backend/SConscript                     |   31 +-
 xorp/policy/backend/backend.l                      |  153 -
 xorp/policy/backend/backend.ll                     |  165 +
 xorp/policy/backend/backend.y                      |  183 -
 xorp/policy/backend/backend.yy                     |  191 +
 .../policy/backend/lex.yy_policy_backend_parser.cc | 2035 ---------
 .../backend/yacc.yy_policy_backend_parser.cc       |  706 ---
 .../backend/yacc.yy_policy_backend_parser.cc.h     |   46 -
 xorp/policy/common/operator.cc                     |    6 +
 xorp/policy/common/operator.hh                     |    7 +
 xorp/policy/common/operator_base.hh                |    6 +
 xorp/policy/common/register_operations.cc          |   12 +
 xorp/policy/lex.yy_policy_parser.cc                | 4508 --------------------
 xorp/policy/policy.l                               |  222 -
 xorp/policy/policy.ll                              |  248 ++
 xorp/policy/policy.y                               |  140 -
 xorp/policy/policy.yy                              |  156 +
 xorp/policy/yacc.yy_policy_parser.cc               |  858 ----
 xorp/policy/yacc.yy_policy_parser.cc.h             |   57 -
 xorp/rip/output.hh                                 |   29 -
 xorp/rip/output_table.cc                           |   17 +-
 xorp/rip/output_updates.cc                         |   11 +-
 xorp/rip/route_db.cc                               |   60 +-
 xorp/rip/route_db.hh                               |    2 +-
 xorp/rtrmgr/boot.ll                                |   14 +-
 xorp/rtrmgr/config_operators.cc                    |   72 +-
 xorp/rtrmgr/config_operators.hh                    |   50 +-
 xorp/rtrmgr/op_commands.ll                         |   10 +
 xorp/rtrmgr/template.ll                            |   12 +
 36 files changed, 1045 insertions(+), 9008 deletions(-)
 delete mode 100644 xorp/policy/backend/backend.l
 create mode 100644 xorp/policy/backend/backend.ll
 delete mode 100644 xorp/policy/backend/backend.y
 create mode 100644 xorp/policy/backend/backend.yy
 delete mode 100644 xorp/policy/backend/lex.yy_policy_backend_parser.cc
 delete mode 100644 xorp/policy/backend/yacc.yy_policy_backend_parser.cc
 delete mode 100644 xorp/policy/backend/yacc.yy_policy_backend_parser.cc.h
 delete mode 100644 xorp/policy/lex.yy_policy_parser.cc
 delete mode 100644 xorp/policy/policy.l
 create mode 100644 xorp/policy/policy.ll
 delete mode 100644 xorp/policy/policy.y
 create mode 100644 xorp/policy/policy.yy
 delete mode 100644 xorp/policy/yacc.yy_policy_parser.cc
 delete mode 100644 xorp/policy/yacc.yy_policy_parser.cc.h

-- 
1.7.9.5



More information about the Xorp-hackers mailing list