mirror of
https://gitlab.nic.cz/labs/bird.git
synced 2024-12-22 17:51:53 +00:00
More conf. items defined.
This commit is contained in:
parent
a789d814dd
commit
aaaff77605
@ -21,7 +21,7 @@ CF_DECLS
|
|||||||
|
|
||||||
CF_KEYWORDS(OSPF, AREA, OSPF_METRIC1, OSPF_METRIC2, OSPF_TAG)
|
CF_KEYWORDS(OSPF, AREA, OSPF_METRIC1, OSPF_METRIC2, OSPF_TAG)
|
||||||
CF_KEYWORDS(NEIGHBORS, RFC1583COMPAT, STUB, TICK, COST, RETRANSMIT)
|
CF_KEYWORDS(NEIGHBORS, RFC1583COMPAT, STUB, TICK, COST, RETRANSMIT)
|
||||||
CF_KEYWORDS(HELLO)
|
CF_KEYWORDS(HELLO, TRANSIT, PRIORITY, DEAD, NONBROADCAST, POINTOPOINT, TYPE)
|
||||||
|
|
||||||
%type <t> opttext
|
%type <t> opttext
|
||||||
|
|
||||||
@ -73,6 +73,29 @@ ospf_iface_item:
|
|||||||
| COST NUM { OSPF_PATT->cost = $2 ; }
|
| COST NUM { OSPF_PATT->cost = $2 ; }
|
||||||
| HELLO NUM { OSPF_PATT->helloint = $2 ; }
|
| HELLO NUM { OSPF_PATT->helloint = $2 ; }
|
||||||
| RETRANSMIT NUM { OSPF_PATT->rxmtint = $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:
|
||||||
@ -83,16 +106,6 @@ ospf_iface_opts:
|
|||||||
ospf_iface_opt_list: /* EMPTY */ | 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:
|
||||||
ospf_iface_start iface_patt ospf_iface_opt_list
|
ospf_iface_start iface_patt ospf_iface_opt_list
|
||||||
;
|
;
|
||||||
|
@ -90,6 +90,7 @@ struct ospf_iface {
|
|||||||
#define OSPF_IT_NBMA 1
|
#define OSPF_IT_NBMA 1
|
||||||
#define OSPF_IT_PTP 2
|
#define OSPF_IT_PTP 2
|
||||||
#define OSPF_IT_VLINK 3
|
#define OSPF_IT_VLINK 3
|
||||||
|
#define OSPF_IT_UNDEF 4
|
||||||
u8 state; /* Interface state machine */
|
u8 state; /* Interface state machine */
|
||||||
#define OSPF_IS_DOWN 0 /* Not working */
|
#define OSPF_IS_DOWN 0 /* Not working */
|
||||||
#define OSPF_IS_LOOP 1 /* Should never happen */
|
#define OSPF_IS_LOOP 1 /* Should never happen */
|
||||||
@ -107,8 +108,8 @@ struct ospf_iface {
|
|||||||
#define PRIORITY_D 1
|
#define PRIORITY_D 1
|
||||||
#define HELLOINT_D 10
|
#define HELLOINT_D 10
|
||||||
#define DEADC_D 4
|
#define DEADC_D 4
|
||||||
#define WAIT_DMH 3 /* Value of Wait timer - not found it in RFC
|
#define WAIT_DMH 4 /* Value of Wait timer - not found it in RFC
|
||||||
* - using 3*HELLO
|
* - using 4*HELLO
|
||||||
*/
|
*/
|
||||||
struct top_hash_entry *nlsa; /* Originated net lsa */
|
struct top_hash_entry *nlsa; /* Originated net lsa */
|
||||||
int fadj; /* Number of full adjacent neigh */
|
int fadj; /* Number of full adjacent neigh */
|
||||||
@ -362,6 +363,11 @@ struct ospf_iface_patt {
|
|||||||
int cost;
|
int cost;
|
||||||
int helloint;
|
int helloint;
|
||||||
int rxmtint;
|
int rxmtint;
|
||||||
|
int inftransdelay;
|
||||||
|
int priority;
|
||||||
|
int waitint;
|
||||||
|
int deadc;
|
||||||
|
int type;
|
||||||
};
|
};
|
||||||
|
|
||||||
static int ospf_start(struct proto *p);
|
static int ospf_start(struct proto *p);
|
||||||
|
Loading…
Reference in New Issue
Block a user