mirror of
https://github.com/genodelabs/genode.git
synced 2024-12-19 13:47:56 +00:00
nic_router.inc: allow for individual peer names
Previously, the function that returned the XML config for a network test client/server in the scripts formed the component name of the peer solely by combining the protocol name, "client" or "server", and a suffix that is given as argument. However, to group multiple clients together in one domain via their session label at the NIC router we want peers with the same name prefix. Thus, the function now simply takes the whole name as argument. Issue #2609
This commit is contained in:
parent
0a77987778
commit
cfbd1f0749
@ -15,14 +15,14 @@ create_boot_directory
|
||||
|
||||
proc test_1_config { } {
|
||||
if {[enable_test_1]} { return "
|
||||
[client_config udp 2 10.0.2.212 10.0.2.1 255.255.255.0 nic_bridge 1 10.0.2.55]
|
||||
[server_config udp 2 18.17.16.15 18.17.16.14 255.255.0.0 nic_router 1 ]" }
|
||||
[client_config udp_client_2 udp 10.0.2.212 10.0.2.1 255.255.255.0 nic_bridge 1 10.0.2.55]
|
||||
[server_config udp_server_2 udp 18.17.16.15 18.17.16.14 255.255.0.0 nic_router 1 ]" }
|
||||
}
|
||||
|
||||
proc test_2_config { } {
|
||||
if {[enable_test_2]} { return "
|
||||
[client_config http 1 10.0.2.201 10.0.2.1 255.255.255.0 nic_bridge 80 10.0.2.55]
|
||||
[server_config http 1 192.168.1.18 192.168.1.1 255.255.255.0 nic_router 80 ]" }
|
||||
[client_config http_client_1 http 10.0.2.201 10.0.2.1 255.255.255.0 nic_bridge 80 10.0.2.55]
|
||||
[server_config http_server_1 http 192.168.1.18 192.168.1.1 255.255.255.0 nic_router 80 ]" }
|
||||
}
|
||||
|
||||
append config {
|
||||
|
@ -71,9 +71,9 @@ proc server_bin { prot } {
|
||||
if {$prot == "udp"} { return "test-lwip-udp-server" }
|
||||
if {$prot == "http"} { return "test-lwip_httpsrv_static" } }
|
||||
|
||||
proc client_config { prot index ip_addr gateway netmask nic srv_port srv_ip } {
|
||||
proc client_config { name prot ip_addr gateway netmask nic srv_port srv_ip } {
|
||||
append result {
|
||||
<start name="} $prot {_client_} $index {" caps="200" priority="-1">
|
||||
<start name="} $name {" caps="200" priority="-1">
|
||||
<binary name="} [client_bin $prot] {" />
|
||||
<resource name="RAM" quantum="10M"/>
|
||||
<route>
|
||||
@ -89,9 +89,9 @@ proc client_config { prot index ip_addr gateway netmask nic srv_port srv_ip } {
|
||||
return $result
|
||||
}
|
||||
|
||||
proc server_config { prot index ip_addr gateway netmask nic port } {
|
||||
proc server_config { name prot ip_addr gateway netmask nic port } {
|
||||
append result {
|
||||
<start name="} $prot {_server_} $index {" caps="200" priority="-1">
|
||||
<start name="} $name {" caps="200" priority="-1">
|
||||
<binary name="} [server_bin $prot] {" />
|
||||
<resource name="RAM" quantum="10M"/>
|
||||
<route>
|
||||
|
@ -17,38 +17,38 @@ create_boot_directory
|
||||
|
||||
proc test_1_config { } {
|
||||
if {[enable_test_1]} { return "
|
||||
[client_config udp 1 10.0.98.55 10.0.98.33 255.255.255.0 nic_router 1337 10.0.98.33]
|
||||
[server_config udp 1 10.0.99.55 10.0.99.33 255.255.255.0 nic_router 1337 ]" }
|
||||
[client_config udp_client_1 udp 10.0.98.55 10.0.98.33 255.255.255.0 nic_router 1337 10.0.98.33]
|
||||
[server_config udp_server_1 udp 10.0.99.55 10.0.99.33 255.255.255.0 nic_router 1337 ]" }
|
||||
}
|
||||
|
||||
proc test_2_config { } {
|
||||
if {[enable_test_2]} { return "
|
||||
[client_config udp 2 10.0.2.212 10.0.2.1 255.255.255.0 nic_bridge 1 10.0.2.55]
|
||||
[server_config udp 2 18.17.16.15 18.17.16.14 255.255.0.0 nic_router 1 ]" }
|
||||
[client_config udp_client_2 udp 10.0.2.212 10.0.2.1 255.255.255.0 nic_bridge 1 10.0.2.55]
|
||||
[server_config udp_server_2 udp 18.17.16.15 18.17.16.14 255.255.0.0 nic_router 1 ]" }
|
||||
}
|
||||
|
||||
proc test_3_config { } {
|
||||
if {[enable_test_3]} { return "
|
||||
[client_config udp 3 217.13.192.2 217.13.192.1 255.255.192.0 nic_router 65535 10.0.2.213]
|
||||
[server_config udp 3 10.0.2.213 10.0.2.55 255.255.255.0 nic_bridge 65535 ]" }
|
||||
[client_config udp_client_3 udp 217.13.192.2 217.13.192.1 255.255.192.0 nic_router 65535 10.0.2.213]
|
||||
[server_config udp_server_3 udp 10.0.2.213 10.0.2.55 255.255.255.0 nic_bridge 65535 ]" }
|
||||
}
|
||||
|
||||
proc test_4_config { } {
|
||||
if {[enable_test_4]} { return "
|
||||
[client_config http 1 10.0.2.201 10.0.2.1 255.255.255.0 nic_bridge 80 10.0.2.55]
|
||||
[server_config http 1 192.168.1.18 192.168.1.1 255.255.255.0 nic_router 80 ]" }
|
||||
[client_config http_client_1 http 10.0.2.201 10.0.2.1 255.255.255.0 nic_bridge 80 10.0.2.55]
|
||||
[server_config http_server_1 http 192.168.1.18 192.168.1.1 255.255.255.0 nic_router 80 ]" }
|
||||
}
|
||||
|
||||
proc test_5_config { } {
|
||||
if {[enable_test_5]} { return "
|
||||
[client_config http 2 10.0.2.202 10.0.2.1 255.255.255.0 nic_bridge 8080 10.0.2.55]
|
||||
[server_config http 2 192.168.2.72 192.168.2.1 255.255.255.0 nic_router 8080 ]" }
|
||||
[client_config http_client_2 http 10.0.2.202 10.0.2.1 255.255.255.0 nic_bridge 8080 10.0.2.55]
|
||||
[server_config http_server_2 http 192.168.2.72 192.168.2.1 255.255.255.0 nic_router 8080 ]" }
|
||||
}
|
||||
|
||||
proc test_6_config { } {
|
||||
if {[enable_test_6]} { return "
|
||||
[client_config http 3 100.200.0.128 100.200.0.1 255.255.0.0 nic_router 2345 10.0.2.203]
|
||||
[server_config http 3 10.0.2.203 10.0.2.1 255.255.255.0 nic_bridge 2345 ]" }
|
||||
[client_config http_client_3 http 100.200.0.128 100.200.0.1 255.255.0.0 nic_router 2345 10.0.2.203]
|
||||
[server_config http_server_3 http 10.0.2.203 10.0.2.1 255.255.255.0 nic_bridge 2345 ]" }
|
||||
}
|
||||
|
||||
append config {
|
||||
|
Loading…
Reference in New Issue
Block a user