level3.js
1 2 var level = 3; 3 4 var hosts = [ 5 {'id':'A', 'type':'client', 'name':'Host A', 'geometry':'200x220+700+800', 'img':'host.png', 'labelpos':'0,200'}, 6 {'id':'B', 'type':'client', 'name':'Host B', 'geometry':'200x220+600+200', 'img':'host.png', 'labelpos':'180,30'}, 7 {'id':'C', 'type':'client', 'name':'Host C', 'geometry':'200x200+200+500', 'img':'host.png', 'labelpos':'-150,150'}, 8 {'id':'S', 'type':'switch', 'name':'Switch-1', 'geometry':'150x150+600+500', 'img':'switch.png', 'labelpos':'80,110'} 9 ]; 10 11 // routes are processed in order, first match only is used => default must be last - KEEP routes before interfaces for random reference 12 var routes = [ 13 ]; 14 15 16 var ifs = [ 17 {'if':'A1', 'hid':'A', 'ip':'104.198.[1-254]a.125', 'mask':'255.255.255.0', 'ip_edit':'false', 'mask_edit':'true', 'type':'std', 'pos':'0,-50'}, 18 {'if':'B1', 'hid':'B', 'ip':'127.168.42.42', 'mask':'255.255.0.0', 'ip_edit':'true', 'mask_edit':'true', 'type':'std', 'pos':'100,200'}, 19 {'if':'C1', 'hid':'C', 'ip':'104.198.[a].[260-299]b', 'mask':'255.255.255.128', 'ip_edit':'true', 'mask_edit':'false', 'type':'std', 'pos':'190,10'}, 20 {'if':'S1', 'hid':'S', 'ip':'0.0.0.0', 'mask':'/32', 'ip_edit':'false', 'mask_edit':'false', 'pos':'0,0', 'type':'hidden'} 21 ]; 22 23 24 var links = [ 25 {'if1':'C1', 'if2':'S1'}, 26 {'if1':'S1', 'if2':'A1'}, 27 {'if1':'S1', 'if2':'B1'} 28 ]; 29 30 var goals = [ 31 {'id':'1', 'type':'reach', 'id1':'A', 'id2':'B'}, 32 {'id':'2', 'type':'reach', 'id1':'A', 'id2':'C'}, 33 {'id':'3', 'type':'reach', 'id1':'B', 'id2':'C'} 34 ];