diff options
Diffstat (limited to 'ldpd/ldpe.h')
| -rw-r--r-- | ldpd/ldpe.h | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/ldpd/ldpe.h b/ldpd/ldpe.h index 52899fd85c..81add63836 100644 --- a/ldpd/ldpe.h +++ b/ldpd/ldpe.h @@ -32,6 +32,9 @@ #define min(x,y) ((x) <= (y) ? (x) : (y)) #define max(x,y) ((x) > (y) ? (x) : (y)) +/* forward declarations */ +TAILQ_HEAD(mapping_head, mapping_entry); + struct hello_source { enum hello_type type; struct { @@ -42,9 +45,7 @@ struct hello_source { }; struct adj { - LIST_ENTRY(adj) global_entry; - LIST_ENTRY(adj) nbr_entry; - LIST_ENTRY(adj) ia_entry; + RB_ENTRY(adj) global_entry, nbr_entry, ia_entry; struct in_addr lsr_id; struct nbr *nbr; int ds_tlv; @@ -53,6 +54,9 @@ struct adj { uint16_t holdtime; union ldpd_addr trans_addr; }; +RB_PROTOTYPE(global_adj_head, adj, global_entry, adj_compare) +RB_PROTOTYPE(nbr_adj_head, adj, nbr_entry, adj_compare) +RB_PROTOTYPE(ia_adj_head, adj, ia_entry, adj_compare) struct tcp_conn { struct nbr *nbr; @@ -67,7 +71,7 @@ struct tcp_conn { struct nbr { RB_ENTRY(nbr) id_tree, addr_tree, pid_tree; struct tcp_conn *tcp; - LIST_HEAD(, adj) adj_list; /* adjacencies */ + struct nbr_adj_head adj_tree; /* adjacencies */ struct thread *ev_connect; struct thread *keepalive_timer; struct thread *keepalive_timeout; |
