This is the continuation of this post.
We were able to find a mailing-list for STAT development in sourceforge[dot]net. The source code for few STAT based IDS were also available there, like NetSTAT, USTAT, etc. This finding actually has reduced the effort that we had put down in writing a compiler for STAT Language. It was a like a bonus that we were also able to find a STAT editor to graphically represent the attack scenario and obtain the stat file corresponding to the figure. This STATed was implemented in Java. The compiler could convert a STAT Language source to C-source file.
While installing STATL compiler and the STATed – STAT scenario editor we faced a few difficulties with the dependencies. I had put those in the corresponding mailing list. Still the problem, while installing the Winstat(IDS) persists. But the STATL compiler and the STATed were installed successfully.
In our sixth semester of B-Tech we have a course on Compiler Design. For that two tools are being used: Lex which is a lexical analyzer and Yacc is a parser generator. While compiling the code for the lexical analyzer created by lex and the code for parse created by yacc we require few libraries to include some important function templates into the code. the flags used along with gcc for this purpose are “-ll” and “-lfl”.
After installing Lex/Yacc in my Fedora system few months back, I got an error stating that definition for yywrap is not included. After searching for some time I got the solution for it.
There can be methods to solve it :
- Just include the function yywrap in the lex file in the function definition part(third part of the code).Compiling can be done as “gcc lex.yy.c y.tab.c”
Install flex-static library to use the gcc flag -ll. After this just compile it like “gcc lex.yy.c y.tab.c -ll”.
But later I changed to Arch Linux, after 1 year of using Fedora.
But in Arch when I tryed to compile the lex/yacc file initially the same problem arised. I thought I could solve it the same way as before. All the researches I had done was in vain. I couldn’t find a package similar to flex-static anywhere. At that point of time I used the first option, which easily solved my problem.
If anyone could help in finding a package similar to flex-static in Arch Linux, please share.
New link can be found at abijith-kp.github.io