Hello! You can find docs on the CLI implementation here: https://github.com/FRRouting/frr/blob/master/doc/cli.md <https://github.com/FRRouting/frr/blob/master/doc/cli.md> The differences in `argv` filling are also documented there. Please let me know if you have any further questions that aren’t answered here or if something doesn’t make sense.
On Nov 14, 2017, at 12:09 PM, Mostafa Salari <msgm68@gmail.com> wrote:
Hi
I figured out that the syntax of DEFUN commands in FRR 3 is different from Quagga. I found this problem when i saw my old (Quagga based) code raise errors when copied in FRR! For example, it seems that () has no meaning or different interpretation! As another example i think argvs are counted for all words in the command not only variables! am i right?
So i have 2 questions 1. Where can i find the differences of DEFUN in FRR?
2. A trouble!!! When i input the argvs in vtysh in a different order, I will take different argv values!!!!!!! For example: i have in DEFUN: "snmp-server group NAME <v1|v2c> {read WORD|write WORD|notify WORD|context WORD}" Now, in vtysh, if the user enters: Router# snmp-server group g1 v1 write view1 read view2 My DEFUN considers argv[5] as view1 and argv[7] as view2 and if user enters: Router# snmp-server group g1 v1 read view2 write view1
My DEFUN considers argv[7] as view1 and argv[5] as view2
While in my DEFUN, i expect that snmp write view always to be (e.g.) argv[5]
Please help. Thanks _______________________________________________ dev mailing list dev@lists.frrouting.org https://lists.frrouting.org/listinfo/dev