diff options
author | Michele Marchetto <michele@cvs.openbsd.org> | 2008-12-07 16:37:05 +0000 |
---|---|---|
committer | Michele Marchetto <michele@cvs.openbsd.org> | 2008-12-07 16:37:05 +0000 |
commit | a94dcf486e75ff88ac96ebb70ea645ac590d7790 (patch) | |
tree | 6f5746cf1387165e3befbe601f3b78e64cfc8006 /usr.sbin/dvmrpd/rde.h | |
parent | 937ea0ca28ed1018caad86ddd1942cd54d6f962e (diff) |
Kill src_node structure. It is mostly redundant with rt_node and
adds unneeded complexity. Move any stuff to rt_node structure.
Diffstat (limited to 'usr.sbin/dvmrpd/rde.h')
-rw-r--r-- | usr.sbin/dvmrpd/rde.h | 29 |
1 files changed, 12 insertions, 17 deletions
diff --git a/usr.sbin/dvmrpd/rde.h b/usr.sbin/dvmrpd/rde.h index e47a6d2cc4a..364aa1aa64b 100644 --- a/usr.sbin/dvmrpd/rde.h +++ b/usr.sbin/dvmrpd/rde.h @@ -1,4 +1,4 @@ -/* $OpenBSD: rde.h,v 1.6 2008/12/02 13:42:44 michele Exp $ */ +/* $OpenBSD: rde.h,v 1.7 2008/12/07 16:37:04 michele Exp $ */ /* * Copyright (c) 2005, 2006 Esben Norby <norby@openbsd.org> @@ -26,6 +26,11 @@ #include <event.h> #include <limits.h> +struct adv_rtr { + struct in_addr addr; + u_int32_t metric; +}; + struct rt_node { RB_ENTRY(rt_node) entry; struct event expiration_timer; @@ -36,6 +41,9 @@ struct rt_node { u_int32_t cost; u_int32_t old_cost; /* used when in hold-down */ u_short ifindex; /* learned from this iface */ + struct adv_rtr adv_rtr[MAXVIFS]; + u_int16_t ds_cnt[MAXVIFS]; + LIST_HEAD(, ds_nbr) ds_list; time_t uptime; u_int8_t flags; u_int8_t prefixlen; @@ -62,25 +70,12 @@ struct rde_nbr { struct iface *iface; }; -struct ds { - LIST_ENTRY(ds) entry; +/* downstream neighbor per source */ +struct ds_nbr { + LIST_ENTRY(ds_nbr) entry; struct in_addr addr; }; -struct adv_rtr { - struct in_addr addr; - u_int32_t metric; -}; - -struct src_node { - RB_ENTRY(src_node) entry; - struct in_addr origin; - struct in_addr mask; - struct adv_rtr adv_rtr[MAXVIFS]; - u_int16_t ds_cnt[MAXVIFS]; - LIST_HEAD(, ds) ds_list; -}; - /* rde.c */ pid_t rde(struct dvmrpd_conf *, int [2], int [2], int [2]); int rde_imsg_compose_parent(int, pid_t, void *, u_int16_t); |