Skip to content

Commit

Permalink
wrapper: Add wrapper feature to xorp.
Browse files Browse the repository at this point in the history
This integrates the wrapper api into xorp.  It is enabled by
default, but may be disabled with command-line arguments to
'scons' when building.

Signed-off-by: Jiangxin Hu <jiangxin.hu@crc.gc.ca>
Signed-off-by: Ben Greear <greearb@candelatech.com>
  • Loading branch information
greearb committed Feb 7, 2013
1 parent c83eacc commit 1febd62
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 0 deletions.
3 changes: 3 additions & 0 deletions xorp/SConscript
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,9 @@ subdirs = [
if env['enable_olsr']:
subdirs.append('contrib/olsr')

if env['enable_wrapper']:
subdirs.append('contrib/wrapper')

if env['enable_bgp']:
subdirs.append('bgp')

Expand Down
9 changes: 9 additions & 0 deletions xorp/SConstruct
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ vars.AddVariables(
BoolVariable('enable_bgp', 'Build BGP', True),
BoolVariable('enable_buildinfo', 'Build Info, see libxorp/create_buildinfo.sh', True),
BoolVariable('enable_olsr', 'Build OLSR', True),
BoolVariable('enable_wrapper', 'Build Wrapper', True),
BoolVariable('enable_ospf', 'Build OSPF', True),
BoolVariable('enable_rip', 'Build RIP', True),
BoolVariable('enable_vrrp', 'Build VRRP', True),
Expand Down Expand Up @@ -269,6 +270,7 @@ print 'Debug function names: ', env['debug_fn']
print 'Debug callbacks: ', env['debug_cb']
print 'Debug XRL syntax: ', env['debug_xrldb']
print 'Enable OLSR: ', env['enable_olsr']
print 'Enable Wrapper: ', env['enable_wrapper']
print 'Enable OSPF: ', env['enable_ospf']
print 'Enable RIP: ', env['enable_rip']
print 'Enable VRRP: ', env['enable_vrrp']
Expand Down Expand Up @@ -489,6 +491,13 @@ if tst and ((tst == "no") or (tst == "false")):
else:
env['enable_olsr'] = True

# Default to enabled
tst = ARGUMENTS.get('enable_wrapper', True)
if tst and (tst == "no"):
env['enable_wrapper'] = False
else:
env['enable_wrapper'] = True

# Default to enabled
tst = ARGUMENTS.get('enable_ospf', True)
if tst and ((tst == "no") or (tst == "false")):
Expand Down
1 change: 1 addition & 0 deletions xorp/etc/templates/policy.tp
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@ policy {
%allow: $(@) "rip" %help: "RIP routes";
%allow: $(@) "ripng" %help: "RIPng routes";
%allow: $(@) "static" %help: "Static routes";
%allow: $(@) "wrapper4" %help: "Wrapper IPv4 routes";
%set: xrl "$(policy.targetname)/policy/0.1/update_term_block?policy:txt=$(policy-statement.@)&term:txt=$(term.@)&block:u32=0&order:txt=$(#)&statement:txt=protocol $(<>) $(@);";
%delete: xrl "$(policy.targetname)/policy/0.1/update_term_block?policy:txt=$(policy-statement.@)&term:txt=$(term.@)&block:u32=0&order:txt=$(#)&statement:txt=";
}
Expand Down
3 changes: 3 additions & 0 deletions xorp/xrl/interfaces/SConscript
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,9 @@ if not (env.has_key('disable_fw') and env['disable_fw']):
if env['enable_olsr']:
xifs.append('olsr4.xif')

if env['enable_wrapper']:
xifs.append('wrapper4.xif')

if env['enable_rip']:
xifs.append('rip.xif')
xifs.append('ripng.xif')
Expand Down
3 changes: 3 additions & 0 deletions xorp/xrl/targets/SConscript
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,9 @@ if not (env.has_key('disable_ipv6') and env['disable_ipv6']):
if env['enable_olsr']:
tgts.append('olsr4.tgt')

if env['enable_wrapper']:
tgts.append('wrapper4.tgt')

if env['enable_ospf']:
tgts.append('ospfv2.tgt')

Expand Down

0 comments on commit 1febd62

Please sign in to comment.