]> git.ipfire.org Git - thirdparty/bird.git/commitdiff
IPv6 changes.
authorOndrej Filip <feela@network.cz>
Tue, 13 Apr 1999 18:21:53 +0000 (18:21 +0000)
committerOndrej Filip <feela@network.cz>
Tue, 13 Apr 1999 18:21:53 +0000 (18:21 +0000)
proto/ospf/config.Y
proto/ospf/ospf.c
proto/ospf/ospf.h

index 3f416237c100d2d9fe164e8af8ca6593019dbdad..9840def055fbcfb61e678bb2862bf9434c19e72b 100644 (file)
@@ -14,6 +14,8 @@ CF_DECLS
 
 CF_KEYWORDS(OSPF, AREA)
 
+%type <i> idval
+
 CF_GRAMMAR
 
 CF_ADDTO(proto, ospf_proto '}')
@@ -29,7 +31,7 @@ ospf_proto:
  | ospf_proto ospf_area ';'
  ;
 
-ospf_area: AREA IPA {
+ospf_area: AREA idval ';' {
     ((struct ospf_config *)this_proto)->area = $2;
  }
  ;
index 79d29a99f29c14d3cc033b3e52458046241573ae..fbbc68d7e422730b038967fb13e7f8a8a3177875 100644 (file)
@@ -91,7 +91,7 @@ byte
 ospf_iface_clasify(struct iface *ifa)
 {
   if((ifa->flags & (IF_MULTIACCESS|IF_MULTICAST))==
-    IF_MULTIACCESS|IF_MULTICAST) return OSPF_IM_MULTICAST;
+    IF_MULTIACCESS|IF_MULTICAST) return OSPF_IM_BROADCAST;
   if((ifa->flags & (IF_MULTIACCESS|IF_MULTICAST))==
     IF_MULTIACCESS) return OSPF_IM_NBMA;
   return OSPF_IM_PTP;
@@ -112,9 +112,11 @@ ospf_iface_default(struct ospf_iface *ifa)
   ifa->autype=0;
   for(i=0;i<8;i++) ifa->aukey[i]=0;
   ifa->options=0;
-  ifa->dr=ipa_from_u32(0x00000000);
-  ifa->bdr=ipa_from_u32(0x00000000);
-  ifa->mode=ospf_iface_clasify(ifa->iface);
+  ifa->drip=ipa_from_u32(0x00000000);
+  ifa->drid=0;
+  ifa->bdrip=ipa_from_u32(0x00000000);
+  ifa->bdrid=0;
+  ifa->type=ospf_iface_clasify(ifa->iface);
 }
 
 void
index 44a8e79f1bb09819de2d84957d1d9224a7de526a..2965d8e77e4be119d3a638e941e20d57cc30628c 100644 (file)
 #define _BIRD_OSPF_H_
 
 #define OSPF_PROTO 89
+#ifndef IPV6
 #define AllSPFRouters ipa_from_u32(0xe0000005) /* 224.0.0.5 */
 #define AllDRouters ipa_from_u32(0xe0000006)   /* 224.0.0.6 */
+#else
+#error Multicast address not defined
+#endif
+
 
 struct ospf_config {
   struct proto_config c;
-  ip_addr area;                /* Area ID  !!! This is wrong !!! */
+  u32 area;            /* Area ID  !!! This is wrong !!!
+                         * Should respect interface */
   list iface_list;
 };
 
@@ -35,12 +41,14 @@ struct ospf_iface {
   u16 autype;
   u8 aukey[8];
   u8 options;
-  ip_addr dr;          /* Designated router */
-  ip_addr bdr;         /* Backup DR */
-  byte mode;
-#define OSPF_IM_MULTICAST 0
-#define OSPF_IM_PTP 1
-#define OSPF_IM_NBMA 2
+  ip_addr drip;                /* Designated router */
+  u32 drid;
+  ip_addr bdrip;       /* Backup DR */
+  u32 bdrid;
+  int type;
+#define OSPF_IM_BROADCAST 0
+#define OSPF_IM_NBMA 1
+#define OSPF_IM_PTP 2
 
 /* Default values for interface parameters */
 #define COST_D 10