diff options
author | irungentoo <irungentoo@gmail.com> | 2013-07-21 13:14:36 -0400 |
---|---|---|
committer | irungentoo <irungentoo@gmail.com> | 2013-07-21 13:14:36 -0400 |
commit | 7fecd73ae03245ffa39937ae0f815648c8c62832 (patch) | |
tree | fbfdc2181633891a148493857f1c9049b813bc11 /testing | |
parent | 38e49709c1857d2a8b6a3420492fee9fe74723d3 (diff) |
Added routing functions to DHT.
Diffstat (limited to 'testing')
-rw-r--r-- | testing/DHT_test.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/testing/DHT_test.c b/testing/DHT_test.c index 086cd554..5f85e934 100644 --- a/testing/DHT_test.c +++ b/testing/DHT_test.c | |||
@@ -44,6 +44,8 @@ void print_clientlist() | |||
44 | printf("\nIP: %u.%u.%u.%u Port: %u",p_ip.ip.c[0],p_ip.ip.c[1],p_ip.ip.c[2],p_ip.ip.c[3],ntohs(p_ip.port)); | 44 | printf("\nIP: %u.%u.%u.%u Port: %u",p_ip.ip.c[0],p_ip.ip.c[1],p_ip.ip.c[2],p_ip.ip.c[3],ntohs(p_ip.port)); |
45 | printf("\nTimestamp: %u", close_clientlist[i].timestamp); | 45 | printf("\nTimestamp: %u", close_clientlist[i].timestamp); |
46 | printf("\nLast pinged: %u\n", close_clientlist[i].last_pinged); | 46 | printf("\nLast pinged: %u\n", close_clientlist[i].last_pinged); |
47 | p_ip = close_clientlist[i].ret_ip_port; | ||
48 | printf("\nOUR IP: %u.%u.%u.%u Port: %u",p_ip.ip.c[0],p_ip.ip.c[1],p_ip.ip.c[2],p_ip.ip.c[3],ntohs(p_ip.port)); | ||
47 | } | 49 | } |
48 | } | 50 | } |
49 | 51 | ||
@@ -78,6 +80,8 @@ void print_friendlist() | |||
78 | printf("\nIP: %u.%u.%u.%u:%u",p_ip.ip.c[0],p_ip.ip.c[1],p_ip.ip.c[2],p_ip.ip.c[3],ntohs(p_ip.port)); | 80 | printf("\nIP: %u.%u.%u.%u:%u",p_ip.ip.c[0],p_ip.ip.c[1],p_ip.ip.c[2],p_ip.ip.c[3],ntohs(p_ip.port)); |
79 | printf("\nTimestamp: %u", friends_list[k].client_list[i].timestamp); | 81 | printf("\nTimestamp: %u", friends_list[k].client_list[i].timestamp); |
80 | printf("\nLast pinged: %u\n", friends_list[k].client_list[i].last_pinged); | 82 | printf("\nLast pinged: %u\n", friends_list[k].client_list[i].last_pinged); |
83 | p_ip = friends_list[k].client_list[i].ret_ip_port; | ||
84 | printf("\nret IP: %u.%u.%u.%u:%u",p_ip.ip.c[0],p_ip.ip.c[1],p_ip.ip.c[2],p_ip.ip.c[3],ntohs(p_ip.port)); | ||
81 | } | 85 | } |
82 | } | 86 | } |
83 | } | 87 | } |