aboutsummaryrefslogtreecommitdiffstats
path: root/gg_map
diff options
context:
space:
mode:
authorLaurent Ghigonis <laurent@p1sec.com>2012-12-13 16:32:07 +0100
committerLaurent Ghigonis <laurent@p1sec.com>2012-12-13 16:32:07 +0100
commita86e79d2d3495258bbe41b67c14c0f24679bee27 (patch)
tree6d3dc123a0aae9b7ccb551432bd325b285ceb2e2 /gg_map
parentimplement node group parenting, for now only for the existing GROUP_ADDRESS (diff)
downloadglouglou-a86e79d2d3495258bbe41b67c14c0f24679bee27.tar.xz
glouglou-a86e79d2d3495258bbe41b67c14c0f24679bee27.zip
adapt to use libggnet group parenting
Diffstat (limited to 'gg_map')
-rw-r--r--gg_map/gg_map.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/gg_map/gg_map.c b/gg_map/gg_map.c
index 4045088..2f971a3 100644
--- a/gg_map/gg_map.c
+++ b/gg_map/gg_map.c
@@ -39,12 +39,16 @@ ip_to_str(u_int ip)
}
static void
-_cb_ggnet_addgroup(struct ggnet *net, struct ggnet_nodegroup *group)
+_cb_ggnet_addgroup(struct ggnet *net, struct ggnet_nodegroup *group,
+ struct ggnet_nodegroup *parent)
{
Egraph_Vertice *vgroup;
vgroup = egraph_group_add(_egraph, ip_to_str(group->addr.s_addr), group);
ggnet_nodegroup_usrdata_set(group, vgroup);
+ if (parent)
+ egraph_group_vertice_attach(_egraph, vgroup,
+ ggnet_nodegroup_usrdata_get(parent));
}
static void