Snort mailing list archives
Re: Need help to know which files to be changed in Dynamic preprocessor starter kit
From: Amtul Saboor <saboor.amtul () gmail com>
Date: Thu, 26 Dec 2013 14:09:40 +0500
Hello
According to what Russ said, i made changes in dpx.c and sf_preproc_info.h
according to my needs.
I did all the things from start, i.e. ./setup.sh that worked fine, then :
./build.sh , but at this step I have faced toooo many errors. If i had to
change only dpx.c and sf_preproc_info.h, why am i getting errors in other
files when i run build.sh .
The few errors are:
/root/snort/src/dynamic-examples/include/sf_dynamic_preprocessor.h:92:
error: expected declaration specifiers or '...' before
'PreprocessorReloadVerifyFunc'
/root/snort/src/dynamic-examples/include/sf_dynamic_preprocessor.h:93:
error: expected declaration specifiers or '...' before
'PreprocessorReloadSwapFunc'
/root/snort/src/dynamic-examples/include/sf_dynamic_preprocessor.h:94:
error: expected declaration specifiers or '...' before
'PreprocessorReloadSwapFreeFunc'
/root/snort/src/dynamic-examples/include/sf_dynamic_preprocessor.h:94:
error: storage class specified for parameter 'PreprocRegisterFunc'
/root/snort/src/dynamic-examples/include/sf_dynamic_preprocessor.h:95:
error: storage class specified for parameter 'GetRelatedReloadDataFunc'
/root/snort/src/dynamic-examples/include/sf_dynamic_preprocessor.h:97:
error: expected declaration specifiers or '...' before 'snort_ip_p'
/root/snort/src/dynamic-examples/include/sf_dynamic_preprocessor.h:97:
error: expected declaration specifiers or '...' before 'snort_ip_p'
/root/snort/src/dynamic-examples/include/sf_dynamic_preprocessor.h:97:
error: storage class specified for parameter 'ThresholdCheckFunc'
/root/snort/src/dynamic-examples/include/sf_dynamic_preprocessor.h:98:
error: storage class specified for parameter 'InlineDropFunc'
/root/snort/src/dynamic-examples/include/sf_dynamic_preprocessor.h:99:
error: storage class specified for parameter 'ActiveEnableFunc'
/root/snort/src/dynamic-examples/include/sf_dynamic_preprocessor.h:100:
error: storage class specified for parameter 'DisableDetectFunc'
/root/snort/src/dynamic-examples/include/sf_dynamic_preprocessor.h:101:
error: storage class specified for parameter 'SetPreprocBitFunc'
/root/snort/src/dynamic-examples/include/sf_dynamic_preprocessor.h:102:
error: storage class specified for parameter 'DetectFunc'
/root/snort/src/dynamic-examples/include/sf_dynamic_preprocessor.h:103:
error: storage class specified for parameter 'GetRuleInfoByNameFunc'
/root/snort/src/dynamic-examples/include/sf_dynamic_preprocessor.h:104:
error: storage class specified for parameter 'GetRuleInfoByIdFunc'
/root/snort/src/dynamic-examples/include/sf_dynamic_preprocessor.h:105:
error: storage class specified for parameter 'printfappendfunc'
/root/snort/src/dynamic-examples/include/sf_dynamic_preprocessor.h:106:
error: storage class specified for parameter 'TokenSplitFunc'
/root/snort/src/dynamic-examples/include/sf_dynamic_preprocessor.h:107:
error: storage class specified for parameter 'TokenFreeFunc'
/root/snort/src/dynamic-examples/include/sf_dynamic_preprocessor.h:108:
error: storage class specified for parameter 'AddPreprocProfileFunc'
/root/snort/src/dynamic-examples/include/sf_dynamic_preprocessor.h:109:
error: storage class specified for parameter 'ProfilingFunc'
/root/snort/src/dynamic-examples/include/sf_dynamic_preprocessor.h:110:
error: storage class specified for parameter 'PreprocessFunc'
/root/snort/src/dynamic-examples/include/sf_dynamic_preprocessor.h:111:
error: storage class specified for parameter 'PreprocStatsRegisterFunc'
/root/snort/src/dynamic-examples/include/sf_dynamic_preprocessor.h:112:
error: storage class specified for parameter 'AddPreprocReset'
/root/snort/src/dynamic-examples/include/sf_dynamic_preprocessor.h:113:
error: storage class specified for parameter 'AddPreprocResetStats'
/root/snort/src/dynamic-examples/include/sf_dynamic_preprocessor.h:114:
error: storage class specified for parameter 'AddPreprocReassemblyPktFunc'
/root/snort/src/dynamic-examples/include/sf_dynamic_preprocessor.h:115:
error: storage class specified for parameter
'SetPreprocReassemblyPktBitFunc'
/root/snort/src/dynamic-examples/include/sf_dynamic_preprocessor.h:116:
error: storage class specified for parameter 'DisablePreprocessorsFunc'
/root/snort/src/dynamic-examples/include/sf_dynamic_preprocessor.h:118:
error: storage class specified for parameter 'FindProtocolReferenceFunc'
/root/snort/src/dynamic-examples/include/sf_dynamic_preprocessor.h:119:
error: storage class specified for parameter 'AddProtocolReferenceFunc'
/root/snort/src/dynamic-examples/include/sf_dynamic_preprocessor.h:120:
error: storage class specified for parameter 'IsAdaptiveConfiguredFunc'
/root/snort/src/dynamic-examples/include/sf_dynamic_preprocessor.h:120:
warning: parameter names (without types) in function declaration
/root/snort/src/dynamic-examples/include/sf_dynamic_preprocessor.h:121:
error: expected declaration specifiers or '...' before 'tSfPolicyId'
/root/snort/src/dynamic-examples/include/sf_dynamic_preprocessor.h:121:
error: storage class specified for parameter
'IsAdaptiveConfiguredForSnortConfigFunc'
/root/snort/src/dynamic-examples/include/sf_dynamic_preprocessor.h:123:
error: storage class specified for parameter 'IP6BuildFunc'
/root/snort/src/dynamic-examples/include/sf_dynamic_preprocessor.h:126:
error: storage class specified for parameter 'IP6SetCallbacksFunc'
/root/snort/src/dynamic-examples/include/sf_dynamic_preprocessor.h:127:
error: expected declaration specifiers or '...' before 'PreprocOptionInit'
/root/snort/src/dynamic-examples/include/sf_dynamic_preprocessor.h:128:
error: expected declaration specifiers or '...' before 'PreprocOptionEval'
/root/snort/src/dynamic-examples/include/sf_dynamic_preprocessor.h:128:
error: expected declaration specifiers or '...' before
'PreprocOptionCleanup'
/root/snort/src/dynamic-examples/include/sf_dynamic_preprocessor.h:128:
error: expected declaration specifiers or '...' before 'PreprocOptionHash'
/root/snort/src/dynamic-examples/include/sf_dynamic_preprocessor.h:129:
error: expected declaration specifiers or '...' before
'PreprocOptionKeyCompare'
/root/snort/src/dynamic-examples/include/sf_dynamic_preprocessor.h:129:
error: expected declaration specifiers or '...' before
'PreprocOptionOtnHandler'
/root/snort/src/dynamic-examples/include/sf_dynamic_preprocessor.h:130:
error: expected declaration specifiers or '...' before
'PreprocOptionFastPatternFunc'
/root/snort/src/dynamic-examples/include/sf_dynamic_preprocessor.h:130:
error: storage class specified for parameter 'AddKeywordOverrideFunc'
/root/snort/src/dynamic-examples/include/sf_dynamic_preprocessor.h:131:
error: expected declaration specifiers or '...' before
'PreprocOptionByteOrderFunc'
/root/snort/src/dynamic-examples/include/sf_dynamic_preprocessor.h:131:
error: storage class specified for parameter 'AddKeywordByteOrderFunc'
/root/snort/src/dynamic-examples/include/sf_dynamic_preprocessor.h:133:
error: storage class specified for parameter 'IsPreprocEnabledFunc'
/root/snort/src/dynamic-examples/include/sf_dynamic_preprocessor.h:135:
error: storage class specified for parameter 'PortArrayFunc'
/root/snort/src/dynamic-examples/include/sf_dynamic_preprocessor.h:137:
error: storage class specified for parameter 'AlertQueueLog'
/root/snort/src/dynamic-examples/include/sf_dynamic_preprocessor.h:138:
error: storage class specified for parameter 'AlertQueueControl'
/root/snort/src/dynamic-examples/include/sf_dynamic_preprocessor.h:139:
warning: empty declaration
/root/snort/src/dynamic-examples/include/sf_dynamic_preprocessor.h:140:
error: expected declaration specifiers or '...' before 'tSfPolicyId'
/root/snort/src/dynamic-examples/include/sf_dynamic_preprocessor.h:140:
error: storage class specified for parameter 'SetPolicyFunc'
/root/snort/src/dynamic-examples/include/sf_dynamic_preprocessor.h:141:
error: expected declaration specifiers or '...' before '*' token
/root/snort/src/dynamic-examples/include/sf_dynamic_preprocessor.h:141:
warning: type defaults to 'int' in declaration of 'tSfPolicyId'
/root/snort/src/dynamic-examples/include/sf_dynamic_preprocessor.h:141:
error: storage class specified for parameter 'tSfPolicyId'
/root/snort/src/dynamic-examples/include/sf_dynamic_preprocessor.h:141:
error: 'tSfPolicyId' declared as function returning a function
/root/snort/src/dynamic-examples/include/sf_dynamic_preprocessor.h:141:
error: redefinition of parameter 'tSfPolicyId'
/root/snort/src/dynamic-examples/include/sfPolicy.h:184: note: previous
definition of 'tSfPolicyId' was here
/root/snort/src/dynamic-examples/include/sf_dynamic_preprocessor.h:142:
error: expected ')' before 'void'
/root/snort/src/dynamic-examples/include/sf_dynamic_preprocessor.h:143:
error: storage class specified for parameter 'SetFileDataPtrFunc'
/root/snort/src/dynamic-examples/include/sf_dynamic_preprocessor.h:144:
error: storage class specified for parameter 'DetectResetFunc'
/root/snort/src/dynamic-examples/include/sf_dynamic_preprocessor.h:145:
error: storage class specified for parameter 'SetAltDecodeFunc'
/root/snort/src/dynamic-examples/include/sf_dynamic_preprocessor.h:146:
error: storage class specified for parameter 'DetectFlagEnableFunc'
/root/snort/src/dynamic-examples/include/sf_dynamic_preprocessor.h:146:
warning: parameter names (without types) in function declaration
/root/snort/src/dynamic-examples/include/sf_dynamic_preprocessor.h:147:
error: storage class specified for parameter 'DynamicStrtol'
/root/snort/src/dynamic-examples/include/sf_dynamic_preprocessor.h:148:
error: storage class specified for parameter 'DynamicStrtoul'
/root/snort/src/dynamic-examples/include/sf_dynamic_preprocessor.h:149:
error: storage class specified for parameter 'DynamicStrnStr'
/root/snort/src/dynamic-examples/include/sf_dynamic_preprocessor.h:150:
error: storage class specified for parameter 'DynamicStrcasestr'
/root/snort/src/dynamic-examples/include/sf_dynamic_preprocessor.h:151:
error: storage class specified for parameter 'DynamicStrncpy'
/root/snort/src/dynamic-examples/include/sf_dynamic_preprocessor.h:152:
error: storage class specified for parameter 'DynamicStrnPbrk'
/root/snort/src/dynamic-examples/include/sf_dynamic_preprocessor.h:154:
error: storage class specified for parameter 'EvalRTNFunc'
/root/snort/src/dynamic-examples/include/sf_dynamic_preprocessor.h:156:
error: storage class specified for parameter 'EncodeNew'
/root/snort/src/dynamic-examples/include/sf_dynamic_preprocessor.h:157:
error: storage class specified for parameter 'EncodeDelete'
/root/snort/src/dynamic-examples/include/sf_dynamic_preprocessor.h:158:
error: storage class specified for parameter 'EncodeUpdate'
/root/snort/src/dynamic-examples/include/sf_dynamic_preprocessor.h:159:
error: storage class specified for parameter 'EncodeFormat'
/root/snort/src/dynamic-examples/include/sf_dynamic_preprocessor.h:160:
error: storage class specified for parameter 'PafEnabledFunc'
/root/snort/src/dynamic-examples/include/sf_dynamic_preprocessor.h:162:
error: storage class specified for parameter 'GetLogDirectory'
/root/snort/src/dynamic-examples/include/sf_dynamic_preprocessor.h:164:
error: expected declaration specifiers or '...' before 'OOBPreControlFunc'
/root/snort/src/dynamic-examples/include/sf_dynamic_preprocessor.h:164:
error: expected declaration specifiers or '...' before 'IBControlFunc'
/root/snort/src/dynamic-examples/include/sf_dynamic_preprocessor.h:165:
error: expected declaration specifiers or '...' before 'OOBPostControlFunc'
/root/snort/src/dynamic-examples/include/sf_dynamic_preprocessor.h:165:
error: storage class specified for parameter
'ControlSocketRegisterHandlerFunc'
/root/snort/src/dynamic-examples/include/sf_dynamic_preprocessor.h:167:
error: storage class specified for parameter 'RegisterIdleHandler'
/root/snort/src/dynamic-examples/include/sf_dynamic_preprocessor.h:167:
warning: parameter names (without types) in function declaration
/root/snort/src/dynamic-examples/include/sf_dynamic_preprocessor.h:169:
error: storage class specified for parameter 'DynamicSendBlockResponse'
/root/snort/src/dynamic-examples/include/sf_dynamic_preprocessor.h:170:
error: storage class specified for parameter 'ActiveInjectDataFunc'
/root/snort/src/dynamic-examples/include/sf_dynamic_preprocessor.h:172:
error: storage class specified for parameter 'DynamicSetFlowId'
/root/snort/src/dynamic-examples/include/sf_dynamic_preprocessor.h:174:
error: storage class specified for parameter 'DynamicIsStrEmpty'
/root/snort/src/dynamic-examples/include/sf_dynamic_preprocessor.h:175:
error: storage class specified for parameter 'AddPeriodicCheck'
/root/snort/src/dynamic-examples/include/sf_dynamic_preprocessor.h:176:
error: storage class specified for parameter 'AddPostConfigFuncs'
In file included from sf_dynamic_preproc_lib.c:37:
/root/snort/src/dynamic-examples/include/sf_dynamic_preprocessor.h:177:
error: storage class specified for parameter 'AddOutPutModule'
/root/snort/src/dynamic-examples/include/sf_dynamic_preprocessor.h:178:
error: storage class specified for parameter 'CanWhitelist'
/root/snort/src/dynamic-examples/include/sf_dynamic_preprocessor.h:180:
error: storage class specified for parameter 'DisableAllPoliciesFunc'
/root/snort/src/dynamic-examples/include/sf_dynamic_preprocessor.h:181:
error: storage class specified for parameter 'ReenablePreprocBitFunc'
/root/snort/src/dynamic-examples/include/sf_dynamic_preprocessor.h:183:
error: storage class specified for parameter 'DynamicCheckValueInRangeFunc'
/root/snort/src/dynamic-examples/include/sf_dynamic_preprocessor.h:184:
error: storage class specified for parameter 'DynamicReadyForProcessFunc'
/root/snort/src/dynamic-examples/include/sf_dynamic_preprocessor.h:203:
error: expected specifier-qualifier-list before 'SFDataBuffer'
/root/snort/src/dynamic-examples/include/sf_dynamic_preprocessor.h:347:
error: storage class specified for parameter 'DynamicPreprocessorData'
/root/snort/src/dynamic-examples/include/sf_dynamic_preprocessor.h:353:
error: expected ')' before '*' token
/root/snort/src/dynamic-examples/include/sf_dynamic_preprocessor.h:363:
error: expected '=', ',', ';', 'asm' or '__attribute__' before '_dpd'
sf_dynamic_preproc_lib.c:40: error: expected declaration specifiers before
'DynamicPreprocessorData'
sf_dynamic_preproc_lib.c:43: error: expected '=', ',', ';', 'asm' or
'__attribute__' before '{' token
sf_dynamic_preproc_lib.c:59: error: expected declaration specifiers before
'__attribute__'
sf_dynamic_preproc_lib.c:79: error: expected declaration specifiers before
'__attribute__'
sf_preproc_info.h:36: error: old-style parameter declarations in prototyped
function definition
sf_preproc_info.h:36: error: parameter name omitted
sf_preproc_info.h:36: error: parameter name omitted
sf_preproc_info.h:37: error: parameter name omitted
sf_dynamic_preproc_lib.c:89: error: expected '{' at end of input
make[2]: *** [sf_dynamic_preproc_lib.lo] Error 1
make[1]: *** [install] Error 2
make: *** [install-recursive] Error 1
Please guide me
Thankyou.
On Tue, Nov 26, 2013 at 3:43 PM, Amtul Saboor <saboor.amtul () gmail com>wrote:
Hello,
I need to verify if I am doing it correctly. because i dont think dpx.c is
running the way it should. This is my output when i type ./test.sh :
root@bt:/usr/src/dpx-1.6# cd /usr/src/dp
root@bt:/usr/src/dp# ./test.sh
./setup.sh: line 1: /root/snort: is a directory
Running in IDS mode
--== Initializing Snort ==--
Initializing Output Plugins!
Initializing Preprocessors!
Initializing Plug-ins!
Parsing Rules file "test/snort.conf"
Tagged Packet Limit: 256
Loading all dynamic preprocessor libs from lib/snort_dynamicpreprocessor...
Loading dynamic preprocessor library
lib/snort_dynamicpreprocessor/libdpx.so... done
Finished Loading all dynamic preprocessor libs from
lib/snort_dynamicpreprocessor
Log directory = /var/log/snort
+++++++++++++++++++++++++++++++++++++++++++++++++++
Initializing rule chains...
4 Snort rules read
4 detection rules
0 decoder rules
0 preprocessor rules
2 Option Chains linked into 2 Chain Headers
0 Dynamic rules
+++++++++++++++++++++++++++++++++++++++++++++++++++
+-------------------[Rule Port
Counts]---------------------------------------
| tcp udp icmp ip
| src 0 0 0 0
| dst 0 0 0 0
| any 4 0 0 0
| nc 4 0 0 0
| s+d 0 0 0 0
+----------------------------------------------------------------------------
+-----------------------[detection-filter-config]------------------------------
| memory-cap : 1048576 bytes
+-----------------------[detection-filter-rules]-------------------------------
| none
-------------------------------------------------------------------------------
+-----------------------[rate-filter-config]-----------------------------------
| memory-cap : 1048576 bytes
+-----------------------[rate-filter-rules]------------------------------------
| none
-------------------------------------------------------------------------------
+-----------------------[event-filter-config]----------------------------------
| memory-cap : 1048576 bytes
+-----------------------[event-filter-global]----------------------------------
+-----------------------[event-filter-local]-----------------------------------
| none
+-----------------------[suppression]------------------------------------------
| none
-------------------------------------------------------------------------------
Rule application order:
activation->dynamic->pass->drop->sdrop->reject->alert->log
Verifying Preprocessor Configurations!
[ Port Based Pattern Matching Memory ]
pcap DAQ configured to read-file.
The DAQ version does not support reload.
Acquiring network traffic from "test/test.pcap".
Reload thread starting...
Reload thread started, thread 0xb6997b70 (1754)
--== Initialization Complete ==--
,,_ -*> Snort! <*-
o" )~ Version 2.9.5.5 GRE (Build 205)
'''' By Martin Roesch & The Snort Team:
http://www.snort.org/snort/snort-team
Copyright (C) 1998-2013 Sourcefire, Inc., et al.
Using libpcap version 1.0.0
Using PCRE version: 7.8 2008-09-05
Using ZLIB version: 1.2.3.3
Preprocessor Object: dpx Version 1.6 <Build 1>
Commencing packet processing (pid=1753)
3 256 2 0
4 256 2 0
5 256 1 0
===============================================================================
Run time for packet processing was 0.994 seconds
Snort processed 6 packets.
Snort ran for 0 days 0 hours 0 minutes 0 seconds
Pkts/sec: 6
===============================================================================
Packet I/O Totals:
Received: 6
Analyzed: 6 (100.000%)
Dropped: 0 ( 0.000%)
Filtered: 0 ( 0.000%)
Outstanding: 0 ( 0.000%)
Injected: 0
===============================================================================
Breakdown by protocol (includes rebuilt packets):
Eth: 6 (100.000%)
VLAN: 0 ( 0.000%)
IP4: 6 (100.000%)
Frag: 0 ( 0.000%)
ICMP: 0 ( 0.000%)
UDP: 0 ( 0.000%)
TCP: 6 (100.000%)
IP6: 0 ( 0.000%)
IP6 Ext: 0 ( 0.000%)
IP6 Opts: 0 ( 0.000%)
Frag6: 0 ( 0.000%)
ICMP6: 0 ( 0.000%)
UDP6: 0 ( 0.000%)
TCP6: 0 ( 0.000%)
Teredo: 0 ( 0.000%)
ICMP-IP: 0 ( 0.000%)
IP4/IP4: 0 ( 0.000%)
IP4/IP6: 0 ( 0.000%)
IP6/IP4: 0 ( 0.000%)
IP6/IP6: 0 ( 0.000%)
GRE: 0 ( 0.000%)
GRE Eth: 0 ( 0.000%)
GRE VLAN: 0 ( 0.000%)
GRE IP4: 0 ( 0.000%)
GRE IP6: 0 ( 0.000%)
GRE IP6 Ext: 0 ( 0.000%)
GRE PPTP: 0 ( 0.000%)
GRE ARP: 0 ( 0.000%)
GRE IPX: 0 ( 0.000%)
GRE Loop: 0 ( 0.000%)
MPLS: 0 ( 0.000%)
ARP: 0 ( 0.000%)
IPX: 0 ( 0.000%)
Eth Loop: 0 ( 0.000%)
Eth Disc: 0 ( 0.000%)
IP4 Disc: 0 ( 0.000%)
IP6 Disc: 0 ( 0.000%)
TCP Disc: 0 ( 0.000%)
UDP Disc: 0 ( 0.000%)
ICMP Disc: 0 ( 0.000%)
All Discard: 0 ( 0.000%)
Other: 0 ( 0.000%)
Bad Chk Sum: 0 ( 0.000%)
Bad TTL: 0 ( 0.000%)
S5 G 1: 0 ( 0.000%)
S5 G 2: 0 ( 0.000%)
Total: 6
===============================================================================
Action Stats:
Alerts: 3 ( 50.000%)
Logged: 3 ( 50.000%)
Passed: 0 ( 0.000%)
Limits:
Match: 0
Queue: 0
Log: 0
Event: 0
Alert: 0
Verdicts:
Allow: 6 (100.000%)
Block: 0 ( 0.000%)
Replace: 0 ( 0.000%)
Whitelist: 0 ( 0.000%)
Blacklist: 0 ( 0.000%)
Ignore: 0 ( 0.000%)
=============================
Snort exiting
Regards
-- *Amtul Saboor* *MS (Information Security)* *Military College of Signals, National University of Science & Technology, Rawalpindi* *Pakistan*
------------------------------------------------------------------------------ Rapidly troubleshoot problems before they affect your business. Most IT organizations don't have a clear picture of how application performance affects their revenue. With AppDynamics, you get 100% visibility into your Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro! http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk
_______________________________________________ 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 to know which files to be changed in Dynamic preprocessor starter kit Amtul Saboor (Nov 22)
- Re: Need help to know which files to be changed in Dynamic preprocessor starter kit Russ Combs (Nov 22)
- Re: Need help to know which files to be changed in Dynamic preprocessor starter kit Amtul Saboor (Nov 22)
- Re: Need help to know which files to be changed in Dynamic preprocessor starter kit Amtul Saboor (Nov 26)
- Re: Need help to know which files to be changed in Dynamic preprocessor starter kit Amtul Saboor (Dec 26)
- Re: Need help to know which files to be changed in Dynamic preprocessor starter kit Emiliano Fausto (Dec 26)
- Re: Need help to know which files to be changed in Dynamic preprocessor starter kit Russ Combs (Dec 26)
- Re: Need help to know which files to be changed in Dynamic preprocessor starter kit Amtul Saboor (Nov 22)
- Re: Need help to know which files to be changed in Dynamic preprocessor starter kit Russ Combs (Nov 22)
