summaryrefslogtreecommitdiff
path: root/proto/ospf/rt.h
diff options
context:
space:
mode:
Diffstat (limited to 'proto/ospf/rt.h')
-rw-r--r--proto/ospf/rt.h30
1 files changed, 19 insertions, 11 deletions
diff --git a/proto/ospf/rt.h b/proto/ospf/rt.h
index 559fa5c6..6b23bffe 100644
--- a/proto/ospf/rt.h
+++ b/proto/ospf/rt.h
@@ -17,22 +17,31 @@
typedef struct orta
{
int type;
- u32 options;
- /* router-LSA style options (for ORT_ROUTER), with V,E,B bits.
- In OSPFv2, ASBRs from another areas (that we know from rt-summary-lsa),
- have just ORTA_ASBR in options, their real options are unknown */
+ u32 options;
+ /*
+ * For ORT_ROUTER routes, options field are router-LSA style
+ * options, with V,E,B bits. In OSPFv2, ASBRs from another areas
+ * (that we know from rt-summary-lsa) have just ORTA_ASBR in
+ * options, their real options are unknown.
+ */
#define ORTA_ASBR OPT_RT_E
#define ORTA_ABR OPT_RT_B
- struct ospf_area *oa;
+ /*
+ * For ORT_NET routes, the field is almost unused with one
+ * exception: ORTA_PREF for external routes means that the route is
+ * preferred in AS external route selection according to 16.4.1. -
+ * it is intra-area path using non-backbone area. In other words,
+ * the forwarding address (or ASBR if forwarding address is zero) is
+ * intra-area (type == RTS_OSPF) and its area is not a backbone.
+ */
+#define ORTA_PREF 0x80000000
u32 metric1;
u32 metric2;
- ip_addr nh; /* Next hop */
- struct ospf_iface *ifa; /* Outgoing interface */
- struct top_hash_entry *ar; /* Advertising router (or ABR) */
u32 tag;
u32 rid; /* Router ID of real advertising router */
- /* For ext-LSA from different area, 'ar' is a type 1 LSA of ABR.
- Router ID of real advertising router is stored in 'rid'. */
+ struct ospf_area *oa;
+ struct ospf_iface *ifa; /* Outgoing interface */
+ ip_addr nh; /* Next hop */
}
orta;
@@ -41,7 +50,6 @@ typedef struct ort
struct fib_node fn;
orta n;
orta o;
- struct ort *efn; /* For RFC1583 */
}
ort;