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
e04555c0
Commit
e04555c0
authored
Nov 17, 2009
by
Ondřej Zajíček
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Implement description field of protocol.
parent
d0e2d6d1
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
1 deletion
+6
-1
nest/config.Y
nest/config.Y
+2
-1
nest/proto.c
nest/proto.c
+3
-0
nest/protocol.h
nest/protocol.h
+1
-0
No files found.
nest/config.Y
View file @
e04555c0
...
...
@@ -44,7 +44,7 @@ CF_KEYWORDS(ROUTER, ID, PROTOCOL, PREFERENCE, DISABLED, DEBUG, ALL, OFF, DIRECT)
CF_KEYWORDS(INTERFACE, IMPORT, EXPORT, FILTER, NONE, TABLE, STATES, ROUTES, FILTERS)
CF_KEYWORDS(PASSWORD, FROM, PASSIVE, TO, ID, EVENTS, PACKETS, PROTOCOLS, INTERFACES)
CF_KEYWORDS(PRIMARY, STATS, COUNT, FOR, COMMANDS, PREEXPORT, GENERATE)
CF_KEYWORDS(LISTEN, BGP, V6ONLY, ADDRESS, PORT, PASSWORDS)
CF_KEYWORDS(LISTEN, BGP, V6ONLY, ADDRESS, PORT, PASSWORDS
, DESCRIPTION
)
CF_ENUM(T_ENUM_RTS, RTS_, DUMMY, STATIC, INHERIT, DEVICE, STATIC_DEVICE, REDIRECT,
RIP, OSPF, OSPF_IA, OSPF_EXT1, OSPF_EXT2, BGP, PIPE)
...
...
@@ -141,6 +141,7 @@ proto_item:
| EXPORT imexport { this_proto->out_filter = $2; }
| TABLE rtable { this_proto->table = $2; }
| ROUTER ID idval { this_proto->router_id = $3; }
| DESCRIPTION dsc { this_proto->dsc = $2; }
;
imexport:
...
...
nest/proto.c
View file @
e04555c0
...
...
@@ -307,6 +307,7 @@ protos_commit(struct config *new, struct config *old, int force_reconfig, int ty
if
(
sym
&&
sym
->
class
==
SYM_PROTO
&&
!
new
->
shutdown
)
{
/* Found match, let's check if we can smoothly switch to new configuration */
/* No need to check description */
nc
=
sym
->
def
;
if
(
!
force_reconfig
&&
nc
->
protocol
==
oc
->
protocol
...
...
@@ -702,6 +703,8 @@ proto_do_show(struct proto *p, int verbose)
buf
);
if
(
verbose
)
{
if
(
p
->
cf
->
dsc
)
cli_msg
(
-
1006
,
" Description: %s"
,
p
->
cf
->
dsc
);
cli_msg
(
-
1006
,
" Preference: %d"
,
p
->
preference
);
cli_msg
(
-
1006
,
" Input filter: %s"
,
filter_name
(
p
->
in_filter
));
cli_msg
(
-
1006
,
" Output filter: %s"
,
filter_name
(
p
->
out_filter
));
...
...
nest/protocol.h
View file @
e04555c0
...
...
@@ -81,6 +81,7 @@ struct proto_config {
struct
protocol
*
protocol
;
/* Protocol */
struct
proto
*
proto
;
/* Instance we've created */
char
*
name
;
char
*
dsc
;
unsigned
debug
,
preference
,
disabled
;
/* Generic parameters */
u32
router_id
;
/* Protocol specific router ID */
struct
rtable_config
*
table
;
/* Table we're attached to */
...
...
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