Hi, I wrote a new applications as an *interactive* analog of 'brctl'. It may (or will be able to) do all functions of 'brctl', but in a CLI-like dialogue. This dialogue is based on 'readline' with its features like 'line completion', help, history, etc. I called this application 'brdlg' and placed it in bridge-utils/brctl directory.
All commands use the same functions from libbridge as brctl_cmd.c There are 3 new files: brdlg.c - main file of the applications cli.c & cli.h - API for CLI-like readline-oriented applications (I get it from https://sourceforge.net/projects/rstplib/. Apropos, why don't we merge these two projects ?) Some changes has been done in Makefiles: new files (see above), 'make depend' & 'make indent' options). I had to fix one bug (I think so, but may be it is my mistake; if so, let me know) in libbridge/if_index.c in function if_indextoname() : there was no initial value for the static local variable 'siocgifname_works_not'. I repeat, let me know, please, if I am wrong here. In the attached here file I inserted a patch. The set of implemented there commands is not complete - my purpose was to show the principle. If Authors of the project "IEEE 802.1d ethernet bridging" accept it, we will be able to finish this feature. Anyway, all questions/remarks/comments will be appreciated and accepted with gratitude. Thanks, Alex
bridge-utils.cli.diff
Description: Binary data
