Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
labs
BIRD Internet Routing Daemon
Commits
ea2ae6dd
Commit
ea2ae6dd
authored
May 22, 2009
by
Ondřej Zajíček
Browse files
Change import/preimport to export/preexport to be consistent with filters.
parent
d72a0ac2
Changes
4
Hide whitespace changes
Inline
Side-by-side
doc/bird.sgml
View file @
ea2ae6dd
...
...
@@ -435,7 +435,7 @@ This argument can be omitted if there exists only a single instance.
<tag>show symbols</tag>
Show the list of symbols defined in the configuration (names of protocols, routing tables etc.).
<tag>show route [[for] <m/prefix/|<m/IP/] [table <m/sym/] [filter <m/f/|where <m/c/] [(
im
port|pre
im
port) <m/p/] [protocol <m/p/] [<m/options/]</tag>
<tag>show route [[for] <m/prefix/|<m/IP/] [table <m/sym/] [filter <m/f/|where <m/c/] [(
ex
port|pre
ex
port) <m/p/] [protocol <m/p/] [<m/options/]</tag>
Show contents of a routing table (by default of the main one),
that is routes, their metrics and (in case the <cf/all/ switch is given)
all their attributes.
...
...
@@ -450,9 +450,9 @@ This argument can be omitted if there exists only a single instance.
<p>You can also ask for printing only routes processed and accepted by
a given filter (<cf>filter <m/name/</cf> or <cf>filter { <m/filter/ }
</cf> or matching a given condition (<cf>where <m/condition/</cf>).
The <cf/
im
port/ and <cf/pre
im
port/ switches ask for printing of entries
that are
im
ported to the specified protocol. With <cf/pre
im
port/, the
im
port filter of the protocol is skipped.
The <cf/
ex
port/ and <cf/pre
ex
port/ switches ask for printing of entries
that are
ex
ported to the specified protocol. With <cf/pre
ex
port/, the
ex
port filter of the protocol is skipped.
<p>You can also select just routes added by a specific protocol.
<cf>protocol <m/p/</cf>.
...
...
nest/config.Y
View file @
ea2ae6dd
...
...
@@ -43,7 +43,7 @@ CF_DECLS
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, PRE
IM
PORT, GENERATE)
CF_KEYWORDS(PRIMARY, STATS, COUNT, FOR, COMMANDS, PRE
EX
PORT, GENERATE)
CF_ENUM(T_ENUM_RTS, RTS_, DUMMY, STATIC, INHERIT, DEVICE, STATIC_DEVICE, REDIRECT,
RIP, OSPF, OSPF_IA, OSPF_EXT1, OSPF_EXT2, BGP, PIPE)
...
...
@@ -56,7 +56,7 @@ CF_ENUM(T_ENUM_RTD, RTD_, ROUTER, DEVICE, BLACKHOLE, UNREACHABLE, PROHIBIT)
%type <r> rtable
%type <s> optsym
%type <ra> r_args
%type <i> echo_mask echo_size debug_mask debug_list debug_flag
im
port_or_pre
im
port
%type <i> echo_mask echo_size debug_mask debug_list debug_flag
ex
port_or_pre
ex
port
%type <t> proto_patt
CF_GRAMMAR
...
...
@@ -298,7 +298,7 @@ CF_CLI(SHOW INTERFACES,,, [[Show network interfaces]])
CF_CLI(SHOW INTERFACES SUMMARY,,, [[Show summary of network interfaces]])
{ if_show_summary(); } ;
CF_CLI(SHOW ROUTE, r_args, [[[<prefix>|for <prefix>|for <ip>] [table <t>] [filter <f>|where <cond>] [all] [primary] [(
im
port|pre
im
port) <p>] [protocol <p>] [stats|count]]], [[Show routing table]])
CF_CLI(SHOW ROUTE, r_args, [[[<prefix>|for <prefix>|for <ip>] [table <t>] [filter <f>|where <cond>] [all] [primary] [(
ex
port|pre
ex
port) <p>] [protocol <p>] [stats|count]]], [[Show routing table]])
{ rt_show($3); } ;
r_args:
...
...
@@ -344,14 +344,14 @@ r_args:
$$ = $1;
$$->primary_only = 1;
}
| r_args
im
port_or_pre
im
port SYM {
| r_args
ex
port_or_pre
ex
port SYM {
struct proto_config *c = (struct proto_config *) $3->def;
$$ = $1;
if ($$->
im
port_mode) cf_error("Protocol specified twice");
if ($$->
ex
port_mode) cf_error("Protocol specified twice");
if ($3->class != SYM_PROTO || !c->proto) cf_error("%s is not a protocol", $3->name);
$$->
im
port_mode = $2;
$$->
ex
port_mode = $2;
$$->primary_only = 1;
$$->
im
port_protocol = c->proto;
$$->
ex
port_protocol = c->proto;
$$->running_on_config = c->proto->cf->global;
}
| r_args PROTOCOL SYM {
...
...
@@ -372,9 +372,9 @@ r_args:
}
;
im
port_or_pre
im
port:
PRE
IM
PORT { $$ = 1; }
|
IM
PORT { $$ = 2; }
ex
port_or_pre
ex
port:
PRE
EX
PORT { $$ = 1; }
|
EX
PORT { $$ = 2; }
;
CF_CLI(SHOW SYMBOLS, optsym, [<symbol>], [[Show all known symbolic names]])
...
...
nest/route.h
View file @
ea2ae6dd
...
...
@@ -212,8 +212,8 @@ struct rt_show_data {
int
verbose
;
struct
fib_iterator
fit
;
struct
proto
*
show_protocol
;
struct
proto
*
im
port_protocol
;
int
im
port_mode
,
primary_only
;
struct
proto
*
ex
port_protocol
;
int
ex
port_mode
,
primary_only
;
struct
config
*
running_on_config
;
int
net_counter
,
rt_counter
,
show_counter
;
int
stats
,
show_for
;
...
...
nest/rt-table.c
View file @
ea2ae6dd
...
...
@@ -978,7 +978,7 @@ rt_show_net(struct cli *c, net *n, struct rt_show_data *d)
{
struct
ea_list
*
tmpa
,
*
old_tmpa
;
struct
proto
*
p0
=
e
->
attrs
->
proto
;
struct
proto
*
p1
=
d
->
im
port_protocol
;
struct
proto
*
p1
=
d
->
ex
port_protocol
;
struct
proto
*
p2
=
d
->
show_protocol
;
d
->
rt_counter
++
;
ee
=
e
;
...
...
@@ -986,12 +986,12 @@ rt_show_net(struct cli *c, net *n, struct rt_show_data *d)
old_tmpa
=
tmpa
=
p0
->
make_tmp_attrs
?
p0
->
make_tmp_attrs
(
e
,
rte_update_pool
)
:
NULL
;
ok
=
(
d
->
filter
==
FILTER_ACCEPT
||
f_run
(
d
->
filter
,
&
e
,
&
tmpa
,
rte_update_pool
,
FF_FORCE_TMPATTR
)
<=
F_ACCEPT
);
if
(
p2
&&
p2
!=
p0
)
ok
=
0
;
if
(
ok
&&
d
->
im
port_mode
)
if
(
ok
&&
d
->
ex
port_mode
)
{
int
ic
=
(
p1
->
import_control
?
p1
->
import_control
(
p1
,
&
e
,
&
tmpa
,
rte_update_pool
)
:
0
);
if
(
ic
<
0
)
ok
=
0
;
else
if
(
!
ic
&&
d
->
im
port_mode
>
1
)
else
if
(
!
ic
&&
d
->
ex
port_mode
>
1
)
{
if
(
p1
->
out_filter
==
FILTER_REJECT
||
p1
->
out_filter
&&
f_run
(
p1
->
out_filter
,
&
e
,
&
tmpa
,
rte_update_pool
,
FF_FORCE_TMPATTR
)
>
F_ACCEPT
)
...
...
@@ -1033,9 +1033,9 @@ rt_show_cont(struct cli *c)
cli_printf
(
c
,
8004
,
"Stopped due to reconfiguration"
);
goto
done
;
}
if
(
d
->
im
port_protocol
&&
d
->
im
port_protocol
->
core_state
!=
FS_HAPPY
&&
d
->
im
port_protocol
->
core_state
!=
FS_FEEDING
)
if
(
d
->
ex
port_protocol
&&
d
->
ex
port_protocol
->
core_state
!=
FS_HAPPY
&&
d
->
ex
port_protocol
->
core_state
!=
FS_FEEDING
)
{
cli_printf
(
c
,
8005
,
"Protocol is down"
);
goto
done
;
...
...
Maria Matejka
@jmatejka
mentioned in commit
9d4f782a
·
Feb 14, 2018
mentioned in commit
9d4f782a
mentioned in commit 9d4f782a45d4074a80173a6dd1ae6827ced70331
Toggle commit list
Maria Matejka
@jmatejka
mentioned in commit
5911740c
·
Sep 26, 2018
mentioned in commit
5911740c
mentioned in commit 5911740c7638c8048c932f4de30b81ea90c7b639
Toggle commit list
Maria Matejka
@jmatejka
mentioned in commit
14375237
·
Dec 04, 2018
mentioned in commit
14375237
mentioned in commit 14375237f6901a926d59cc54870cf44ed2a61d20
Toggle commit list
Write
Preview
Supports
Markdown
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