Snort mailing list archives
need help in understanding a piece of code in snort 2.9.7.3
From: Vicky Singh <vickyatwork0 () gmail com>
Date: Fri, 27 May 2016 15:13:58 +0530
Hi I need some help in understanding a piece of qsort usage on pointer in the function PortTableCompileMergePortObjectList2() of the file snort-2.9.7.3/src/sfutil/sfportobject.c. Below is the comment mentioned in the code. /* Sort the pointers to the input port objects so we always get them in the same order for key comparisons */ This piece of code sorts a list of pointers to port objects before merging them. PortObjects are calloc'ed on the fly and on multiple run order of memory allocated to different portObject may vary. I'm not able to understand what value add this pointer sort adds here. I tried removing this qsort and found attack detection to be working properly. Can someone please help me understand the importance/usage of pointer sort in this context? Thanks Vicky
------------------------------------------------------------------------------ What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic patterns at an interface-level. Reveals which users, apps, and protocols are consuming the most bandwidth. Provides multi-vendor support for NetFlow, J-Flow, sFlow and other flows. Make informed decisions using capacity planning reports. https://ad.doubleclick.net/ddm/clk/305295220;132659582;e
_______________________________________________ Snort-devel mailing list Snort-devel () lists sourceforge net https://lists.sourceforge.net/lists/listinfo/snort-devel Archive: http://sourceforge.net/mailarchive/forum.php?forum_name=snort-devel Please visit http://blog.snort.org for the latest news about Snort!
Current thread:
- need help in understanding a piece of code in snort 2.9.7.3 Vicky Singh (May 27)