Commit 4407a0cb authored by Gary Wong's avatar Gary Wong

Add TCL support for routable control net IP addresses.

This makes it convenient to request public addresses for virtual nodes
through the NS interface, like this:

    tb-set-node-routable-ip $node 1
parent 2b1404a5
......@@ -124,6 +124,7 @@ proc tb-set-dpdb {onoff} {}
proc tb-fix-interface {vnode lanlink iface} {}
proc tb-set-node-usesharednode {node weight} {}
proc tb-set-node-sharingmode {node sharemode} {}
proc tb-set-node-routable-ip {node onoff} {}
#add for OML
proc tb-set-use-oml {args} {}
......@@ -2281,6 +2281,24 @@ proc tb-set-link-layer {link mylayer} {
$link set layer $mylayer
# Force allocation of a routable IP address for a control interface.
proc tb-set-node-routable-ip {node onoff} {
if {[$node info class] != "Node"} {
perror "\[tb-set-node-routable-ip] $node is not a node."
if {$onoff == 0} {
$node add-attribute "routable_control_ip" "false"
} elseif {$onoff == 1} {
$node add-attribute "routable_control_ip" "true"
} else {
perror "\[tb-set-node-routable-ip] $onoff must be 0/1"
# The following codes are written, in order to use OML to send data to a server
# in an Emulab experiment. It will define a node to run OML server and create
# two files (MP.c and MP.h) for users. (mp represents measurement point in
......@@ -70,6 +70,7 @@ proc tb-set-lan-protocol {lanlink protocol} {}
proc tb-set-lan-accesspoint {lanlink node} {}
proc tb-set-lan-setting {lanlink capkey capval} {}
proc tb-set-node-lan-setting {lanlink node capkey capval} {}
proc tb-set-node-routable-ip {node onoff} {}
Class Program
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment