diff options
author | Ondrej Filip <feela@network.cz> | 2000-06-03 09:50:31 +0000 |
---|---|---|
committer | Ondrej Filip <feela@network.cz> | 2000-06-03 09:50:31 +0000 |
commit | aaaff77605879ffd80f8980f06ea66329e9aaea8 (patch) | |
tree | 765b7ff741bc5c8a89d21e23b8c32e01f5f0af7f /proto/ospf | |
parent | a789d814ddd8473fdb85bedb02014f6cb6435373 (diff) |
More conf. items defined.
Diffstat (limited to 'proto/ospf')
-rw-r--r-- | proto/ospf/config.Y | 35 | ||||
-rw-r--r-- | proto/ospf/ospf.h | 10 |
2 files changed, 32 insertions, 13 deletions
diff --git a/proto/ospf/config.Y b/proto/ospf/config.Y index fe5b33df..dacb2b28 100644 --- a/proto/ospf/config.Y +++ b/proto/ospf/config.Y @@ -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 ; diff --git a/proto/ospf/ospf.h b/proto/ospf/ospf.h index 9461fb68..4c62e7ad 100644 --- a/proto/ospf/ospf.h +++ b/proto/ospf/ospf.h @@ -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); |