]> git.ipfire.org Git - thirdparty/bird.git/commitdiff
More conf. items defined.
authorOndrej Filip <feela@network.cz>
Sat, 3 Jun 2000 09:50:31 +0000 (09:50 +0000)
committerOndrej Filip <feela@network.cz>
Sat, 3 Jun 2000 09:50:31 +0000 (09:50 +0000)
proto/ospf/config.Y
proto/ospf/ospf.h

index fe5b33df84847639e7f07b7068bdaafce3705b9d..dacb2b28da519b01cc56ef58f1734090ab64a53d 100644 (file)
@@ -21,7 +21,7 @@ CF_DECLS
 
 CF_KEYWORDS(OSPF, AREA, OSPF_METRIC1, OSPF_METRIC2, OSPF_TAG)
 CF_KEYWORDS(NEIGHBORS, RFC1583COMPAT, STUB, TICK, COST, RETRANSMIT)
-CF_KEYWORDS(HELLO)
+CF_KEYWORDS(HELLO, TRANSIT, PRIORITY, DEAD, NONBROADCAST, POINTOPOINT, TYPE)
 
 %type <t> opttext
 
@@ -73,8 +73,31 @@ ospf_iface_item:
  | COST NUM { OSPF_PATT->cost = $2 ; }
  | HELLO NUM { OSPF_PATT->helloint = $2 ; }
  | RETRANSMIT NUM { OSPF_PATT->rxmtint = $2 ; }
+ | TRANSIT DELAY NUM { OSPF_PATT->inftransdelay = $3 ; }
+ | PRIORITY NUM { OSPF_PATT->priority = $2 ; }
+ | WAIT NUM { OSPF_PATT->waitint = $2 ; }
+ | DEAD COUNT NUM { OSPF_PATT->deadc = $3 ; }
+ | TYPE BROADCAST { OSPF_PATT->type = OSPF_IT_BCAST ; }
+ | TYPE NONBROADCAST { OSPF_PATT->type = OSPF_IT_NBMA ; }
+ | TYPE POINTOPOINT { OSPF_PATT->type = OSPF_IT_PTP ; }
+ | 
 ;
  
+ospf_iface_start:
+ {
+  this_ipatt = cfg_allocz(sizeof(struct ospf_iface_patt));
+  add_tail(&this_area->patt_list, NODE this_ipatt);
+  OSPF_PATT->cost = COST_D;
+  OSPF_PATT->helloint = HELLOINT_D;
+  OSPF_PATT->rxmtint = RXMTINT_D;
+  OSPF_PATT->inftransdelay = INFTRANSDELAY_D;
+  OSPF_PATT->priority = PRIORITY_D;
+  OSPF_PATT->waitint = WAIT_DMH*HELLOINT_D;
+  OSPF_PATT->deadc = DEADC_D;
+  OSPF_PATT->type = OSPF_IT_UNDEF;
+ }
+;
+
 ospf_iface_opts:
    '{'
  | ospf_iface_opts ospf_iface_item ';'
@@ -83,16 +106,6 @@ ospf_iface_opts:
 ospf_iface_opt_list: /* EMPTY */ | ospf_iface_opts '}'
 ;
 
-ospf_iface_start:
- {
-  this_ipatt = cfg_allocz(sizeof(struct ospf_iface_patt));
-  add_tail(&this_area->patt_list, NODE this_ipatt);
-  OSPF_PATT->cost=10;
-  OSPF_PATT->helloint=10;
-  OSPF_PATT->rxmtint=5;
- }
-;
-
 ospf_iface:
   ospf_iface_start iface_patt ospf_iface_opt_list
 ;
index 9461fb68c67db945822afe39e333b35812585a46..4c62e7ad556a915ba16b34cd950e56f1d3284be4 100644 (file)
@@ -90,6 +90,7 @@ struct ospf_iface {
 #define OSPF_IT_NBMA 1
 #define OSPF_IT_PTP 2
 #define OSPF_IT_VLINK 3
+#define OSPF_IT_UNDEF 4
   u8 state;            /* Interface state machine */
 #define OSPF_IS_DOWN 0         /* Not working */
 #define OSPF_IS_LOOP 1         /* Should never happen */
@@ -107,8 +108,8 @@ struct ospf_iface {
 #define PRIORITY_D 1
 #define HELLOINT_D 10
 #define DEADC_D 4
-#define WAIT_DMH 3     /* Value of Wait timer - not found it in RFC 
-                        * - using 3*HELLO
+#define WAIT_DMH 4     /* Value of Wait timer - not found it in RFC 
+                        * - using 4*HELLO
                         */
   struct top_hash_entry *nlsa; /* Originated net lsa */
   int fadj;            /* Number of full adjacent neigh */
@@ -362,6 +363,11 @@ struct ospf_iface_patt {
   int cost;
   int helloint;
   int rxmtint;
+  int inftransdelay; 
+  int priority; 
+  int waitint;
+  int deadc;
+  int type;
 };
 
 static int ospf_start(struct proto *p);