summaryrefslogtreecommitdiff
path: root/src/ipcpd/shim-udp/tests/shim_udp_test.c
diff options
context:
space:
mode:
authordimitri staessens <dimitri.staessens@intec.ugent.be>2016-04-22 17:39:30 +0200
committerdimitri staessens <dimitri.staessens@intec.ugent.be>2016-04-22 17:39:30 +0200
commitf4f67651db3891652f4dd08dec990aa0560bb35c (patch)
tree38d9d3f171389a85fc9b6ab7dcb640029ac0d743 /src/ipcpd/shim-udp/tests/shim_udp_test.c
parentcd428b2b63230fce191ff3a90d5f6928aa50df46 (diff)
downloadouroboros-f4f67651db3891652f4dd08dec990aa0560bb35c.tar.gz
ouroboros-f4f67651db3891652f4dd08dec990aa0560bb35c.zip
irmd: reg/unreg whatevercast names
Unregistering ap's now works. An AP now registers/unregisters its AP-I by sending its AP name and its pid to the IRMd. The IPCPs register whatevercast names. An AP name is currently mapped on a whatevercast name represented by the same string literal. The IRMd allows registration of only one AP-I per AP. A Name Space Management system is needed in the processing system so we can resolve this completely. Changing the stack to register whatevercast names required some changes all over the ipcpd implemented and in the library.
Diffstat (limited to 'src/ipcpd/shim-udp/tests/shim_udp_test.c')
-rw-r--r--src/ipcpd/shim-udp/tests/shim_udp_test.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/src/ipcpd/shim-udp/tests/shim_udp_test.c b/src/ipcpd/shim-udp/tests/shim_udp_test.c
index 427d0e1e..0fcf9f4d 100644
--- a/src/ipcpd/shim-udp/tests/shim_udp_test.c
+++ b/src/ipcpd/shim-udp/tests/shim_udp_test.c
@@ -68,21 +68,21 @@ int shim_udp_test(int argc, char ** argv)
LOG_ERR("Could not bootstrap.");
}
- if(ipcp_udp_ap_reg("bogus ap", 1865)) {
+ if(ipcp_udp_name_reg("bogus name")) {
LOG_ERR("Failed to register application.");
shm_du_map_close(dum);
exit(1);
}
- if (ipcp_udp_ap_unreg(1865)) {
+ if (ipcp_udp_name_unreg("bogus name")) {
LOG_ERR("Failed to unregister application.");
shm_du_map_close(dum);
exit(1);
}
for (i = 0; i < 1000; ++i) {
- sprintf (bogus, "bogus ap %4d", i);
- if(ipcp_udp_ap_reg(bogus, i)) {
+ sprintf (bogus, "bogus name %4d", i);
+ if(ipcp_udp_name_reg(bogus)) {
LOG_ERR("Failed to register application %s.", bogus);
shm_du_map_close(dum);
exit(1);
@@ -90,8 +90,9 @@ int shim_udp_test(int argc, char ** argv)
}
for (i = 0; i < 1000; ++i) {
- if(ipcp_udp_ap_unreg(i)) {
- LOG_ERR("Failed to unregister application %d.", i);
+ sprintf (bogus, "bogus name %4d", i);
+ if(ipcp_udp_name_unreg(bogus)) {
+ LOG_ERR("Failed to unregister application %s.", bogus);
shm_du_map_close(dum);
exit(1);
}