level4.js
1 2 var level = 4; 3 4 var hosts = [ 5 {'id':'A', 'type':'client', 'name':'A nice host', 'geometry':'200x220+800+800', 'img':'host.png', 'labelpos':'0,200'}, 6 {'id':'B', 'type':'client', 'name':'Another host', 'geometry':'200x220+700+200', 'img':'host.png', 'labelpos':'180,30'}, 7 {'id':'R', 'type':'router', 'name':'My_Gate', 'geometry':'200x200+300+500', 'img':'router.png', 'labelpos':'-160,120'}, 8 {'id':'S', 'type':'switch', 'name':'Switch-1', 'geometry':'150x150+700+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':'[60-125]a.[1-254]b.[110-119]c.132', 'mask':'255.255.255.240', 'ip_edit':'false', 'mask_edit':'true', 'type':'std', 'pos':'0,-50'}, 18 {'if':'B1', 'hid':'B', 'ip':'[a].[b].[120-129]d.193', 'mask':'255.255.0.0', 'ip_edit':'true', 'mask_edit':'true', 'type':'std', 'pos':'100,200'}, 19 {'if':'R1', 'hid':'R', 'ip':'[a].[b].[c].91', 'mask':'/23', 'ip_edit':'true', 'mask_edit':'true', 'type':'std', 'pos':'190,10'}, 20 {'if':'R2', 'hid':'R', 'ip':'[a].[b].[c].1', 'mask':'255.255.255.128', 'ip_edit':'false', 'mask_edit':'false', 'type':'std', 'pos':'0,190'}, 21 {'if':'R3', 'hid':'R', 'ip':'[a].[b].[c].244', 'mask':'255.255.255.192', 'ip_edit':'false', 'mask_edit':'false', 'type':'std', 'pos':'-170,0'}, 22 {'if':'S1', 'hid':'S', 'ip':'0.0.0.0', 'mask':'/32', 'ip_edit':'false', 'mask_edit':'false', 'pos':'0,0', 'type':'hidden'} 23 ]; 24 25 26 var links = [ 27 {'if1':'R1', 'if2':'S1'}, 28 {'if1':'S1', 'if2':'A1'}, 29 {'if1':'S1', 'if2':'B1'} 30 ]; 31 32 var goals = [ 33 {'id':'1', 'type':'reach', 'id1':'A', 'id2':'B'}, 34 {'id':'2', 'type':'reach', 'id1':'A', 'id2':'R'}, 35 {'id':'3', 'type':'reach', 'id1':'B', 'id2':'R'} 36 ];