From 160cdde66877174874dbd7dcc1d6755eb30a0cd8 Mon Sep 17 00:00:00 2001 From: sin Date: Sun, 21 Sep 2014 19:27:22 +0100 Subject: Lay the ground for IPv6 support --- config.def.h | 36 ++++++++++++++++++++++++------------ ratox.c | 5 +++-- 2 files changed, 27 insertions(+), 14 deletions(-) diff --git a/config.def.h b/config.def.h index 68ebb3f..5dfbe1d 100644 --- a/config.def.h +++ b/config.def.h @@ -2,62 +2,74 @@ static struct node nodes[] = { { - .addr = "192.254.75.98", + .addr4 = "192.254.75.98", + .addr6 = "2607:5600:284::2", .port = 33445, .idstr = "951C88B7E75C867418ACDB5D273821372BB5BD652740BCDF623A4FA293E75D2F" }, { - .addr = "31.7.57.236", + .addr4 = "31.7.57.236", + .addr6 = "2a02:29b8:1737::fee1:bad:6483:467d", .port = 443, .idstr = "2A4B50D1D525DA2E669592A20C327B5FAD6C7E5962DC69296F9FEC77C4436E4E" }, { - .addr = "107.161.17.51", + .addr4 = "107.161.17.51", + .addr6 = "2604:180:1:57:1::", .port = 33445, .idstr = "7BE3951B97CA4B9ECDDA768E8C52BA19E9E2690AB584787BF4C90E04DBB75111" }, { - .addr = "144.76.60.215", + .addr4 = "144.76.60.215", + .addr6 = "2a01:4f8:191:64d6::1", .port = 33445, .idstr = "04119E835DF3E78BACF0F84235B300546AF8B936F035185E2A8E9E0A67C8924F", }, { - .addr = "23.226.230.47", + .addr4 = "23.226.230.47", + .addr6 = "2604:180:1::3ded:b280", .port = 33445, .idstr = "A09162D68618E742FFBCA1C2C70385E6679604B2D80EA6E84AD0996A1AC8A074" }, { - .addr = "37.59.102.176", + .addr4 = "37.59.102.176", + .addr6 = "2001:41d0:51:1:0:0:0:cc", .port = 33445, .idstr = "B98A2CEAA6C6A2FADC2C3632D284318B60FE5375CCB41EFA081AB67F500C1B0B" }, { - .addr = "37.187.46.132", + .addr4 = "37.187.46.132", + .addr6 = "2001:41d0:0052::0507", .port = 33445, .idstr = "5EB67C51D3FF5A9D528D242B669036ED2A30F8A60E674C45E7D43010CB2E1331" }, { - .addr = "178.21.112.187", + .addr4 = "178.21.112.187", + .addr6 = "2a02:2308::216:3eff:fe82:eaef", .port = 33445, .idstr = "4B2C19E924972CB9B57732FB172F8A8604DE13EEDA2A6234E348983344B23057" }, { - .addr = "192.210.149.121", + .addr4 = "192.210.149.121", + .addr6 = NULL, .port = 33445, .idstr = "F404ABAA1C99A9D37D61AB54898F56793E1DEF8BD46B1038B9D822E8460FAB67", }, { - .addr = "54.199.139.199", + .addr4 = "54.199.139.199", + .addr6 = NULL, .port = 33445, .idstr = "7F9C31FE850E97CEFD4C4591DF93FC757C7C12549DDD55F8EEAECC34FE76C029" }, { - .addr = "63.165.243.15", + .addr4 = "63.165.243.15", + .addr6 = NULL, .port = 443, .idstr = "8CD087E31C67568103E8C2A28653337E90E6B8EDA0D765D57C6B5172B4F1F04C" }, { - .addr = "195.154.119.113", + .addr4 = "195.154.119.113", + .addr6 = "2001:bc8:3698:101::1", .port = 33445, .idstr = "E398A69646B8CEACA9F0B84F553726C1C49270558C57DF5F3C368F05A7D71354" } diff --git a/ratox.c b/ratox.c index 84f2291..fb7c4cd 100644 --- a/ratox.c +++ b/ratox.c @@ -37,7 +37,8 @@ const char *reqerr[] = { }; struct node { - char *addr; + char *addr4; + char *addr6; uint16_t port; char *idstr; }; @@ -743,7 +744,7 @@ toxconnect(void) for (i = 0; i < LEN(nodes); i++) { n = &nodes[i]; str2id(n->idstr, id); - tox_bootstrap_from_address(tox, n->addr, n->port, id); + tox_bootstrap_from_address(tox, n->addr4, n->port, id); } return 0; } -- cgit v1.2.3