Hi, The following patch uses the hostname instead of "alamakota" when announcing the router on the local interface. It would make it possible for visualisation tools, such as babelweb, to display a meaningful name automatically.
Best, Gabriel --- local.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-)
>From 5ba875071807471f2a7d309d42a8b0947136e1fb Mon Sep 17 00:00:00 2001 From: Gabriel Kerneis <[email protected]> Date: Wed, 19 Dec 2012 15:15:45 +0000 Subject: [PATCH] Announce hostname on local interface --- local.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/local.c b/local.c index e0e95d7..039b05c 100644 --- a/local.c +++ b/local.c @@ -91,13 +91,19 @@ void local_notify_self() { char buf[512]; + char host[64]; int rc; if(local_socket < 0) return; - rc = snprintf(buf, 512, "add self alamakota id %s\n", - format_eui64(myid)); + rc = gethostname(host, 64); + + if(rc < 0) + strncpy(host, "alamakota", 64); + + rc = snprintf(buf, 512, "add self %s id %s\n", + host, format_eui64(myid)); if(rc < 0 || rc >= 512) goto fail; -- 1.7.10.4
_______________________________________________ Babel-users mailing list [email protected] http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/babel-users

