Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
B
BIRD Internet Routing Daemon
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Labels
Merge Requests
3
Merge Requests
3
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Jobs
Commits
Open sidebar
labs
BIRD Internet Routing Daemon
Commits
b36a0a79
Commit
b36a0a79
authored
Jun 02, 2000
by
Ondřej Filip
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
area {} added to config.
parent
7e602d5e
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
43 additions
and
11 deletions
+43
-11
proto/ospf/config.Y
proto/ospf/config.Y
+20
-5
proto/ospf/lsupd.c
proto/ospf/lsupd.c
+7
-2
proto/ospf/ospf.c
proto/ospf/ospf.c
+5
-0
proto/ospf/ospf.h
proto/ospf/ospf.h
+11
-4
No files found.
proto/ospf/config.Y
View file @
b36a0a79
...
...
@@ -13,11 +13,12 @@ CF_HDR
CF_DEFINES
#define OSPF_CFG ((struct ospf_config *) this_proto)
static struct ospf_area_config *this_area;
CF_DECLS
CF_KEYWORDS(OSPF, AREA, OSPF_METRIC1, OSPF_METRIC2, OSPF_TAG)
CF_KEYWORDS(NEIGHBORS, RFC1583COMPAT)
CF_KEYWORDS(NEIGHBORS, RFC1583COMPAT
, STUB, TICK
)
%type <t> opttext
...
...
@@ -28,21 +29,35 @@ CF_ADDTO(proto, ospf_proto '}')
ospf_proto_start: proto_start OSPF {
this_proto = proto_config_new(&proto_ospf, sizeof(struct ospf_config));
this_proto->preference = DEF_PREF_OSPF;
init_list(&OSPF_CFG->area_list);
}
;
ospf_proto:
ospf_proto_start proto_name '{'
| ospf_proto proto_item ';'
| ospf_proto ospf_area ';'
| ospf_proto RFC1583COMPAT bool ';' { OSPF_CFG->rfc1583 = $3; }
;
| ospf_proto ospf_area '}'
;
ospf_area: AREA idval {
((struct ospf_config *)this_proto)->area = $2;
ospf_area_start: AREA idval '{' {
this_area = cfg_allocz(sizeof(struct ospf_area_config));
add_tail(&OSPF_CFG->area_list, NODE this_area);
this_area->areaid = $2;
this_area->tick = DISPTICK;
this_area->stub = 0;
}
;
ospf_area: ospf_area_start
| ospf_area_start ospf_area_item
;
ospf_area_item:
| STUB bool ';' { this_area->stub = $2 ; }
| TICK NUM ';' { this_area->tick = $2 ; }
;
opttext:
TEXT
| /* empty */ { $$ = NULL; }
...
...
proto/ospf/lsupd.c
View file @
b36a0a79
...
...
@@ -308,9 +308,14 @@ ospf_lsupd_rx(struct ospf_lsupd_packet *ps, struct proto *p,
continue
;
}
ntohlsah
(
lsa
,
&
lsatmp
);
DBG
(
"Processing update Type: %u ID: %I RT: %I, Sn: 0x%08x
\n
"
,
lsatmp
.
type
,
lsatmp
.
id
,
lsatmp
.
rt
,
lsatmp
.
sn
);
debug
(
"Update Type: %u ID: %I RT: %I, Sn: 0x%08x Age: %u, Sum: %u
\n
"
,
lsatmp
.
type
,
lsatmp
.
id
,
lsatmp
.
rt
,
lsatmp
.
sn
,
lsatmp
.
age
,
lsatmp
.
checksum
);
lsadb
=
ospf_hash_find_header
(
oa
->
gr
,
&
lsatmp
);
if
(
lsadb
)
debug
(
"I have Type: %u ID: %I RT: %I, Sn: 0x%08x Age: %u, Sum: %u
\n
"
,
lsadb
->
lsa
.
type
,
lsadb
->
lsa
.
id
,
lsadb
->
lsa
.
rt
,
lsadb
->
lsa
.
sn
,
lsadb
->
lsa
.
age
,
lsadb
->
lsa
.
checksum
);
/* pg 143 (4) */
if
((
lsatmp
.
age
==
LSA_MAXAGE
)
&&
(
lsadb
==
NULL
))
...
...
proto/ospf/ospf.c
View file @
b36a0a79
...
...
@@ -62,6 +62,7 @@ ospf_init(struct proto_config *c)
struct
proto
*
p
=
proto_new
(
c
,
sizeof
(
struct
proto_ospf
));
struct
proto_ospf
*
po
=
(
struct
proto_ospf
*
)
p
;
struct
ospf_config
*
oc
=
(
struct
ospf_config
*
)
c
;
struct
ospf_area_config
*
ac
;
debug
(
"OSPF: Init requested.
\n
"
);
p
->
import_control
=
ospf_import_control
;
...
...
@@ -73,6 +74,10 @@ ospf_init(struct proto_config *c)
p
->
rte_same
=
ospf_rte_same
;
po
->
rfc1583
=
oc
->
rfc1583
;
WALK_LIST
(
ac
,
oc
->
area_list
)
{
debug
(
"OSPF: area: %I, stub=%u tick=%u
\n
"
,
ac
->
areaid
,
ac
->
stub
,
ac
->
tick
);
}
return
p
;
}
...
...
proto/ospf/ospf.h
View file @
b36a0a79
...
...
@@ -48,8 +48,14 @@
struct
ospf_config
{
struct
proto_config
c
;
int
rfc1583
;
u32
area
;
/* FIXME: Area ID !!! This is wrong !!!
* Should respect interface */
list
area_list
;
};
struct
ospf_area_config
{
node
n
;
u32
areaid
;
int
stub
;
unsigned
tick
;
};
struct
ospf_iface
{
...
...
@@ -105,6 +111,7 @@ struct ospf_iface {
*/
struct
top_hash_entry
*
nlsa
;
/* Originated net lsa */
int
fadj
;
/* Number of full adjacent neigh */
unsigned
tick
;
};
struct
ospf_packet
{
...
...
@@ -334,8 +341,8 @@ struct ospf_area {
slist
lsal
;
/* List of all LSA's */
struct
top_hash_entry
*
rt
;
/* My own router LSA */
list
cand
;
/* List of candidates for RT calc. */
u8
stub
;
u8
trcap
;
/* Transit capability? */
int
stub
;
int
trcap
;
/* Transit capability? */
struct
proto_ospf
*
po
;
struct
fib
infib
;
/* FIB for intra-area routes */
};
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment