diff options
author | dimitri staessens <dimitri.staessens@intec.ugent.be> | 2016-04-26 18:16:08 +0200 |
---|---|---|
committer | dimitri staessens <dimitri.staessens@intec.ugent.be> | 2016-04-26 18:16:08 +0200 |
commit | a17657c4321dc0770e5431467261eb2bc579f79c (patch) | |
tree | 9f64215f326c3847699ae8856ae9cd0d609cbfac /src/ipcpd/shim-udp/tests | |
parent | 45b7d79088174303193f8772c9b14fed2011551e (diff) | |
download | ouroboros-a17657c4321dc0770e5431467261eb2bc579f79c.tar.gz ouroboros-a17657c4321dc0770e5431467261eb2bc579f79c.zip |
shim-udp: resolve dst_name using DNS
This commits adds the gethostbyname call to resolve the dst_name for a
flow allocation using DNS. The DNS server should be specified using
the method mandated by the system (e.g. added to /etc/resolv.conf).
Diffstat (limited to 'src/ipcpd/shim-udp/tests')
-rw-r--r-- | src/ipcpd/shim-udp/tests/shim_udp_test.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/ipcpd/shim-udp/tests/shim_udp_test.c b/src/ipcpd/shim-udp/tests/shim_udp_test.c index 4e0c2dd6..d2b9c642 100644 --- a/src/ipcpd/shim-udp/tests/shim_udp_test.c +++ b/src/ipcpd/shim-udp/tests/shim_udp_test.c @@ -42,10 +42,10 @@ int shim_udp_test(int argc, char ** argv) int i = 0; char bogus[15]; - memset (&bogus, 0, 15); + memset(&bogus, 0, 15); struct dif_config conf; - memset (&conf, 0, sizeof conf); + memset(&conf, 0, sizeof conf); conf.dif_name = strdup("test-dif"); conf.type = IPCP_SHIM_UDP; conf.ip_addr = 0; @@ -63,11 +63,11 @@ int shim_udp_test(int argc, char ** argv) exit(1); } - if (ipcp_udp_bootstrap (&conf)) { + if (ipcp_udp_bootstrap(&conf)) { LOG_ERR("Could not bootstrap."); } - if(ipcp_udp_name_reg("bogus name")) { + if (ipcp_udp_name_reg("bogus name")) { LOG_ERR("Failed to register application."); shm_du_map_close(dum); exit(1); @@ -80,8 +80,8 @@ int shim_udp_test(int argc, char ** argv) } for (i = 0; i < 1000; ++i) { - sprintf (bogus, "bogus name %4d", i); - if(ipcp_udp_name_reg(bogus)) { + 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); @@ -89,7 +89,7 @@ int shim_udp_test(int argc, char ** argv) } for (i = 0; i < 1000; ++i) { - sprintf (bogus, "bogus name %4d", 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); |