diff options
Diffstat (limited to 'zebra')
-rw-r--r-- | zebra/ChangeLog | 6 | ||||
-rw-r--r-- | zebra/rib.h | 35 |
2 files changed, 23 insertions, 18 deletions
diff --git a/zebra/ChangeLog b/zebra/ChangeLog index 3295be83..06290010 100644 --- a/zebra/ChangeLog +++ b/zebra/ChangeLog @@ -1,3 +1,9 @@ +2006-02-09 Paul Jakma <paul.jakma@sun.com> + + * rib.h: (struct {rib,nexthop}) Rearrange fields to avoid + needless padding. + (struct rib) Remove the indirect pointer, not used anywhere! + 2006-02-02 Paul Jakma <paul.jakma@sun.com> * interface.c: (if_dump_vty) move flags to their line, neater. diff --git a/zebra/rib.h b/zebra/rib.h index a1a9e1db..3827b6e7 100644 --- a/zebra/rib.h +++ b/zebra/rib.h @@ -33,16 +33,28 @@ struct rib /* Link list. */ struct rib *next; struct rib *prev; + + /* Nexthop structure */ + struct nexthop *nexthop; + + /* Refrence count. */ + unsigned long refcnt; + + /* Uptime. */ + time_t uptime; /* ref count */ unsigned int lock; - + /* Type fo this route. */ int type; /* Which routing table */ int table; + /* Metric */ + u_int32_t metric; + /* Distance. */ u_char distance; @@ -50,21 +62,10 @@ struct rib ZEBRA_FLAG_* */ u_char flags; - /* Metric */ - u_int32_t metric; - - /* Uptime. */ - time_t uptime; - - /* Refrence count. */ - unsigned long refcnt; - /* Nexthop information. */ u_char nexthop_num; u_char nexthop_active_num; u_char nexthop_fib_num; - - struct nexthop *nexthop; }; /* Static route information. */ @@ -147,6 +148,10 @@ struct nexthop struct nexthop *next; struct nexthop *prev; + /* Interface index. */ + char *ifname; + unsigned int ifindex; + enum nexthop_types_t type; u_char flags; @@ -154,10 +159,6 @@ struct nexthop #define NEXTHOP_FLAG_FIB (1 << 1) /* FIB nexthop. */ #define NEXTHOP_FLAG_RECURSIVE (1 << 2) /* Recursive nexthop. */ - /* Interface index. */ - unsigned int ifindex; - char *ifname; - /* Nexthop address or interface name. */ union { @@ -177,8 +178,6 @@ struct nexthop struct in6_addr ipv6; #endif /* HAVE_IPV6 */ } rgate; - - struct nexthop *indirect; }; /* Routing table instance. */ |