initial commit removing all related xen code, docs, files
This commit is contained in:
parent
940e10ef5e
commit
a5370ee28c
39 changed files with 80 additions and 1771 deletions
|
@ -30,7 +30,7 @@ array set g_execRequests { shell "" observer "" }
|
|||
# for a simulator, uncomment this line or cut/paste into debugger:
|
||||
# set XSCALE 4.0; set YSCALE 4.0; set XOFFSET 1800; set YOFFSET 300
|
||||
|
||||
array set nodetypes { 0 def 1 phys 2 xen 3 tbd 4 lanswitch 5 hub \
|
||||
array set nodetypes { 0 def 1 phys 2 tbd 3 tbd 4 lanswitch 5 hub \
|
||||
6 wlan 7 rj45 8 tunnel 9 ktunnel 10 emane }
|
||||
|
||||
array set regtypes { wl 1 mob 2 util 3 exec 4 gui 5 emul 6 }
|
||||
|
@ -470,7 +470,7 @@ proc apiNodeCreate { node vals_ref } {
|
|||
set nodetype $nodetypes($vals(type))
|
||||
set nodename $vals(name)
|
||||
if { $nodetype == "emane" } { set nodetype "wlan" } ;# special case - EMANE
|
||||
if { $nodetype == "def" || $nodetype == "xen" } { set nodetype "router" }
|
||||
if { $nodetype == "def" } { set nodetype "router" }
|
||||
newNode [list $nodetype $node] ;# use node number supplied from API message
|
||||
setNodeName $node $nodename
|
||||
if { $vals(canv) == "" } {
|
||||
|
@ -509,7 +509,7 @@ proc apiNodeCreate { node vals_ref } {
|
|||
|
||||
set model $vals(model)
|
||||
if { $model != "" && $vals(type) < 4} {
|
||||
# set model only for (0 def 1 phys 2 xen 3 tbd) 4 lanswitch
|
||||
# set model only for (0 def 1 phys 2 tbd 3 tbd) 4 lanswitch
|
||||
setNodeModel $node $model
|
||||
if { [lsearch -exact [getNodeTypeNames] $model] == -1 } {
|
||||
puts "warning: unknown node type '$model' in Node message!"
|
||||
|
@ -2920,7 +2920,6 @@ proc getNodeTypeAPI { node } {
|
|||
jail { return 0x0 }
|
||||
OVS { return 0x0 }
|
||||
physical { return 0x1 }
|
||||
xen { return 0x2 }
|
||||
tbd { return 0x3 }
|
||||
lanswitch { return 0x4 }
|
||||
hub { return 0x5 }
|
||||
|
|
|
@ -2,7 +2,7 @@ comments {
|
|||
Kitchen Sink
|
||||
============
|
||||
|
||||
Contains every type of node available in CORE, except for the Xen and physical (prouter)
|
||||
Contains every type of node available in CORE, except for physical (prouter)
|
||||
machine types, and nodes distributed on other emulation servers.
|
||||
|
||||
To get the RJ45 node to work, a test0 interface should first be created like this:
|
||||
|
|
|
@ -1,60 +0,0 @@
|
|||
#!/bin/sh
|
||||
#
|
||||
# cleanup.sh
|
||||
#
|
||||
# Copyright 2005-2013 the Boeing Company.
|
||||
# See the LICENSE file included in this distribution.
|
||||
#
|
||||
# Removes leftover netgraph nodes and vimages from an emulation that
|
||||
# did not exit properly.
|
||||
#
|
||||
|
||||
ngnodes="pipe eiface hub switch wlan"
|
||||
vimages=`vimage -l | fgrep -v " " | cut -d: -f 1 | sed s/\"//g`
|
||||
|
||||
# shutdown netgraph nodes
|
||||
for ngn in $ngnodes
|
||||
do
|
||||
nodes=`ngctl list | grep $ngn | awk '{print $2}'`
|
||||
for n in $nodes
|
||||
do
|
||||
echo ngctl shutdown $n:
|
||||
ngctl shutdown $n:
|
||||
done
|
||||
done
|
||||
|
||||
# kills processes and remove vimages
|
||||
for vimage in $vimages
|
||||
do
|
||||
procs=`vimage $vimage ps x | awk '{print $1}'`
|
||||
for proc in $procs
|
||||
do
|
||||
if [ $proc != "PID" ]
|
||||
then
|
||||
echo vimage $vimage kill $proc
|
||||
vimage $vimage kill $proc
|
||||
fi
|
||||
done
|
||||
loopback=`vimage $vimage ifconfig -a | head -n 1 | awk '{split($1,a,":"); print a[1]}'`
|
||||
if [ "$loopback" != "" ]
|
||||
then
|
||||
addrs=`ifconfig $loopback | grep inet | awk '{print $2}'`
|
||||
for addr in $addrs
|
||||
do
|
||||
echo vimage $vimage ifconfig $loopback $addr -alias
|
||||
vimage $vimage ifconfig $loopback $addr -alias
|
||||
if [ $? != 0 ]
|
||||
then
|
||||
vimage $vimage ifconfig $loopback inet6 $addr -alias
|
||||
fi
|
||||
done
|
||||
echo vimage $vimage ifconfig $loopback down
|
||||
vimage $vimage ifconfig $loopback down
|
||||
fi
|
||||
vimage $vimage kill -9 -1 2> /dev/null
|
||||
echo vimage -d $vimage
|
||||
vimage -d $vimage
|
||||
done
|
||||
|
||||
# clean up temporary area
|
||||
rm -rf /tmp/pycore.*
|
|
@ -35,7 +35,6 @@ TINY_ICONS = tiny/button.play.gif \
|
|||
tiny/folder.gif \
|
||||
tiny/cel.gif \
|
||||
tiny/fileopen.gif \
|
||||
tiny/xen.gif \
|
||||
tiny/plot.gif
|
||||
|
||||
NORM_ICONS = normal/gps-diagram.xbm \
|
||||
|
@ -53,8 +52,7 @@ NORM_ICONS = normal/gps-diagram.xbm \
|
|||
normal/document-properties.gif \
|
||||
normal/thumb-unknown.gif \
|
||||
normal/router_purple.gif normal/router_yellow.gif \
|
||||
normal/ap.gif normal/mdr.gif \
|
||||
normal/xen.gif
|
||||
normal/ap.gif normal/mdr.gif
|
||||
|
||||
SVG_ICONS = svg/ap.svg \
|
||||
svg/cel.svg \
|
||||
|
@ -71,8 +69,7 @@ SVG_ICONS = svg/ap.svg \
|
|||
svg/router_yellow.svg \
|
||||
svg/start.svg \
|
||||
svg/tunnel.svg \
|
||||
svg/vlan.svg \
|
||||
svg/xen.svg
|
||||
svg/vlan.svg
|
||||
|
||||
#
|
||||
# Icon files (/usr/local/share/core/icons/[tiny,normal,svg])
|
||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 1.6 KiB |
|
@ -1,181 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
||||
|
||||
<svg
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
width="146"
|
||||
height="100"
|
||||
id="svg13653"
|
||||
sodipodi:version="0.32"
|
||||
inkscape:version="0.48.0 r9654"
|
||||
sodipodi:docname="xen.svg"
|
||||
version="1.0"
|
||||
inkscape:export-filename="xen.png"
|
||||
inkscape:export-xdpi="30.464558"
|
||||
inkscape:export-ydpi="30.464558">
|
||||
<defs
|
||||
id="defs13655">
|
||||
<inkscape:perspective
|
||||
sodipodi:type="inkscape:persp3d"
|
||||
inkscape:vp_x="0 : 99.931252 : 1"
|
||||
inkscape:vp_y="0 : 1000 : 0"
|
||||
inkscape:vp_z="199.10001 : 99.931252 : 1"
|
||||
inkscape:persp3d-origin="99.550003 : 66.620834 : 1"
|
||||
id="perspective3835" />
|
||||
<linearGradient
|
||||
id="linearGradient12828">
|
||||
<stop
|
||||
id="stop12830"
|
||||
offset="0"
|
||||
style="stop-color:#484849;stop-opacity:1;" />
|
||||
<stop
|
||||
style="stop-color:#434344;stop-opacity:1;"
|
||||
offset="0"
|
||||
id="stop12862" />
|
||||
<stop
|
||||
id="stop12832"
|
||||
offset="1.0000000"
|
||||
style="stop-color:#8f8f90;stop-opacity:0.0000000;" />
|
||||
</linearGradient>
|
||||
<radialGradient
|
||||
inkscape:collect="always"
|
||||
xlink:href="#linearGradient12828"
|
||||
id="radialGradient13651"
|
||||
cx="328.57144"
|
||||
cy="602.7193"
|
||||
fx="328.57144"
|
||||
fy="602.7193"
|
||||
r="147.14285"
|
||||
gradientTransform="matrix(1,0,0,0.177184,0,495.9268)"
|
||||
gradientUnits="userSpaceOnUse" />
|
||||
<linearGradient
|
||||
id="linearGradient12001">
|
||||
<stop
|
||||
style="stop-color:#1b4a78;stop-opacity:1;"
|
||||
offset="0"
|
||||
id="stop12003" />
|
||||
<stop
|
||||
style="stop-color:#5dacd1;stop-opacity:1;"
|
||||
offset="1"
|
||||
id="stop12005" />
|
||||
</linearGradient>
|
||||
<linearGradient
|
||||
inkscape:collect="always"
|
||||
xlink:href="#linearGradient12001"
|
||||
id="linearGradient13633"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
gradientTransform="matrix(0.471308,0,0,0.471308,118.8781,123.5182)"
|
||||
x1="175.71875"
|
||||
y1="737.01562"
|
||||
x2="470.00089"
|
||||
y2="737.01562" />
|
||||
<linearGradient
|
||||
inkscape:collect="always"
|
||||
xlink:href="#linearGradient12001"
|
||||
id="linearGradient3844"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
gradientTransform="matrix(0.471308,0,0,0.471308,-45.6934,-239.9103)"
|
||||
x1="175.71875"
|
||||
y1="737.01562"
|
||||
x2="470.00089"
|
||||
y2="737.01562" />
|
||||
</defs>
|
||||
<sodipodi:namedview
|
||||
id="base"
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#666666"
|
||||
borderopacity="1.0"
|
||||
inkscape:pageopacity="0.0"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:zoom="1"
|
||||
inkscape:cx="118.57814"
|
||||
inkscape:cy="50.488033"
|
||||
inkscape:document-units="px"
|
||||
inkscape:current-layer="layer1"
|
||||
inkscape:window-width="1280"
|
||||
inkscape:window-height="949"
|
||||
inkscape:window-x="1631"
|
||||
inkscape:window-y="29"
|
||||
showgrid="false"
|
||||
inkscape:window-maximized="0" />
|
||||
<metadata
|
||||
id="metadata13658">
|
||||
<rdf:RDF>
|
||||
<cc:Work
|
||||
rdf:about="">
|
||||
<dc:format>image/svg+xml</dc:format>
|
||||
<dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||
<dc:title></dc:title>
|
||||
</cc:Work>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
<g
|
||||
inkscape:label="Capa 1"
|
||||
inkscape:groupmode="layer"
|
||||
id="layer1"
|
||||
transform="translate(-33.124945,-44.636248)">
|
||||
<path
|
||||
style="fill:url(#linearGradient3844);fill-opacity:1;stroke:none"
|
||||
d="m 37.14136,72.27878 0,0.29457 c 0.006,-0.0975 0.0206,-0.19729 0.0295,-0.29457 l -0.0295,0 z m 138.62351,0 c 0.0302,0.33044 0.0589,0.66821 0.0589,1.00153 l 0,-1.00153 -0.0589,0 z m 0.0589,1.00153 c -1e-5,15.05224 -31.07495,27.26223 -69.35594,27.26223 -37.68286,1e-5 -68.3765,-11.82771 -69.32649,-26.55527 l 0,40.67979 c -0.0151,0.23376 -0.0147,0.45704 -0.0147,0.69223 0,0.22546 8.7e-4,0.45335 0.0147,0.67751 0.91151,14.74102 31.61889,26.59945 69.32649,26.59945 37.7076,0 68.41498,-11.85843 69.32648,-26.59945 l 0.0295,0 0,-0.50077 c 9.5e-4,-0.0587 0,-0.11794 0,-0.17674 0,-0.0588 9.4e-4,-0.11803 0,-0.17674 l 0,-41.90224 z"
|
||||
id="path13626" />
|
||||
<path
|
||||
sodipodi:type="arc"
|
||||
style="fill:#3a78a0;fill-opacity:1;stroke:none"
|
||||
id="path11090"
|
||||
sodipodi:cx="328.57144"
|
||||
sodipodi:cy="602.7193"
|
||||
sodipodi:rx="147.14285"
|
||||
sodipodi:ry="26.071428"
|
||||
d="m 475.71429,602.7193 c 0,14.39885 -65.87809,26.07143 -147.14285,26.07143 -81.26475,0 -147.14285,-11.67258 -147.14285,-26.07143 0,-14.39885 65.8781,-26.07143 147.14285,-26.07143 81.26476,0 147.14285,11.67258 147.14285,26.07143 z"
|
||||
transform="matrix(0.471308,0,0,1.045917,-48.3838,-554.9944)" />
|
||||
<g
|
||||
id="g13565"
|
||||
style="fill:#f2fdff;fill-opacity:0.71171169"
|
||||
transform="matrix(0.84958,0.276715,-0.703617,0.334119,278.6313,-230.2001)">
|
||||
<path
|
||||
id="path13507"
|
||||
d="m 328.66945,592.8253 -5.97867,10.35298 -5.97867,10.35297 6.18436,0 0,21.24074 11.53226,0 0,-21.24074 6.18435,0 -5.97867,-10.35297 -5.96496,-10.35298 z"
|
||||
style="fill:#f2fdff;fill-opacity:0.71171169;stroke:none" />
|
||||
<path
|
||||
id="path13509"
|
||||
d="m 328.66945,687.10951 -5.97867,-10.35298 -5.97867,-10.35297 6.18436,0 0,-21.24074 11.53226,0 0,21.24074 6.18435,0 -5.97867,10.35297 -5.96496,10.35298 z"
|
||||
style="fill:#f2fdff;fill-opacity:0.71171169;stroke:none" />
|
||||
<path
|
||||
id="path13511"
|
||||
d="m 333.74751,639.82449 10.35297,-5.97867 10.35297,-5.97867 0,6.18436 21.24074,0 0,11.53225 -21.24074,0 0,6.18436 -10.35297,-5.97867 -10.35297,-5.96496 z"
|
||||
style="fill:#f2fdff;fill-opacity:0.71171169;stroke:none" />
|
||||
<path
|
||||
id="path13513"
|
||||
d="m 323.35667,639.82449 -10.35297,-5.97867 -10.35298,-5.97867 0,6.18436 -21.24073,0 0,11.53225 21.24073,0 0,6.18436 10.35298,-5.97867 10.35297,-5.96496 z"
|
||||
style="fill:#f2fdff;fill-opacity:0.71171169;stroke:none" />
|
||||
</g>
|
||||
<rect
|
||||
style="fill:#f2fdff;fill-opacity:0.70980394;stroke:#000000;stroke-opacity:1"
|
||||
id="rect6161"
|
||||
width="91.923882"
|
||||
height="37.476658"
|
||||
x="52.679455"
|
||||
y="60.048466"
|
||||
transform="translate(33.124945,44.636248)"
|
||||
rx="5.454824"
|
||||
ry="5.454824" />
|
||||
<text
|
||||
xml:space="preserve"
|
||||
style="font-size:32px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;fill:#000000;fill-opacity:1;stroke:none;font-family:DejaVu Sans;-inkscape-font-specification:Bitstream Charter Bold"
|
||||
x="91.107697"
|
||||
y="135.0903"
|
||||
id="text6673"><tspan
|
||||
sodipodi:role="line"
|
||||
id="tspan6675"
|
||||
x="91.107697"
|
||||
y="135.0903">Xen</tspan></text>
|
||||
</g>
|
||||
</svg>
|
Before Width: | Height: | Size: 6.9 KiB |
Binary file not shown.
Before Width: | Height: | Size: 905 B |
|
@ -26,14 +26,12 @@ array set g_node_types_default {
|
|||
5 {prouter router_green.gif router_green.gif \
|
||||
{zebra OSPFv2 OSPFv3 IPForward} \
|
||||
physical {built-in type for physical nodes}}
|
||||
6 {xen xen.gif xen.gif {zebra OSPFv2 OSPFv3 IPForward} \
|
||||
xen {built-in type for Xen PVM domU router}}
|
||||
7 {OVS lanswitch.gif lanswitch.gif {DefaultRoute SSH OvsService} OVS {} }
|
||||
|
||||
}
|
||||
|
||||
# possible machine types for nodes
|
||||
set MACHINE_TYPES "netns physical xen OVS"
|
||||
set MACHINE_TYPES "netns physical OVS"
|
||||
|
||||
# array populated from nodes.conf file
|
||||
array set g_node_types { }
|
||||
|
@ -65,7 +63,7 @@ proc loadNodesConf { } {
|
|||
set line [list $idx $data]
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
# load into array of nodes
|
||||
if { [catch {array set g_node_types $line} e] } {
|
||||
puts "Error reading $confname line '$node': $e"
|
||||
|
@ -86,13 +84,13 @@ proc checkNodeTypes { fatal } {
|
|||
puts "error: missing built-in node type '$name'!"
|
||||
puts "move your ~/.core/nodes.conf file to re-create the defaults"
|
||||
if { $fatal } {
|
||||
exit
|
||||
exit
|
||||
} else {
|
||||
return $name
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
@ -187,7 +185,7 @@ proc getNodeTypeServices { type } {
|
|||
return ""
|
||||
}
|
||||
|
||||
# return the machine type (e.g. netns, physical, xen) of the currently selected
|
||||
# return the machine type (e.g. netns, physical) of the currently selected
|
||||
# node type from the toolbar
|
||||
proc getNodeTypeMachineType { type } {
|
||||
global MACHINE_TYPES g_node_types
|
||||
|
@ -211,7 +209,7 @@ proc getNodeTypeProfile { type } {
|
|||
return ""
|
||||
}
|
||||
|
||||
# return the machine type (e.g. netns, physical, xen) of the currently selected
|
||||
# return the machine type (e.g. netns, physical) of the currently selected
|
||||
# node type from the toolbar
|
||||
proc getNodeTypeMachineType { type } {
|
||||
global MACHINE_TYPES g_node_types
|
||||
|
@ -269,7 +267,7 @@ proc popupNodeProfileConfig { channel node model types values captions bitmap po
|
|||
global g_node_types
|
||||
|
||||
set opaque_items [split $opaque :]
|
||||
if { [llength $opaque_items] != 2 } {
|
||||
if { [llength $opaque_items] != 2 } {
|
||||
puts "warning: received unexpected opaque data in conf message!"
|
||||
return
|
||||
}
|
||||
|
@ -334,7 +332,7 @@ proc popupNodesConfig {} {
|
|||
labelframe $wi.s -borderwidth 0 -text "Node Types"
|
||||
listbox $wi.s.nodes -selectmode single -height 5 -width 15 \
|
||||
-yscrollcommand "$wi.s.nodes_scroll set" -exportselection 0
|
||||
scrollbar $wi.s.nodes_scroll -command "$wi.s.nodes yview"
|
||||
scrollbar $wi.s.nodes_scroll -command "$wi.s.nodes yview"
|
||||
pack $wi.s.nodes $wi.s.nodes_scroll -fill y -side left
|
||||
pack $wi.s -padx 4 -pady 4 -fill both -side top -expand true
|
||||
|
||||
|
@ -365,9 +363,9 @@ proc popupNodesConfig {} {
|
|||
frame $wi.s.edit -borderwidth 4
|
||||
frame $wi.s.edit.0
|
||||
label $wi.s.edit.0.namelab -text "Name"
|
||||
entry $wi.s.edit.0.name -bg white -width 20
|
||||
entry $wi.s.edit.0.name -bg white -width 20
|
||||
pack $wi.s.edit.0.namelab $wi.s.edit.0.name -side left
|
||||
|
||||
|
||||
frame $wi.s.edit.1
|
||||
label $wi.s.edit.1.iconlab -text "Icon"
|
||||
entry $wi.s.edit.1.icon -bg white -width 25
|
||||
|
@ -422,7 +420,7 @@ proc popupNodesConfig {} {
|
|||
nodesConfigSelect $wi ""
|
||||
|
||||
|
||||
# close button
|
||||
# close button
|
||||
frame $wi.b -borderwidth 0
|
||||
button $wi.b.close -text "Close" -command "nodesConfigClose $wi"
|
||||
pack $wi.b.close -side right
|
||||
|
@ -461,7 +459,7 @@ proc nodesConfigSelect { wi cmd } {
|
|||
|
||||
set selected_idx [$wi.s.nodes curselection]
|
||||
if { $selected_idx == "" } { return }
|
||||
|
||||
|
||||
set idx [expr {$selected_idx + 1}]
|
||||
if { ![info exists g_node_types($idx)] } { return }
|
||||
|
||||
|
@ -522,7 +520,7 @@ proc nodesConfigImgDialog { wi ctl size } {
|
|||
if { [string first $dir $f] == 0 } {
|
||||
# chop off default path of $dir
|
||||
set f [string range $f [string length $dir] end]
|
||||
}
|
||||
}
|
||||
if { $f != "" } {
|
||||
$ctl delete 0 end
|
||||
$ctl insert 0 $f
|
||||
|
@ -581,7 +579,7 @@ proc nodesConfigHelper { wi cmd } {
|
|||
set newdata [lreplace $newdata 0 0 $newname]
|
||||
set newdata [lreplace $newdata 5 5 ""] ;# zero the meta-data
|
||||
array set g_node_types [list $arridx $newdata]
|
||||
set newsel [expr {$arridx - 1}]
|
||||
set newsel [expr {$arridx - 1}]
|
||||
}
|
||||
save {
|
||||
nodesConfigSelect $wi save
|
||||
|
@ -591,26 +589,26 @@ proc nodesConfigHelper { wi cmd } {
|
|||
}
|
||||
up -
|
||||
down {
|
||||
if {$cmd == "up" } {
|
||||
if {$cmd == "up" } {
|
||||
if { $arridx < 2 } { return }
|
||||
set newidx [expr {$arridx - 1}]
|
||||
set newsel [expr {$idx - 1}]
|
||||
set newidx [expr {$arridx - 1}]
|
||||
set newsel [expr {$idx - 1}]
|
||||
} else {
|
||||
if { $idx >= [expr {[$ctl size] - 1}]} { return }
|
||||
set newidx [expr {$arridx + 1}]
|
||||
set newsel [expr {$idx + 1}]
|
||||
set newsel [expr {$idx + 1}]
|
||||
}
|
||||
set newentry [lindex [array get g_node_types $arridx] 1]
|
||||
set oldentry [lindex [array get g_node_types $newidx] 1]
|
||||
if {$oldentry != ""} {
|
||||
array set g_node_types [list $arridx $oldentry]
|
||||
array set g_node_types [list $arridx $oldentry]
|
||||
}
|
||||
array set g_node_types [list $newidx $newentry]
|
||||
}
|
||||
}
|
||||
|
||||
nodesConfigRefreshList $wi
|
||||
if { $newsel != "" } {
|
||||
if { $newsel != "" } {
|
||||
$ctl selection clear 0 end
|
||||
$ctl selection set $newsel
|
||||
}
|
||||
|
@ -628,12 +626,12 @@ proc nodesConfigServices { wi services_or_profile } {
|
|||
set sock [lindex [getEmulPlugin "*"] 2]
|
||||
# node number 0 is sent, but these services are not associated with a node
|
||||
if { $services_or_profile == "profile" } {
|
||||
set services_or_profile $g_machine_type ;# address the e.g. "xen" model
|
||||
set services_or_profile $g_machine_type ;# address the model
|
||||
set opaque "$g_machine_type:$g_node_type_services_hint"
|
||||
} else {
|
||||
set opaque ""
|
||||
}
|
||||
sendConfRequestMessage $sock -1 $services_or_profile 0x1 -1 $opaque
|
||||
sendConfRequestMessage $sock -1 $services_or_profile 0x1 -1 $opaque
|
||||
}
|
||||
|
||||
# helper for when close button is pressed
|
||||
|
|
|
@ -49,7 +49,7 @@ set plugin_img_folder [image create photo -file "$iconpath/folder.gif"]
|
|||
|
||||
array set g_plugin_button_tooltips {
|
||||
add "add a new plugin"
|
||||
edit "edit the selected plugin"
|
||||
edit "edit the selected plugin"
|
||||
del "remove the selected plugin"
|
||||
conn "connect to this plugin"
|
||||
disc "disconnect from this plugin"
|
||||
|
@ -78,7 +78,7 @@ proc popupPluginsConfig {} {
|
|||
labelframe $wi.s -borderwidth 0 -text "Plugins"
|
||||
listbox $wi.s.plugins -selectmode single -height 5 -width 50 \
|
||||
-yscrollcommand "$wi.s.plugins_scroll set" -exportselection 0
|
||||
scrollbar $wi.s.plugins_scroll -command "$wi.s.plugins yview"
|
||||
scrollbar $wi.s.plugins_scroll -command "$wi.s.plugins yview"
|
||||
pack $wi.s.plugins $wi.s.plugins_scroll -fill y -side left
|
||||
pack $wi.s -padx 4 -pady 4 -fill both -side top -expand true
|
||||
|
||||
|
@ -118,7 +118,7 @@ proc popupPluginsConfig {} {
|
|||
bind $wi.s.plugins <<ListboxSelect>> "pluginsConfigSelect $wi"
|
||||
pluginsConfigSelect $wi
|
||||
|
||||
# close button
|
||||
# close button
|
||||
frame $wi.b -borderwidth 0
|
||||
button $wi.b.save -text "Save" -command "writePluginsConf; destroy $wi"
|
||||
button $wi.b.cancel -text "Cancel" -command "destroy $wi"
|
||||
|
@ -216,8 +216,8 @@ proc popupPluginsConfigEdit { parent action } {
|
|||
#
|
||||
proc popupPluginConfigEditApply { wi selected_idx selected_name } {
|
||||
global g_plugins g_plugin_types plugin_config_type plugin_config_autoconn
|
||||
|
||||
# get values from the dialog
|
||||
|
||||
# get values from the dialog
|
||||
set name "\"[string trim [$wi.c.a.name get]]\""
|
||||
set ip [string trim [$wi.c.b.ip get]]
|
||||
set port [string trim [$wi.c.b.port get]]
|
||||
|
@ -243,8 +243,8 @@ proc popupPluginConfigEditApply { wi selected_idx selected_name } {
|
|||
array unset g_plugins "\"$selected_name\""
|
||||
}
|
||||
}
|
||||
|
||||
# manipulate the g_plugins array
|
||||
|
||||
# manipulate the g_plugins array
|
||||
set plugin_data [list $ip $port $typenum $ac $status $cap $sock]
|
||||
array set g_plugins [list $name $plugin_data]
|
||||
}
|
||||
|
@ -335,7 +335,7 @@ proc pluginsConfigSelect { wi } {
|
|||
set buttons_state normal
|
||||
set name "\"[$wi.s.plugins get $selected_idx]\""
|
||||
}
|
||||
|
||||
|
||||
# enable or disable the editing/control buttons
|
||||
if { $name == "\"GUI\"" } {
|
||||
# this program is the GUI, you cannot change this connection
|
||||
|
@ -420,7 +420,7 @@ proc popupPluginsCapConfig { wlan parent } {
|
|||
set wi .pluginCapConfig
|
||||
catch {destroy $wi}
|
||||
toplevel $wi
|
||||
wm transient $parent .
|
||||
wm transient $parent .
|
||||
wm title $wi "Available Plugins"
|
||||
|
||||
# update dialog
|
||||
|
@ -435,7 +435,7 @@ proc popupPluginsCapConfig { wlan parent } {
|
|||
listbox $wi.active.plugins -selectmode single -width 55 -height 5 \
|
||||
-yscrollcommand "$wi.active.scroll set" -exportselection 0
|
||||
scrollbar $wi.active.scroll -command "$wi.active.plugins yview"
|
||||
pack $wi.active.plugins -fill both -side left
|
||||
pack $wi.active.plugins -fill both -side left
|
||||
pack $wi.active.scroll -fill y -side left
|
||||
pack $wi.active -side top -fill both -expand true -padx 4 -pady 4
|
||||
|
||||
|
@ -462,7 +462,7 @@ proc popupPluginsCapConfig { wlan parent } {
|
|||
listbox $wi.avail.plugins -selectmode single -width 55 -height 5 \
|
||||
-yscrollcommand "$wi.avail.scroll set" -exportselection 0
|
||||
scrollbar $wi.avail.scroll -command "$wi.avail.plugins yview"
|
||||
pack $wi.avail.plugins -fill both -side left
|
||||
pack $wi.avail.plugins -fill both -side left
|
||||
pack $wi.avail.scroll -fill y -side left
|
||||
pack $wi.avail -side top -fill both -expand true -padx 4 -pady 4
|
||||
|
||||
|
@ -472,7 +472,7 @@ proc popupPluginsCapConfig { wlan parent } {
|
|||
"popupPluginsCapConfigHelper $wi up $wlan"
|
||||
|
||||
# this reads from the existing wlan config
|
||||
if { $g_cap_in_use == "" } {
|
||||
if { $g_cap_in_use == "" } {
|
||||
set g_cap_in_use [getCapabilities $wlan "mobmodel"]
|
||||
}
|
||||
|
||||
|
@ -525,25 +525,25 @@ proc popupPluginsCapConfigHelper { wi cmd wlan} {
|
|||
set channel [pluginConnect $plugin connect 1]
|
||||
if { $cap == "location" } {
|
||||
# hack to map location capabilities with canvas size/scale dialog
|
||||
resizeCanvasPopup
|
||||
resizeCanvasPopup
|
||||
return
|
||||
}
|
||||
if { $channel != -1 && $channel != "" } {
|
||||
sendConfRequestMessage $channel $wlan $cap $flags $netid $opaque
|
||||
sendConfRequestMessage $channel $wlan $cap $flags $netid $opaque
|
||||
}
|
||||
return
|
||||
} else { ;# up/down enable/disable button preseed
|
||||
set capstr [$l get $selected_idx]
|
||||
$l delete $selected_idx $selected_idx
|
||||
$l2 insert end $capstr
|
||||
$l2 selection set end
|
||||
$l2 selection set end
|
||||
# put the capabilities from the active list into the g_cap_in_use list
|
||||
# this list will be read in wlanConfigDialogHelper when Apply pressed
|
||||
set g_cap_in_use {}
|
||||
set g_cap_in_use_set 1
|
||||
foreach capstr [$wi.active.plugins get 0 end] {
|
||||
set cap [string trim [lindex [split $capstr -] 1]]
|
||||
lappend g_cap_in_use $cap
|
||||
lappend g_cap_in_use $cap
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -560,7 +560,7 @@ proc configCap { node models } {
|
|||
set opaque "" ;# unused
|
||||
set channel [pluginConnect $plugin connect 1]
|
||||
if { $channel != -1 && $channel != "" } {
|
||||
sendConfRequestMessage $channel $node $models $flags $netid $opaque
|
||||
sendConfRequestMessage $channel $node $models $flags $netid $opaque
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -612,7 +612,6 @@ proc capTitle { cap } {
|
|||
# Session options
|
||||
# EMANE options
|
||||
# EMANE model options, per-WLAN/per-interface
|
||||
# node profile (Xen machine type)
|
||||
#
|
||||
proc popupCapabilityConfig { channel wlan model types values captions bmp possible_values groups } {
|
||||
global node_list g_node_type_services_hint g_popupcap_keys g_prefs
|
||||
|
@ -620,7 +619,7 @@ proc popupCapabilityConfig { channel wlan model types values captions bmp possib
|
|||
catch {destroy $wi}
|
||||
toplevel $wi
|
||||
set modelname [capTitle $model]
|
||||
wm transient $wi .
|
||||
wm transient $wi .
|
||||
wm title $wi "$modelname configuration"
|
||||
|
||||
array unset g_popupcap_keys ;# hint for supporting key=value w/apply button
|
||||
|
@ -656,7 +655,7 @@ proc popupCapabilityConfig { channel wlan model types values captions bmp possib
|
|||
|
||||
if { $customcfg != "" } {
|
||||
set cfg [lindex [lindex $customcfg 2] 1]
|
||||
} else {
|
||||
} else {
|
||||
set cfg ""
|
||||
}
|
||||
# session options stored in array, not custom-config
|
||||
|
@ -676,7 +675,7 @@ proc popupCapabilityConfig { channel wlan model types values captions bmp possib
|
|||
set value [lindex $kv 1]
|
||||
|
||||
if { $cfg != "" } { ;# possibly use existing config value
|
||||
if { $key == "" } { ;# support old "value" format
|
||||
if { $key == "" } { ;# support old "value" format
|
||||
set value [lindex $cfg $n]
|
||||
} else {
|
||||
set value [getKeyValue $key $cfg $value]
|
||||
|
@ -694,7 +693,7 @@ proc popupCapabilityConfig { channel wlan model types values captions bmp possib
|
|||
set gn [lindex $groupinfo 0]
|
||||
set groupcaption [lindex $groupinfo 1]
|
||||
if { $lastgn != $gn } {
|
||||
ttk::frame $wi.vals.$gn
|
||||
ttk::frame $wi.vals.$gn
|
||||
$wi.vals add $wi.vals.$gn -text $groupcaption -underline 0
|
||||
set lastgn $gn
|
||||
}
|
||||
|
@ -889,7 +888,7 @@ proc popupSessionConfig { channel sessionids sessionnames sessionfiles nodecount
|
|||
set wi .popupSessionConfig
|
||||
catch {destroy $wi}
|
||||
toplevel $wi
|
||||
wm transient $wi .
|
||||
wm transient $wi .
|
||||
wm title $wi "CORE Sessions"
|
||||
|
||||
ttk::frame $wi.top
|
||||
|
@ -965,7 +964,7 @@ proc popupSessionConfig { channel sessionids sessionnames sessionfiles nodecount
|
|||
grid $wi.btn.new $wi.btn.conn $wi.btn.shut $wi.btn.cancel -padx 4 -pady 4
|
||||
grid columnconfigure $wi 0 -weight 1
|
||||
pack $wi.btn -side bottom -fill x
|
||||
|
||||
|
||||
bind $wi <Key-Return> $conn_cmd
|
||||
bind $wi <Key-Escape> $close_cmd
|
||||
bind $wi.tree <<TreeviewSelect>> "sessionConfigSelect $wi {$thumbs}"
|
||||
|
@ -1114,7 +1113,7 @@ proc setPluginCapList { plugin caps } {
|
|||
return -1 ;# unknown plugin
|
||||
}
|
||||
set plugin_data $g_plugins($plugin)
|
||||
set plugin_data [lreplace $plugin_data 5 5 $caps]
|
||||
set plugin_data [lreplace $plugin_data 5 5 $caps]
|
||||
array set g_plugins [list $plugin $plugin_data]
|
||||
return 0
|
||||
}
|
||||
|
@ -1200,7 +1199,7 @@ proc autoConnectPlugins { } {
|
|||
proc pluginConnect { name cmd retry } {
|
||||
global g_plugins
|
||||
if { $name == "" } { set name \"core-daemon\" }
|
||||
if { ![info exists g_plugins($name)] } {
|
||||
if { ![info exists g_plugins($name)] } {
|
||||
puts "pluginConnect error: $name does not exist!"
|
||||
return -1
|
||||
}
|
||||
|
@ -1223,7 +1222,7 @@ proc pluginConnect { name cmd retry } {
|
|||
1 { ;# CORE API
|
||||
if { $cmd == "toggle" } {
|
||||
if { $snum == 0 } {
|
||||
set cmd connect
|
||||
set cmd connect
|
||||
} elseif { $snum == 1 } {
|
||||
set cmd disconnect
|
||||
}
|
||||
|
@ -1303,7 +1302,7 @@ proc pluginRefresh { plugin } {
|
|||
#
|
||||
proc pluginChannelClosed { sock } {
|
||||
global g_plugins
|
||||
set plugin [pluginByChannel $sock]
|
||||
set plugin [pluginByChannel $sock]
|
||||
if { $plugin == "" } { return } ;# channel not found
|
||||
set plugin_data $g_plugins($plugin)
|
||||
set plugin_data [lreplace $plugin_data 6 6 -1]; # sock = -1
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue