summaryrefslogtreecommitdiffstats
path: root/ospf6d/ospf6_main.c
diff options
context:
space:
mode:
authorPaul Jakma <paul@quagga.net>2009-08-19 12:35:49 +0000
committerDavid Lamparter <equinox@diac24.net>2010-02-03 16:37:24 +0100
commitae9b788b228d7c4bc5fdae73ef34f49d969e3e5d (patch)
tree43fc932d331cfaf276059ad1bdeb401ca8efaa3a /ospf6d/ospf6_main.c
parenta17c1dba6e2bc45055ccd918a2f52e91fd6e2652 (diff)
downloadquagga-ae9b788b228d7c4bc5fdae73ef34f49d969e3e5d.tar.bz2
quagga-ae9b788b228d7c4bc5fdae73ef34f49d969e3e5d.tar.xz
lib: Do better filtering of arguments, optional args particularly
* command.c: (cmd_deopt) helper to extract the inside argument string from an optional argument. (cmd_match) Consolidate matching code from cmd_filter_by_* to here. Use cmd_deopt to match on the /inner/ argument of an optional string, rather than treating optional arguments as matching pretty much any string. (cmd_filter) consolidate cmd_filter_by_* to here, and use cmd_match. Further, do a two-pass filter, to make use of the fact that we know the "strongest" match (e.g. range-match args beat variables) and can filter out weaker ones. Along with ability to match on inside of optional arguments, this makes our command definitions more powerful, and should allow us to avoid much redundancy in command defs. (is_cmd_ambiguous) look inside optional args, for better matching.
Diffstat (limited to 'ospf6d/ospf6_main.c')
0 files changed, 0 insertions, 0 deletions