Skip to content

Commit 792c2c3

Browse files
authored
Merge branch 'main' into edit-interface-ips
2 parents 46be9a2 + 579f53d commit 792c2c3

File tree

4 files changed

+401
-7
lines changed

4 files changed

+401
-7
lines changed

examples/httpClientServer.json

Lines changed: 221 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,221 @@
1+
{
2+
"nodes": [
3+
{
4+
"id": 1,
5+
"type": 0,
6+
"x": 4526.25,
7+
"y": 4781.484375,
8+
"interfaces": [
9+
{
10+
"name": "eth0",
11+
"mac": "00:00:10:00:00:01",
12+
"ip": "10.0.0.1"
13+
}
14+
],
15+
"tag": "HTTP server",
16+
"mask": "255.255.255.255",
17+
"arpTable": [],
18+
"runningPrograms": [
19+
{
20+
"pid": 1,
21+
"name": "Serve HTTP requests",
22+
"inputs": []
23+
}
24+
]
25+
},
26+
{
27+
"id": 2,
28+
"type": 1,
29+
"x": 4681.25,
30+
"y": 4855.484375,
31+
"interfaces": [
32+
{
33+
"name": "eth0",
34+
"mac": "00:00:10:00:00:02",
35+
"ip": "10.0.0.2"
36+
},
37+
{
38+
"name": "eth1",
39+
"mac": "00:00:10:00:00:03",
40+
"ip": "10.0.0.3"
41+
},
42+
{
43+
"name": "eth2",
44+
"mac": "00:00:10:00:00:04",
45+
"ip": "10.0.0.4"
46+
},
47+
{
48+
"name": "eth3",
49+
"mac": "00:00:10:00:00:05",
50+
"ip": "10.0.0.5"
51+
}
52+
],
53+
"tag": null,
54+
"mask": "255.255.255.255",
55+
"arpTable": [],
56+
"routingTable": [
57+
["10.0.0.1", "255.255.255.255", 0, false, false],
58+
["10.0.0.6", "255.255.255.255", 1, false, false],
59+
["10.0.0.10", "255.255.255.255", 1, false, false],
60+
["10.0.0.11", "255.255.255.255", 1, false, false]
61+
],
62+
"packetQueueSize": 4096,
63+
"bytesPerSecond": 1024
64+
},
65+
{
66+
"id": 3,
67+
"type": 1,
68+
"x": 4925.25,
69+
"y": 4973.484375,
70+
"interfaces": [
71+
{
72+
"name": "eth0",
73+
"mac": "00:00:10:00:00:06",
74+
"ip": "10.0.0.6"
75+
},
76+
{
77+
"name": "eth1",
78+
"mac": "00:00:10:00:00:07",
79+
"ip": "10.0.0.7"
80+
},
81+
{
82+
"name": "eth2",
83+
"mac": "00:00:10:00:00:08",
84+
"ip": "10.0.0.8"
85+
},
86+
{
87+
"name": "eth3",
88+
"mac": "00:00:10:00:00:09",
89+
"ip": "10.0.0.9"
90+
}
91+
],
92+
"tag": null,
93+
"mask": "255.255.255.255",
94+
"arpTable": [],
95+
"routingTable": [
96+
["10.0.0.1", "255.255.255.255", 0, false, false],
97+
["10.0.0.3", "255.255.255.255", 0, false, false],
98+
["10.0.0.10", "255.255.255.255", 1, false, false],
99+
["10.0.0.11", "255.255.255.255", 2, false, false]
100+
],
101+
"packetQueueSize": 4096,
102+
"bytesPerSecond": 1024
103+
},
104+
{
105+
"id": 4,
106+
"type": 0,
107+
"x": 5082.25,
108+
"y": 4960.484375,
109+
"interfaces": [
110+
{
111+
"name": "eth0",
112+
"mac": "00:00:10:00:00:0a",
113+
"ip": "10.0.0.10"
114+
}
115+
],
116+
"tag": "Client A",
117+
"mask": "255.255.255.255",
118+
"arpTable": [],
119+
"runningPrograms": []
120+
},
121+
{
122+
"id": 5,
123+
"type": 0,
124+
"x": 4969.25,
125+
"y": 5128.484375,
126+
"interfaces": [
127+
{
128+
"name": "eth0",
129+
"mac": "00:00:10:00:00:0b",
130+
"ip": "10.0.0.11"
131+
}
132+
],
133+
"tag": "Client B",
134+
"mask": "255.255.255.255",
135+
"arpTable": [],
136+
"runningPrograms": []
137+
}
138+
],
139+
"edges": [
140+
{
141+
"from": {
142+
"id": 2,
143+
"iface": 0
144+
},
145+
"to": {
146+
"id": 1,
147+
"iface": 0
148+
}
149+
},
150+
{
151+
"from": {
152+
"id": 2,
153+
"iface": 0
154+
},
155+
"to": {
156+
"id": 1,
157+
"iface": 0
158+
}
159+
},
160+
{
161+
"from": {
162+
"id": 3,
163+
"iface": 0
164+
},
165+
"to": {
166+
"id": 2,
167+
"iface": 1
168+
}
169+
},
170+
{
171+
"from": {
172+
"id": 3,
173+
"iface": 0
174+
},
175+
"to": {
176+
"id": 2,
177+
"iface": 1
178+
}
179+
},
180+
{
181+
"from": {
182+
"id": 4,
183+
"iface": 0
184+
},
185+
"to": {
186+
"id": 3,
187+
"iface": 1
188+
}
189+
},
190+
{
191+
"from": {
192+
"id": 5,
193+
"iface": 0
194+
},
195+
"to": {
196+
"id": 3,
197+
"iface": 2
198+
}
199+
},
200+
{
201+
"from": {
202+
"id": 4,
203+
"iface": 0
204+
},
205+
"to": {
206+
"id": 3,
207+
"iface": 1
208+
}
209+
},
210+
{
211+
"from": {
212+
"id": 5,
213+
"iface": 0
214+
},
215+
"to": {
216+
"id": 3,
217+
"iface": 2
218+
}
219+
}
220+
]
221+
}

examples/localNetwork.json

Lines changed: 171 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,171 @@
1+
{
2+
"nodes": [
3+
{
4+
"id": 1,
5+
"type": 2,
6+
"x": 4717.25,
7+
"y": 5001.484375,
8+
"interfaces": [
9+
{
10+
"name": "eth0",
11+
"mac": "00:00:10:00:00:01"
12+
},
13+
{
14+
"name": "eth1",
15+
"mac": "00:00:10:00:00:02"
16+
},
17+
{
18+
"name": "eth2",
19+
"mac": "00:00:10:00:00:03"
20+
},
21+
{
22+
"name": "eth3",
23+
"mac": "00:00:10:00:00:04"
24+
},
25+
{
26+
"name": "eth4",
27+
"mac": "00:00:10:00:00:05"
28+
},
29+
{
30+
"name": "eth5",
31+
"mac": "00:00:10:00:00:06"
32+
},
33+
{
34+
"name": "eth6",
35+
"mac": "00:00:10:00:00:07"
36+
},
37+
{
38+
"name": "eth7",
39+
"mac": "00:00:10:00:00:08"
40+
}
41+
],
42+
"tag": "Switch",
43+
"forwardingTable": []
44+
},
45+
{
46+
"id": 2,
47+
"type": 0,
48+
"x": 4738.75,
49+
"y": 4821.96875,
50+
"interfaces": [
51+
{
52+
"name": "eth0",
53+
"mac": "00:00:10:00:00:09",
54+
"ip": "10.0.0.1"
55+
}
56+
],
57+
"tag": "Host A",
58+
"mask": "255.255.255.255",
59+
"arpTable": [
60+
["10.0.0.2", "", false],
61+
["10.0.0.3", "", false],
62+
["10.0.0.4", "", false]
63+
],
64+
"runningPrograms": []
65+
},
66+
{
67+
"id": 3,
68+
"type": 0,
69+
"x": 4887.25,
70+
"y": 5141.484375,
71+
"interfaces": [
72+
{
73+
"name": "eth0",
74+
"mac": "00:00:10:00:00:0a",
75+
"ip": "10.0.0.2"
76+
}
77+
],
78+
"tag": "Host B",
79+
"mask": "255.255.255.255",
80+
"arpTable": [
81+
["10.0.0.1", "", false],
82+
["10.0.0.3", "", false],
83+
["10.0.0.4", "", false]
84+
],
85+
"runningPrograms": []
86+
},
87+
{
88+
"id": 4,
89+
"type": 0,
90+
"x": 4533.25,
91+
"y": 5135.484375,
92+
"interfaces": [
93+
{
94+
"name": "eth0",
95+
"mac": "00:00:10:00:00:0b",
96+
"ip": "10.0.0.3"
97+
}
98+
],
99+
"tag": "Host C",
100+
"mask": "255.255.255.255",
101+
"arpTable": [
102+
["10.0.0.1", "", false],
103+
["10.0.0.2", "", false],
104+
["10.0.0.4", "", false]
105+
],
106+
"runningPrograms": []
107+
}
108+
],
109+
"edges": [
110+
{
111+
"from": {
112+
"id": 3,
113+
"iface": 0
114+
},
115+
"to": {
116+
"id": 1,
117+
"iface": 0
118+
}
119+
},
120+
{
121+
"from": {
122+
"id": 1,
123+
"iface": 1
124+
},
125+
"to": {
126+
"id": 2,
127+
"iface": 0
128+
}
129+
},
130+
{
131+
"from": {
132+
"id": 4,
133+
"iface": 0
134+
},
135+
"to": {
136+
"id": 1,
137+
"iface": 2
138+
}
139+
},
140+
{
141+
"from": {
142+
"id": 1,
143+
"iface": 1
144+
},
145+
"to": {
146+
"id": 2,
147+
"iface": 0
148+
}
149+
},
150+
{
151+
"from": {
152+
"id": 3,
153+
"iface": 0
154+
},
155+
"to": {
156+
"id": 1,
157+
"iface": 0
158+
}
159+
},
160+
{
161+
"from": {
162+
"id": 4,
163+
"iface": 0
164+
},
165+
"to": {
166+
"id": 1,
167+
"iface": 2
168+
}
169+
}
170+
]
171+
}

0 commit comments

Comments
 (0)