Question:
How to use libsuricata to build a detect engine? Is there any example or guidence?
Background:
I build libsuricata lib to use it detect some new applayer packet
After write a tcp server receiving network packet, detect these bytes by copy the code from ut, I find it will crash finaly,
If i call InitGlobal() in suricata.c, it will crash later.
This work is under active development so you are best to look at the relevant pull requests for more information, however we’re probably not where you need it to be yet.
Thanks, I modified some global init part, paste the code of ut into detection thread, it seems works now.
But here comes the second question:
I add two different detection buffer on one custom tcp applaye, append 20,000 signatures to a detection context.
when matching applayer packet, SigMatchSignatures take 15,000 us, I retest http header with 20,000 signatures, but it only take 150 us, Any idea what to do to accelarate the match process?