Revision e0a45fb4 nest/config.Y

View differences:

nest/config.Y
45 45
CF_KEYWORDS(PASSWORD, FROM, PASSIVE, TO, ID, EVENTS, PACKETS, PROTOCOLS, INTERFACES)
46 46
CF_KEYWORDS(PRIMARY, STATS, COUNT, FOR, COMMANDS, PREEXPORT, GENERATE)
47 47
CF_KEYWORDS(LISTEN, BGP, V6ONLY, ADDRESS, PORT, PASSWORDS, DESCRIPTION)
48
CF_KEYWORDS(RELOAD, IN, OUT, MRTDUMP, MESSAGES)
48
CF_KEYWORDS(RELOAD, IN, OUT, MRTDUMP, MESSAGES, RESTRICT)
49 49

  
50 50
CF_ENUM(T_ENUM_RTS, RTS_, DUMMY, STATIC, INHERIT, DEVICE, STATIC_DEVICE, REDIRECT,
51 51
	RIP, OSPF, OSPF_IA, OSPF_EXT1, OSPF_EXT2, BGP, PIPE)
......
325 325
{ cmd_show_status(); } ;
326 326

  
327 327
CF_CLI(SHOW PROTOCOLS, proto_patt2, [<protocol> | \"<pattern>\"], [[Show routing protocols]])
328
{ proto_apply_cmd($3, proto_cmd_show, 0); } ;
328
{ proto_apply_cmd($3, proto_cmd_show, 0, 0); } ;
329 329

  
330 330
CF_CLI(SHOW PROTOCOLS ALL, proto_patt2, [<protocol> | \"<pattern>\"], [[Show routing protocol details]])
331
{ proto_apply_cmd($4, proto_cmd_show, 1); } ;
331
{ proto_apply_cmd($4, proto_cmd_show, 0, 1); } ;
332 332

  
333 333
optsym:
334 334
   SYM
......
459 459
 ;
460 460

  
461 461
CF_CLI(DISABLE, proto_patt, <protocol> | \"<pattern>\" | all, [[Disable protocol]])
462
{ proto_apply_cmd($2, proto_cmd_disable, 0); } ;
462
{ proto_apply_cmd($2, proto_cmd_disable, 1, 0); } ;
463 463
CF_CLI(ENABLE, proto_patt, <protocol> | \"<pattern>\" | all, [[Enable protocol]])
464
{ proto_apply_cmd($2, proto_cmd_enable, 0); } ;
464
{ proto_apply_cmd($2, proto_cmd_enable, 1, 0); } ;
465 465
CF_CLI(RESTART, proto_patt, <protocol> | \"<pattern>\" | all, [[Restart protocol]])
466
{ proto_apply_cmd($2, proto_cmd_restart, 0); } ;
466
{ proto_apply_cmd($2, proto_cmd_restart, 1, 0); } ;
467 467
CF_CLI(RELOAD, proto_patt, <protocol> | \"<pattern>\" | all, [[Reload protocol]])
468
{ proto_apply_cmd($2, proto_cmd_reload, CMD_RELOAD); } ;
468
{ proto_apply_cmd($2, proto_cmd_reload, 1, CMD_RELOAD); } ;
469 469
CF_CLI(RELOAD IN, proto_patt, <protocol> | \"<pattern>\" | all, [[Reload protocol (just imported routes)]])
470
{ proto_apply_cmd($3, proto_cmd_reload, CMD_RELOAD_IN); } ;
470
{ proto_apply_cmd($3, proto_cmd_reload, 1, CMD_RELOAD_IN); } ;
471 471
CF_CLI(RELOAD OUT, proto_patt, <protocol> | \"<pattern>\" | all, [[Reload protocol (just exported routes)]])
472
{ proto_apply_cmd($3, proto_cmd_reload, CMD_RELOAD_OUT); } ;
472
{ proto_apply_cmd($3, proto_cmd_reload, 1, CMD_RELOAD_OUT); } ;
473 473

  
474 474
CF_CLI_HELP(DEBUG, ..., [[Control protocol debugging via BIRD logs]])
475 475
CF_CLI(DEBUG, proto_patt debug_mask, (<protocol> | <pattern> | all) (all | off | { states | routes | filters | events | packets }), [[Control protocol debugging via BIRD logs]])
476
{ proto_apply_cmd($2, proto_cmd_debug, $3); } ;
476
{ proto_apply_cmd($2, proto_cmd_debug, 1, $3); } ;
477 477

  
478 478
CF_CLI_HELP(MRTDUMP, ..., [[Control protocol debugging via MRTdump files]])
479 479
CF_CLI(MRTDUMP, proto_patt mrtdump_mask, (<protocol> | <pattern> | all) (all | off | { states | messages }), [[Control protocol debugging via MRTdump format]])
480
{ proto_apply_cmd($2, proto_cmd_mrtdump, $3); } ;
480
{ proto_apply_cmd($2, proto_cmd_mrtdump, 1, $3); } ;
481

  
482
CF_CLI(RESTRICT,,,[[Restrict current CLI session to safe commands]])
483
{ this_cli->restricted = 1; cli_msg(16, "Access restricted"); } ;
481 484

  
482 485
proto_patt:
483 486
   SYM  { $$.ptr = $1; $$.patt = 0; }

Also available in: Unified diff