[dev] DEFUN different from Quagga

Mostafa Salari msgm68 at gmail.com
Tue Nov 14 12:09:38 EST 2017


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 *argv*s 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 *argv*s 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.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.frrouting.org/pipermail/dev/attachments/20171114/f29dd59f/attachment.html>

More information about the dev mailing list