Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
labs
BIRD Internet Routing Daemon
Commits
f184ea6f
Commit
f184ea6f
authored
Oct 19, 1998
by
Martin Mareš
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Proto struct now contain (down | starting | up) state.
parent
16a8ba30
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
0 deletions
+7
-0
nest/proto.c
nest/proto.c
+2
-0
nest/protocol.h
nest/protocol.h
+5
-0
No files found.
nest/proto.c
View file @
f184ea6f
...
...
@@ -71,10 +71,12 @@ static void
proto_start
(
struct
proto
*
p
)
{
rem_node
(
&
p
->
n
);
p
->
state
=
PRS_STARTING
;
if
(
p
->
start
)
p
->
start
(
p
);
if_feed_baby
(
p
);
rt_feed_baby
(
p
);
p
->
state
=
PRS_UP
;
add_tail
(
&
proto_list
,
&
p
->
n
);
}
...
...
nest/protocol.h
View file @
f184ea6f
...
...
@@ -59,6 +59,7 @@ struct proto {
unsigned
debug
;
/* Debugging flags */
pool
*
pool
;
/* Local objects */
unsigned
preference
;
/* Default route preference */
unsigned
state
;
/* PRS_... */
void
(
*
if_notify
)(
struct
proto
*
,
unsigned
flags
,
struct
iface
*
new
,
struct
iface
*
old
);
void
(
*
rt_notify
)(
struct
proto
*
,
struct
network
*
net
,
struct
rte
*
new
,
struct
rte
*
old
);
...
...
@@ -80,6 +81,10 @@ struct proto {
/* Hic sunt protocol-specific data */
};
#define PRS_DOWN 0
/* Inactive */
#define PRS_STARTING 1
#define PRS_UP 2
void
*
proto_new
(
struct
protocol
*
,
unsigned
size
);
extern
list
proto_list
,
inactive_proto_list
;
...
...
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