[Pkg-privacy-commits] [onioncat] 104/340: dot.cat root peer added
Ximin Luo
infinity0 at moszumanska.debian.org
Sat Aug 22 13:04:29 UTC 2015
This is an automated email from the git hooks/post-receive script.
infinity0 pushed a commit to branch debian
in repository onioncat.
commit 001536a72a66cd172e465232e13d482ea08d64a9
Author: eagle <eagle at 58e1ccc2-750e-0410-8d0d-f93ca75ab447>
Date: Wed Dec 24 20:27:00 2008 +0000
dot.cat root peer added
git-svn-id: http://www.cypherpunk.at/svn/onioncat/trunk@400 58e1ccc2-750e-0410-8d0d-f93ca75ab447
---
src/ocat.h | 2 +-
src/ocatsetup.c | 15 ++++++++-------
2 files changed, 9 insertions(+), 8 deletions(-)
diff --git a/src/ocat.h b/src/ocat.h
index bd15ecf..2f753c2 100644
--- a/src/ocat.h
+++ b/src/ocat.h
@@ -245,7 +245,7 @@ struct OcatSetup
FILE *logf;
int daemon;
//! hardcoded permanent peers
-#define ROOT_PEERS 1
+#define ROOT_PEERS 2
struct in6_addr root_peer[ROOT_PEERS];
time_t uptime;
};
diff --git a/src/ocatsetup.c b/src/ocatsetup.c
index f8e6bfc..629ad86 100644
--- a/src/ocatsetup.c
+++ b/src/ocatsetup.c
@@ -46,7 +46,9 @@ struct OcatSetup setup_ =
0, // daemon
{
{{{0xfd, 0x87, 0xd8, 0x7e, 0xeb, 0x43,
- 0xed, 0xb1, 0x8, 0xe4, 0x35, 0x88, 0xe5, 0x46, 0x35, 0xca}}} // initial permanent peer "5wyqrzbvrdsumnok"
+ 0xed, 0xb1, 0x08, 0xe4, 0x35, 0x88, 0xe5, 0x46, 0x35, 0xca}}}, // initial permanent peer "5wyqrzbvrdsumnok" (mail.root-servers.cat)
+ {{{0xfd, 0x87, 0xd8, 0x7e, 0xeb, 0x43,
+ 0xf6, 0x83, 0x64, 0xac, 0x73, 0xf9, 0x61, 0xac, 0x9a, 0x00}}} // initial permanent peer "62bwjldt7fq2zgqa" (dot.cat)
},
0
};
@@ -63,15 +65,12 @@ void init_setup(void)
void print_setup_struct(FILE *f)
{
- char ip[SBUF], nm[SBUF], ip6[SBUF], logf[SBUF], hw[SBUF], rp[ROOT_PEERS][SBUF];
+ char ip[SBUF], nm[SBUF], ip6[SBUF], logf[SBUF], hw[SBUF], rp[SBUF];
int i, t;
inet_ntop(AF_INET, &setup_.ocat_addr4, ip, SBUF);
inet_ntop(AF_INET, &setup_.ocat_addr4_mask, nm, SBUF);
inet_ntop(AF_INET6, &setup_.ocat_addr, ip6, SBUF);
- for (i = 0; i < ROOT_PEERS; i++)
- inet_ntop(AF_INET6, &setup_.root_peer[i], rp[i], SBUF);
-
ether_ntoa_r((struct ether_addr*) setup_.ocat_hwaddr, hw);
if (setup_.logf == stderr)
@@ -111,7 +110,6 @@ void print_setup_struct(FILE *f)
"logfn = \"%s\"\n"
"logf = %s\n"
"daemon = %d\n"
- "root_peer[0] = %s\n"
"uptime = %d days, %d:%02d\n",
IPV4_KEY, ntohl(setup_.fhd_key[IPV4_KEY]), IPV6_KEY, ntohl(setup_.fhd_key[IPV6_KEY]),
@@ -141,8 +139,11 @@ void print_setup_struct(FILE *f)
setup_.logfn,
logf,
setup_.daemon,
- rp[0],
t / (3600 * 24), t / 3600 % 24, t / 60 % 60
);
+
+ for (i = 0; i < ROOT_PEERS; i++)
+ if (inet_ntop(AF_INET6, &setup_.root_peer[i], rp, SBUF))
+ fprintf(f, "root_peer[%d] = %s\n", i, rp);
}
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-privacy/packages/onioncat.git
More information about the Pkg-privacy-commits
mailing list