summaryrefslogtreecommitdiffstats
path: root/src/babel.c
diff options
context:
space:
mode:
authorMatthias Schiffer <mschiffer@universe-factory.net>2014-03-18 17:56:29 +0100
committerMatthias Schiffer <mschiffer@universe-factory.net>2014-03-18 17:56:29 +0100
commit3af74a4b534186c966728785a05b0f72dc2b6048 (patch)
treee1f4796683d7d03cfc9d8a2e77401e15de694708 /src/babel.c
parent0587bef25eb23f58aad1cd0b39d6bcb2dd074578 (diff)
downloadbabel-3af74a4b534186c966728785a05b0f72dc2b6048.tar
babel-3af74a4b534186c966728785a05b0f72dc2b6048.zip
Add GMRF debug calls
Diffstat (limited to 'src/babel.c')
-rw-r--r--src/babel.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/babel.c b/src/babel.c
index 4a2de19..c8781f8 100644
--- a/src/babel.c
+++ b/src/babel.c
@@ -68,6 +68,7 @@ static void maintain_neighbours(gmrf_context_t *ctx) {
neigh->addr.d[0], neigh->addr.d[1], neigh->addr.d[2], neigh->addr.d[3],
neigh->addr.d[4], neigh->addr.d[5], neigh->addr.d[6], neigh->addr.d[7],
gmrf_iface_get_name(ctx->gmrf, iface->gmrf_iface), (int)gp_babel_since(ctx, neigh->last_packet)*10);
+ gmrf_debug_neigh_lost(ctx->gmrf, iface->gmrf_iface, &neigh->addr);
*cur = *next;
next = cur;
@@ -81,6 +82,7 @@ static void maintain_neighbours(gmrf_context_t *ctx) {
neigh->addr.d[4], neigh->addr.d[5], neigh->addr.d[6], neigh->addr.d[7],
gmrf_iface_get_name(ctx->gmrf, iface->gmrf_iface), gp_babel_neigh_get_cost(ctx, neigh),
gp_babel_neigh_get_rxcost(ctx, neigh), gp_babel_neigh_get_txcost(ctx, neigh));
+ gmrf_debug_neigh(ctx->gmrf, iface->gmrf_iface, &neigh->addr, gp_babel_neigh_get_rxcost(ctx, neigh), gp_babel_neigh_get_txcost(ctx, neigh));
}
}
}
@@ -147,6 +149,8 @@ gmrf_context_t* gmrf_protocol_init(gmrf_t *gmrf) {
ctx->gmrf = gmrf;
gmrf_random_bytes(gmrf, &ctx->self, sizeof(gp_babel_node_id_t));
+ gmrf_debug_init(gmrf, ctx->self.id, sizeof(gp_babel_node_id_t));
+
gp_babel_route_t *route = gp_babel_route_new(ctx);
route->node = ctx->self;