-void dump_edges(void)
-{
- avl_node_t *node;
- edge_t *e;
- char *address;
-cp
- syslog(LOG_DEBUG, _("Edges:"));
-
- for(node = edge_tree->head; node; node = node->next)
- {
- e = (edge_t *)node->data;
- address = sockaddr2hostname(&e->address);
- syslog(LOG_DEBUG, _(" %s to %s at %s options %lx weight %d"),
- e->from->name, e->to->name, address,
- e->options, e->weight);
- free(address);
- }
-
- syslog(LOG_DEBUG, _("End of edges."));
-cp
+edge_t *lookup_edge(node_t *from, node_t *to) {
+ edge_t v;
+
+ v.from = from;
+ v.to = to;
+
+ return splay_search(from->edge_tree, &v);