Revision 4d176e14 nest/config.Y

View differences:

nest/config.Y
278 278
CF_CLI(SHOW INTERFACES SUMMARY,,, [[Show summary of network interfaces]])
279 279
{ if_show_summary(); } ;
280 280

  
281
CF_CLI(SHOW ROUTE, r_args, [[[<prefix>|for <prefix>|for <ip>] [table <t>] [filter <f>|where <cond>] [all] [primary] [(import|preimport) <p>] [stats|count]]], [[Show routing table]])
281
CF_CLI(SHOW ROUTE, r_args, [[[<prefix>|for <prefix>|for <ip>] [table <t>] [filter <f>|where <cond>] [all] [primary] [(import|preimport) <p>] [protocol <p>] [stats|count]]], [[Show routing table]])
282 282
{ rt_show($3); } ;
283 283

  
284 284
r_args:
......
334 334
     $$->import_protocol = c->proto;
335 335
     $$->running_on_config = c->proto->cf->global;
336 336
   }
337
 | r_args PROTOCOL SYM {
338
     struct proto_config *c = (struct proto_config *) $3->def;
339
     $$ = $1;
340
     if ($$->show_protocol) cf_error("Protocol specified twice");
341
     if ($3->class != SYM_PROTO || !c->proto) cf_error("%s is not a protocol", $3->name);
342
     $$->show_protocol = c->proto;
343
     $$->running_on_config = c->proto->cf->global;
344
   }
337 345
 | r_args STATS {
338 346
     $$ = $1;
339 347
     $$->stats = 1;

Also available in: Unified diff