-void dump_vertices(void)
-{
- avl_node_t *node;
- edge_t *v;
-cp
- syslog(LOG_DEBUG, _("Vertices:"));
-
- for(node = edge_tree->head; node; node = node->next)
- {
- v = (edge_t *)node->data;
- syslog(LOG_DEBUG, _(" %s - %s options %ld"),
- v->from->name, v->to->name, v->options);
- }
-
- syslog(LOG_DEBUG, _("End of vertices."));
-cp
+void dump_edges(void) {
+ avl_node_t *node, *node2;
+ node_t *n;
+ edge_t *e;
+ char *address;
+
+ logger(LOG_DEBUG, "Edges:");
+
+ for(node = node_tree->head; node; node = node->next) {
+ n = node->data;
+ for(node2 = n->edge_tree->head; node2; node2 = node2->next) {
+ e = node2->data;
+ address = sockaddr2hostname(&e->address);
+ logger(LOG_DEBUG, " %s to %s at %s options %x weight %d",
+ e->from->name, e->to->name, address, e->options, e->weight);
+ free(address);
+ }
+ }
+
+ logger(LOG_DEBUG, "End of edges.");