snort  2.9.17
About: Snort is a network intrusion prevention and detection system (IDS/IPS) combining the benefits of signature, protocol and anomaly-based inspection.
  Fossies Dox: snort-2.9.17.tar.gz  ("unofficial" and yet experimental doxygen-generated source code documentation)  

sf_dynamic_plugins.c File Reference
#include <unistd.h>
#include <stdlib.h>
#include <string.h>
#include <sys/types.h>
#include <limits.h>
#include <dirent.h>
#include <dlfcn.h>
#include <fnmatch.h>
#include <errno.h>
#include <stdarg.h>
#include "config.h"
#include "decode.h"
#include "encode.h"
#include "snort_debug.h"
#include "detect.h"
#include "util.h"
#include "snort.h"
#include "memory_stats.h"
#include "sf_dynamic_engine.h"
#include "sf_dynamic_detection.h"
#include "sf_dynamic_preprocessor.h"
#include "sf_dynamic_decompression.h"
#include "sp_dynamic.h"
#include "sp_preprocopt.h"
#include "sp_pcre.h"
#include "event_queue.h"
#include "plugbase.h"
#include "sfthreshold.h"
#include "active.h"
#include "mstring.h"
#include "sfsnprintfappend.h"
#include "session_api.h"
#include "stream_api.h"
#include "sf_iph.h"
#include "fpdetect.h"
#include "sfportobject.h"
#include <pcre.h>
#include "parser.h"
#include "event_wrapper.h"
#include "detection_util.h"
#include "sfcontrol_funcs.h"
#include "idle_processing_funcs.h"
#include "../dynamic-output/plugins/output.h"
#include "file_api.h"
#include "packet_time.h"
#include "perf_indicators.h"
#include "reload.h"
#include "so_rule_mem_adjust.h"
Include dependency graph for sf_dynamic_plugins.c:

Go to the source code of this file.

Data Structures

struct  _DynamicEnginePlugin
 
struct  _DynamicPreprocessorPlugin
 
struct  _LoadableModule
 
struct  _DynamicRuleSessionData
 

Macros

#define MODULE_EXT   "*.so*"
 
#define NONFATAL   0
 
#define FATAL   1
 

Typedefs

typedef void * PluginHandle
 
typedef int(* LoadLibraryFunc) (SnortConfig *sc, const char *const path, int indent)
 
typedef struct _DynamicEnginePlugin DynamicEnginePlugin
 
typedef struct _DynamicPreprocessorPlugin DynamicPreprocessorPlugin
 
typedef struct _LoadableModule LoadableModule
 
typedef void(* dlsym_func) (void)
 
typedef struct _DynamicRuleSessionData DynamicRuleSessionData
 
typedef void(* SnortPacketProcessFunc) (Packet *, void *)
 
typedef void(* MetadataProcessFunc) (int, const uint8_t *)
 

Functions

void VerifySharedLibUniqueness ()
 
void CloseDynamicLibrary (PluginHandle handle)
 
static dlsym_func getSymbol (PluginHandle handle, char *symbol, DynamicPluginMeta *meta, int fatal)
 
void GetPluginVersion (PluginHandle handle, DynamicPluginMeta *meta)
 
PluginHandle openDynamicLibrary (const char *const library_name, int useGlobal)
 
void LoadAllLibs (struct _SnortConfig *sc, const char *const path, LoadLibraryFunc loadFunc)
 
void AddEnginePlugin (PluginHandle handle, InitEngineLibFunc initFunc, CompatibilityFunc compatFunc, DynamicPluginMeta *meta)
 
void RemoveEnginePlugin (DynamicEnginePlugin *plugin)
 
int ValidateDynamicEngines (SnortConfig *sc)
 
int LoadDynamicEngineLib (SnortConfig *sc, const char *const library_name, int indent)
 
void LoadAllDynamicEngineLibs (SnortConfig *sc, const char *const path)
 
void CloseDynamicEngineLibs (void)
 
void RemovePreprocessorPlugin (DynamicPreprocessorPlugin *plugin)
 
void AddPreprocessorPlugin (PluginHandle handle, InitPreprocessorLibFunc initFunc, DynamicPluginMeta *meta)
 
void AddDetectionPlugin (SnortConfig *sc, PluginHandle handle, InitDetectionLibFunc initFunc, DynamicPluginMeta *meta)
 
void RemoveDetectionPlugin (SnortConfig *sc, DynamicDetectionPlugin *plugin)
 
int LoadDynamicDetectionLib (SnortConfig *sc, const char *const library_name, int indent)
 
void CloseDynamicDetectionLibs (SnortConfig *sc)
 
void LoadAllDynamicDetectionLibs (SnortConfig *sc, const char *const path)
 
void RemoveDuplicateEngines (void)
 
void RemoveDuplicateDetectionPlugins (SnortConfig *sc)
 
void RemoveDuplicatePreprocessorPlugins (void)
 
void VerifyDetectionPluginRequirements (SnortConfig *sc)
 
int InitDynamicEnginePlugins (DynamicEngineData *info)
 
static size_t SoRuleMemInUse ()
 
static void * DynamicRuleDataAlloc (size_t size)
 
static void DynamicRuleDataFree (void *data)
 
static void DynamicRuleDataFreeSession (void *data)
 
int DynamicSetRuleData (void *p, const RuleInformation *info, void *data, void *compression_data)
 
void DynamicGetRuleData (void *p, const RuleInformation *info, void **p_data, void **p_compression_data)
 
void * pcreCompile (const char *pattern, int options, const char **errptr, int *erroffset, const unsigned char *tableptr)
 
void * pcreStudy (struct _SnortConfig *sc, const void *code, int options, const char **errptr)
 
void pcreOvectorInfo (int **ovector, int *ovector_size)
 
int pcreExec (const void *code, const void *extra, const char *subj, int len, int start, int options, int *ovec, int ovecsize)
 
static int setFlowId (const void *p, uint32_t id)
 
static const uint8_tgetHttpBuffer (HTTP_BUFFER hb_type, unsigned *len)
 
int InitDynamicEngines (char *dynamic_rules_path)
 
int InitDynamicPreprocessorPlugins (DynamicPreprocessorData *info)
 
void * AddPreprocessor (struct _SnortConfig *sc, void(*pp_func)(void *, void *), uint16_t priority, uint32_t preproc_id, uint32_t proto_mask)
 
void * AddPreprocessorAllPolicies (struct _SnortConfig *sc, void(*pp_func)(void *, void *), uint16_t priority, uint32_t preproc_id, uint32_t proto_mask)
 
void * AddMetaEval (struct _SnortConfig *sc, void(*meta_eval_func)(int, const uint8_t *), uint16_t priority, uint32_t preproc_id)
 
void * AddDetection (struct _SnortConfig *sc, void(*det_func)(void *, void *), uint16_t priority, uint32_t det_id, uint32_t proto_mask)
 
void AddPreprocessorCheck (struct _SnortConfig *sc, int(*pp_chk_func)(struct _SnortConfig *sc))
 
void DynamicDisableDetection (void *p)
 
void DynamicDisableAllDetection (void *p)
 
void DynamicEnableContentDetection (void)
 
void DynamicDisablePacketAnalysis (void *p)
 
int DynamicDetect (void *p)
 
int DynamicEnablePreprocessor (void *p, uint32_t preprocId)
 
void * DynamicGetRuleClassByName (char *name)
 
void * DynamicGetRuleClassById (int id)
 
void DynamicRegisterPreprocessorProfile (const char *keyword, void *stats, int layer, void *parent, PreprocStatsNodeFreeFunc freefn)
 
int DynamicProfilingPreprocs (void)
 
int DynamicPreprocess (void *packet)
 
void DynamicDisablePreprocessors (void *p)
 
void DynamicIP6Build (void *p, const void *hdr, int family)
 
static __inline void DynamicIP6SetCallbacks (void *p, int family, char orig)
 
int DynamicSnortEventqLog (void *p)
 
tSfPolicyId DynamicGetParserPolicy (struct _SnortConfig *sc)
 
tSfPolicyId DynamicGetNapRuntimePolicy (void)
 
tSfPolicyId DynamicGetIpsRuntimePolicy (void)
 
tSfPolicyId DynamicGetDefaultPolicy (void)
 
tSfPolicyId DynamicGetPolicyFromId (uint16_t id)
 
void DynamicChangeNapRuntimePolicy (tSfPolicyId new_id, void *scb)
 
void DynamicChangeIpsRuntimePolicy (tSfPolicyId new_id, void *p)
 
static void DynamicAddPktTraceData (int module, int strLen)
 
static const char * DynamicGetPktTraceActionMsg ()
 
static void * DynamicEncodeNew (void)
 
static void DynamicEncodeDelete (void *p)
 
static void * DynamicNewGrinderPkt (void *p, void *phdr, uint8_t *pkt)
 
static void DynamicDeleteGrinderPkt (void *p)
 
static int DynamicEncodeFormat (uint32_t f, const void *p, void *c, int t)
 
static void DynamicEncodeUpdate (void *p)
 
void DynamicDropPacket (void *p)
 
signed char DynamicRetryPacket (void *p)
 
signed char DynamicActivePacketWasDropped (void)
 
void DynamicForceDropPacket (void *p)
 
void DynamicDropSessionAndReset (void *p)
 
void DynamicForceDropSession (void *p)
 
void DynamicForceDropSessionAndReset (void *p)
 
void DynamicSetParserPolicy (SnortConfig *sc, tSfPolicyId id)
 
void DynamicSetFileDataPtr (uint8_t *ptr, uint16_t decode_size)
 
void DynamicDetectResetPtr (uint8_t *ptr, uint16_t decode_size)
 
void DynamicSetAltDecode (uint16_t altLen)
 
int DynamicGetNapInlineMode (void)
 
int DynamicGetIpsInlineMode (void)
 
long DynamicSnortStrtol (const char *nptr, char **endptr, int base)
 
unsigned long DynamicSnortStrtoul (const char *nptr, char **endptr, int base)
 
const char * DynamicSnortStrnStr (const char *s, int slen, const char *accept)
 
const char * DynamicSnortStrcasestr (const char *s, int slen, const char *accept)
 
int DynamicSnortStrncpy (char *dst, const char *src, size_t dst_size)
 
const char * DynamicSnortStrnPbrk (const char *s, int slen, const char *accept)
 
int DynamicEvalRTN (void *rtn, void *p, int check_ports)
 
char * DynamicGetLogDirectory (void)
 
uint32_t DynamicGetSnortInstance (void)
 
signed char DynamicIsPafEnabled (void)
 
signed char DynamicIsReadMode (void)
 
time_t DynamicPktTime (void)
 
void DynamicGetPktTimeOfDay (struct timeval *tv)
 
int DynamicCanWhitelist (void)
 
int DynamicSnortIsStrEmpty (const char *s)
 
static void DynamicDisableAllPolicies (struct _SnortConfig *sc)
 
static int DynamicReenablePreprocBitFunc (struct _SnortConfig *sc, unsigned int preproc_id)
 
static void registerSslAppIdLookup (SslAppIdLookupFunc fnptr)
 
static int sslAppIdLookup (void *ssnptr, const char *serverName, const char *commonName, int32_t *serviceAppId, int32_t *clientAppId, int32_t *payloadAppId)
 
static void registerSetTlsHostAppId (SetTlsHostAppIdFunc fnptr)
 
static void setTlsHostAppId (void *ssnptr, const char *serverName, const char *commonName, const char *orgName, const char *subjectAltName, signed char isSniMismatch, int32_t *serviceAppId, int32_t *clientAppId, int32_t *payloadAppId)
 
static void registerGetAppId (GetAppIdFunc fnptr)
 
static int32_t getAppId (void *ssnptr)
 
void registerReputationGetEntryCount (ReputationGetEntryCountFunc entryCountFn)
 
void registerReputationProcessExternal (ReputationProcessExternalIpFunc extProcessFn)
 
static int _reputation_get_entry_count (void)
 
static signed char _reputation_process_external_ip (void *p, sfaddr_t *ip)
 
void registerUrlQuery (UrlQueryCreateFunc createFn, UrlQueryDestroyFunc destroyFn, UrlQueryMatchFunc matchFn)
 
static struct urlQueryContext * urlQueryCreate (const char *url)
 
static void urlQueryDestroy (struct urlQueryContext *context)
 
static int urlQueryMatch (void *ssnptr, struct urlQueryContext *context, uint16_t inUrlCat, uint16_t inUrlMinRep, uint16_t inUrlMaxRep)
 
static void registerUserGroupIdGet (UserGroupIdGetFunc userIdFn)
 
static int userGroupIdGet (void *ssnptr, uint32_t *userId, uint32_t *realmId, unsigned *groupIdArray, unsigned groupIdArrayLen)
 
static void registerGeoIpAddressLookup (GeoIpAddressLookupFunc fn)
 
static int geoIpAddressLookup (const sfaddr_t *snortIp, uint16_t *geo)
 
static void registerGetIntfData (GetIntfDataFunc fn)
 
static void getIntfData (void *ssnptr, int32_t *ingressIntfIndex, int32_t *egressIntfIndex, int32_t *ingressZoneIndex, int32_t *egressZoneIndex)
 
static void registerUpdateSSLSSnLogData (UpdateSSLSSnLogDataFunc fn)
 
static void updateSSLSSnLogData (void *ssnptr, uint8_t logging_on, uint8_t action_is_block, const char *ssl_cert_fingerprint, uint32_t ssl_cert_fingerprint_len, uint32_t ssl_cert_status, uint8_t *ssl_policy_id, uint32_t ssl_policy_id_len, uint32_t ssl_rule_id, uint16_t ssl_cipher_suite, uint8_t ssl_version, uint16_t ssl_actual_action, uint16_t ssl_expected_action, uint32_t ssl_url_category, uint16_t ssl_flow_status, uint32_t ssl_flow_error, uint32_t ssl_flow_messages, uint64_t ssl_flow_flags, char *ssl_server_name, uint8_t *ssl_session_id, uint8_t session_id_len, uint8_t *ssl_ticket_id, uint8_t ticket_id_len)
 
static void registerGetSSLActualAction (GetSSLActualActionFunc fn)
 
static int getSSLActualAction (void *ssnptr, uint16_t *action)
 
static void registerEndSSLSSnLogData (EndSSLSSnLogDataFunc fn)
 
static void endSSLSSnLogData (void *ssnptr, uint32_t ssl_flow_messages, uint64_t ssl_flow_flags)
 
static __inline signed char DynamicReadyForProcess (void *pkt)
 
void DynamicSetSSLCallback (void *p)
 
void * DynamicGetSSLCallback (void)
 
signed char DynamicIsSSLPolicyEnabled (struct _SnortConfig *sc)
 
void DynamicSetSSLPolicyEnabled (struct _SnortConfig *sc, tSfPolicyId policy, signed char value)
 
void registerFtpModeQuery (ftpGetModefunc fnptr)
 
static signed char ftpGetDataSessionMode (void *ssnptr)
 
static int GetSnortPerfIndicators (void *p)
 
static uint32_t GetSnortPacketLatency ()
 
static double GetSnortPacketDropPortion ()
 
static signed char DynamicIsTestMode (void)
 
static SnortConfigGetCurrentSnortConfig (void)
 
static void DynamicSetIPRepUpdateCount (uint8_t count)
 
static void ErrorMsgThrottled (void *tinfo, const char *format,...)
 
int InitDynamicPreprocessors (void)
 
int InitDynamicDetectionPlugins (SnortConfig *sc)
 
int DumpDetectionLibRules (SnortConfig *sc)
 
int LoadDynamicPreprocessor (SnortConfig *sc, const char *const library_name, int indent)
 
void LoadAllDynamicPreprocessors (SnortConfig *sc, const char *const path)
 
void CloseDynamicPreprocessorLibs (void)
 
void * GetNextEnginePluginVersion (void *p)
 
void * GetNextDetectionPluginVersion (SnortConfig *sc, void *p)
 
void * GetNextPreprocessorPluginVersion (void *p)
 
DynamicPluginMetaGetDetectionPluginMetaData (void *p)
 
DynamicPluginMetaGetEnginePluginMetaData (void *p)
 
DynamicPluginMetaGetPreprocessorPluginMetaData (void *p)
 

Variables

char * no_file = "unknown"
 
int no_line = 0
 
static DynamicEnginePluginloadedEngines = 0
 
static DynamicPreprocessorPluginloadedPreprocessorPlugins = 0
 
static uint32_t so_rule_memory = 0
 
static ThrottleInfo error_throttleInfo = {0,60,0}
 
static SslAppIdLookupFunc sslAppIdLookupFnPtr
 
static SetTlsHostAppIdFunc setTlsHostAppIdFnPtr
 
static GetAppIdFunc getAppIdFnPtr = 0
 
static UrlQueryCreateFunc urlQueryCreateFnPtr
 
static UrlQueryDestroyFunc urlQueryDestroyFnPtr
 
static UrlQueryMatchFunc urlQueryMatchFnPtr
 
static UserGroupIdGetFunc userGroupIdGetFnPtr
 
static GeoIpAddressLookupFunc geoIpAddressLookupFnPtr
 
static UpdateSSLSSnLogDataFunc updateSSLSSnLogDataFnPtr
 
static EndSSLSSnLogDataFunc endSSLSSnLogDataFnPtr
 
static GetSSLActualActionFunc getSSLActualActionFnPtr
 
static GetIntfDataFunc getIntfDataFnPtr
 
static ReputationProcessExternalIpFunc reputationProcessExternalIpFnPtr
 
static ReputationGetEntryCountFunc reputatinGetEntryCountFnPtr
 
static ftpGetModefunc ftpGetDataModefnptr
 

Macro Definition Documentation

◆ FATAL

#define FATAL   1

Definition at line 182 of file sf_dynamic_plugins.c.

◆ MODULE_EXT

#define MODULE_EXT   "*.so*"

Definition at line 44 of file sf_dynamic_plugins.c.

◆ NONFATAL

#define NONFATAL   0

Definition at line 181 of file sf_dynamic_plugins.c.

Typedef Documentation

◆ dlsym_func

typedef void(* dlsym_func) (void)

Definition at line 184 of file sf_dynamic_plugins.c.

◆ DynamicEnginePlugin

◆ DynamicPreprocessorPlugin

◆ DynamicRuleSessionData

◆ LoadableModule

◆ LoadLibraryFunc

typedef int(* LoadLibraryFunc) (SnortConfig *sc, const char *const path, int indent)

Definition at line 137 of file sf_dynamic_plugins.c.

◆ MetadataProcessFunc

typedef void(* MetadataProcessFunc) (int, const uint8_t *)

Definition at line 1485 of file sf_dynamic_plugins.c.

◆ PluginHandle

typedef void* PluginHandle

Definition at line 46 of file sf_dynamic_plugins.c.

◆ SnortPacketProcessFunc

typedef void(* SnortPacketProcessFunc) (Packet *, void *)

Definition at line 1469 of file sf_dynamic_plugins.c.

Function Documentation

◆ _reputation_get_entry_count()

static int _reputation_get_entry_count ( void  )
static

Definition at line 1987 of file sf_dynamic_plugins.c.

References reputatinGetEntryCountFnPtr.

Referenced by InitDynamicPreprocessors().

◆ _reputation_process_external_ip()

static signed char _reputation_process_external_ip ( void *  p,
sfaddr_t ip 
)
static

Definition at line 1994 of file sf_dynamic_plugins.c.

References reputationProcessExternalIpFnPtr.

Referenced by InitDynamicPreprocessors().

◆ AddDetection()

void* AddDetection ( struct _SnortConfig sc,
void(*)(void *, void *)  det_func,
uint16_t  priority,
uint32_t  det_id,
uint32_t  proto_mask 
)

Definition at line 1493 of file sf_dynamic_plugins.c.

References AddFuncToDetectionList().

Referenced by InitDynamicPreprocessors().

◆ AddDetectionPlugin()

◆ AddEnginePlugin()

◆ AddMetaEval()

void* AddMetaEval ( struct _SnortConfig sc,
void(*)(int, const uint8_t *)  meta_eval_func,
uint16_t  priority,
uint32_t  preproc_id 
)

Definition at line 1486 of file sf_dynamic_plugins.c.

References AddFuncToPreprocMetaEvalList().

Referenced by InitDynamicPreprocessors().

◆ AddPreprocessor()

void* AddPreprocessor ( struct _SnortConfig sc,
void(*)(void *, void *)  pp_func,
uint16_t  priority,
uint32_t  preproc_id,
uint32_t  proto_mask 
)

Definition at line 1470 of file sf_dynamic_plugins.c.

References AddFuncToPreprocList().

Referenced by InitDynamicPreprocessors().

◆ AddPreprocessorAllPolicies()

void* AddPreprocessorAllPolicies ( struct _SnortConfig sc,
void(*)(void *, void *)  pp_func,
uint16_t  priority,
uint32_t  preproc_id,
uint32_t  proto_mask 
)

Definition at line 1477 of file sf_dynamic_plugins.c.

References AddFuncToPreprocListAllNapPolicies(), and NULL.

Referenced by InitDynamicPreprocessors().

◆ AddPreprocessorCheck()

void AddPreprocessorCheck ( struct _SnortConfig sc,
int(*)(struct _SnortConfig *sc)  pp_chk_func 
)

Definition at line 1500 of file sf_dynamic_plugins.c.

References AddFuncToConfigCheckList().

Referenced by InitDynamicPreprocessors().

◆ AddPreprocessorPlugin()

◆ CloseDynamicDetectionLibs()

◆ CloseDynamicEngineLibs()

◆ CloseDynamicLibrary()

◆ CloseDynamicPreprocessorLibs()

◆ DumpDetectionLibRules()

◆ DynamicActivePacketWasDropped()

signed char DynamicActivePacketWasDropped ( void  )

Definition at line 1723 of file sf_dynamic_plugins.c.

References Active_PacketWasDropped().

Referenced by InitDynamicPreprocessors().

◆ DynamicAddPktTraceData()

static void DynamicAddPktTraceData ( int  module,
int  strLen 
)
static

Definition at line 1633 of file sf_dynamic_plugins.c.

References addPktTraceData().

Referenced by InitDynamicPreprocessors().

◆ DynamicCanWhitelist()

int DynamicCanWhitelist ( void  )

Definition at line 1868 of file sf_dynamic_plugins.c.

References DAQ_CanWhitelist().

Referenced by InitDynamicPreprocessors().

◆ DynamicChangeIpsRuntimePolicy()

◆ DynamicChangeNapRuntimePolicy()

void DynamicChangeNapRuntimePolicy ( tSfPolicyId  new_id,
void *  scb 
)

◆ DynamicDeleteGrinderPkt()

static void DynamicDeleteGrinderPkt ( void *  p)
static

Definition at line 1658 of file sf_dynamic_plugins.c.

References DeleteGrinderPkt().

Referenced by InitDynamicPreprocessors().

◆ DynamicDetect()

int DynamicDetect ( void *  p)

Definition at line 1525 of file sf_dynamic_plugins.c.

References Detect().

Referenced by InitDynamicPreprocessors().

◆ DynamicDetectResetPtr()

void DynamicDetectResetPtr ( uint8_t ptr,
uint16_t  decode_size 
)

Definition at line 1759 of file sf_dynamic_plugins.c.

References DetectReset().

Referenced by InitDynamicPreprocessors().

◆ DynamicDisableAllDetection()

void DynamicDisableAllDetection ( void *  p)

Definition at line 1510 of file sf_dynamic_plugins.c.

References DisableAllDetect().

Referenced by InitDynamicPreprocessors().

◆ DynamicDisableAllPolicies()

static void DynamicDisableAllPolicies ( struct _SnortConfig sc)
static

Definition at line 1885 of file sf_dynamic_plugins.c.

References DisableAllPolicies().

Referenced by InitDynamicPreprocessors().

◆ DynamicDisableDetection()

void DynamicDisableDetection ( void *  p)

Definition at line 1505 of file sf_dynamic_plugins.c.

References DisableDetect().

Referenced by InitDynamicPreprocessors().

◆ DynamicDisablePacketAnalysis()

void DynamicDisablePacketAnalysis ( void *  p)

Definition at line 1520 of file sf_dynamic_plugins.c.

References DisablePacketAnalysis().

Referenced by InitDynamicPreprocessors().

◆ DynamicDisablePreprocessors()

void DynamicDisablePreprocessors ( void *  p)

Definition at line 1573 of file sf_dynamic_plugins.c.

References DisableAppPreprocessors().

Referenced by InitDynamicPreprocessors().

◆ DynamicDropPacket()

void DynamicDropPacket ( void *  p)

Definition at line 1713 of file sf_dynamic_plugins.c.

References Active_DropPacket().

Referenced by InitDynamicPreprocessors().

◆ DynamicDropSessionAndReset()

void DynamicDropSessionAndReset ( void *  p)

Definition at line 1733 of file sf_dynamic_plugins.c.

References Active_DropSession().

Referenced by InitDynamicPreprocessors().

◆ DynamicEnableContentDetection()

void DynamicEnableContentDetection ( void  )

Definition at line 1515 of file sf_dynamic_plugins.c.

References EnableContentDetect().

Referenced by InitDynamicPreprocessors().

◆ DynamicEnablePreprocessor()

int DynamicEnablePreprocessor ( void *  p,
uint32_t  preprocId 
)

Definition at line 1530 of file sf_dynamic_plugins.c.

References EnablePreprocessor().

Referenced by InitDynamicPreprocessors().

◆ DynamicEncodeDelete()

static void DynamicEncodeDelete ( void *  p)
static

Definition at line 1648 of file sf_dynamic_plugins.c.

References Encode_Delete().

Referenced by InitDynamicPreprocessors().

◆ DynamicEncodeFormat()

static int DynamicEncodeFormat ( uint32_t  f,
const void *  p,
void *  c,
int  t 
)
static

Definition at line 1663 of file sf_dynamic_plugins.c.

References Encode_Format().

Referenced by InitDynamicPreprocessors().

◆ DynamicEncodeNew()

static void* DynamicEncodeNew ( void  )
static

Definition at line 1643 of file sf_dynamic_plugins.c.

References Encode_New().

Referenced by InitDynamicPreprocessors().

◆ DynamicEncodeUpdate()

static void DynamicEncodeUpdate ( void *  p)
static

Definition at line 1668 of file sf_dynamic_plugins.c.

References Encode_Update().

Referenced by InitDynamicPreprocessors().

◆ DynamicEvalRTN()

int DynamicEvalRTN ( void *  rtn,
void *  p,
int  check_ports 
)

Definition at line 1811 of file sf_dynamic_plugins.c.

References fpEvalRTN().

Referenced by InitDynamicPreprocessors().

◆ DynamicForceDropPacket()

void DynamicForceDropPacket ( void *  p)

Definition at line 1728 of file sf_dynamic_plugins.c.

References Active_ForceDropPacket().

Referenced by InitDynamicPreprocessors().

◆ DynamicForceDropSession()

void DynamicForceDropSession ( void *  p)

Definition at line 1738 of file sf_dynamic_plugins.c.

References Active_ForceDropSession().

Referenced by InitDynamicPreprocessors().

◆ DynamicForceDropSessionAndReset()

void DynamicForceDropSessionAndReset ( void *  p)

Definition at line 1743 of file sf_dynamic_plugins.c.

References Active_ForceDropResetAction().

Referenced by InitDynamicPreprocessors().

◆ DynamicGetDefaultPolicy()

tSfPolicyId DynamicGetDefaultPolicy ( void  )

Definition at line 1608 of file sf_dynamic_plugins.c.

References getDefaultPolicy().

Referenced by InitDynamicPreprocessors().

◆ DynamicGetIpsInlineMode()

int DynamicGetIpsInlineMode ( void  )

Definition at line 1775 of file sf_dynamic_plugins.c.

References ScIpsInlineMode().

◆ DynamicGetIpsRuntimePolicy()

tSfPolicyId DynamicGetIpsRuntimePolicy ( void  )

Definition at line 1603 of file sf_dynamic_plugins.c.

References getIpsRuntimePolicy().

Referenced by InitDynamicPreprocessors().

◆ DynamicGetLogDirectory()

char* DynamicGetLogDirectory ( void  )

Definition at line 1816 of file sf_dynamic_plugins.c.

References _SnortConfig::log_dir, snort_conf, and SnortStrdup().

Referenced by InitDynamicPreprocessors().

◆ DynamicGetNapInlineMode()

int DynamicGetNapInlineMode ( void  )

Definition at line 1770 of file sf_dynamic_plugins.c.

References ScNapInlineMode().

◆ DynamicGetNapRuntimePolicy()

tSfPolicyId DynamicGetNapRuntimePolicy ( void  )

Definition at line 1598 of file sf_dynamic_plugins.c.

References getNapRuntimePolicy().

Referenced by InitDynamicPreprocessors().

◆ DynamicGetParserPolicy()

tSfPolicyId DynamicGetParserPolicy ( struct _SnortConfig sc)

Definition at line 1593 of file sf_dynamic_plugins.c.

References getParserPolicy().

Referenced by InitDynamicPreprocessors().

◆ DynamicGetPktTimeOfDay()

void DynamicGetPktTimeOfDay ( struct timeval *  tv)

Definition at line 1841 of file sf_dynamic_plugins.c.

References packet_gettimeofday().

Referenced by InitDynamicPreprocessors().

◆ DynamicGetPktTraceActionMsg()

static const char* DynamicGetPktTraceActionMsg ( )
static

Definition at line 1638 of file sf_dynamic_plugins.c.

References getPktTraceActMsg().

Referenced by InitDynamicPreprocessors().

◆ DynamicGetPolicyFromId()

tSfPolicyId DynamicGetPolicyFromId ( uint16_t  id)

◆ DynamicGetRuleClassById()

void* DynamicGetRuleClassById ( int  id)

Definition at line 1547 of file sf_dynamic_plugins.c.

References ClassTypeLookupById(), and snort_conf.

Referenced by InitDynamicPreprocessors().

◆ DynamicGetRuleClassByName()

void* DynamicGetRuleClassByName ( char *  name)

Definition at line 1542 of file sf_dynamic_plugins.c.

References ClassTypeLookupByType(), name, and snort_conf.

Referenced by InitDynamicPreprocessors().

◆ DynamicGetRuleData()

◆ DynamicGetSnortInstance()

uint32_t DynamicGetSnortInstance ( void  )

Definition at line 1821 of file sf_dynamic_plugins.c.

References _SnortConfig::event_log_id, and snort_conf.

Referenced by InitDynamicPreprocessors().

◆ DynamicGetSSLCallback()

void* DynamicGetSSLCallback ( void  )

Definition at line 2141 of file sf_dynamic_plugins.c.

References GetSSLCallback().

Referenced by InitDynamicPreprocessors().

◆ DynamicIP6Build()

void DynamicIP6Build ( void *  p,
const void *  hdr,
int  family 
)

Definition at line 1578 of file sf_dynamic_plugins.c.

References sfiph_build().

Referenced by InitDynamicPreprocessors().

◆ DynamicIP6SetCallbacks()

static __inline void DynamicIP6SetCallbacks ( void *  p,
int  family,
char  orig 
)
static

Definition at line 1583 of file sf_dynamic_plugins.c.

References set_callbacks().

Referenced by InitDynamicPreprocessors().

◆ DynamicIsPafEnabled()

signed char DynamicIsPafEnabled ( void  )

Definition at line 1826 of file sf_dynamic_plugins.c.

References ScPafEnabled().

Referenced by InitDynamicPreprocessors().

◆ DynamicIsReadMode()

signed char DynamicIsReadMode ( void  )

Definition at line 1831 of file sf_dynamic_plugins.c.

References ScReadMode().

Referenced by InitDynamicPreprocessors().

◆ DynamicIsSSLPolicyEnabled()

signed char DynamicIsSSLPolicyEnabled ( struct _SnortConfig sc)

◆ DynamicIsTestMode()

static signed char DynamicIsTestMode ( void  )
static

Definition at line 2585 of file sf_dynamic_plugins.c.

References ScTestMode().

Referenced by InitDynamicPreprocessors().

◆ DynamicNewGrinderPkt()

static void* DynamicNewGrinderPkt ( void *  p,
void *  phdr,
uint8_t pkt 
)
static

Definition at line 1653 of file sf_dynamic_plugins.c.

References NewGrinderPkt().

Referenced by InitDynamicPreprocessors().

◆ DynamicPktTime()

time_t DynamicPktTime ( void  )

Definition at line 1836 of file sf_dynamic_plugins.c.

References packet_time().

Referenced by InitDynamicPreprocessors().

◆ DynamicPreprocess()

int DynamicPreprocess ( void *  packet)

Definition at line 1568 of file sf_dynamic_plugins.c.

References Preprocess().

Referenced by InitDynamicPreprocessors().

◆ DynamicProfilingPreprocs()

int DynamicProfilingPreprocs ( void  )

Definition at line 1559 of file sf_dynamic_plugins.c.

Referenced by InitDynamicPreprocessors().

◆ DynamicReadyForProcess()

static __inline signed char DynamicReadyForProcess ( void *  pkt)
static

◆ DynamicReenablePreprocBitFunc()

static int DynamicReenablePreprocBitFunc ( struct _SnortConfig sc,
unsigned int  preproc_id 
)
static

Definition at line 1890 of file sf_dynamic_plugins.c.

References ReenablePreprocBit().

Referenced by InitDynamicPreprocessors().

◆ DynamicRegisterPreprocessorProfile()

void DynamicRegisterPreprocessorProfile ( const char *  keyword,
void *  stats,
int  layer,
void *  parent,
PreprocStatsNodeFreeFunc  freefn 
)

Definition at line 1552 of file sf_dynamic_plugins.c.

Referenced by InitDynamicPreprocessors().

◆ DynamicRetryPacket()

signed char DynamicRetryPacket ( void *  p)

Definition at line 1718 of file sf_dynamic_plugins.c.

References Active_DAQRetryPacket().

Referenced by InitDynamicPreprocessors().

◆ DynamicRuleDataAlloc()

static void* DynamicRuleDataAlloc ( size_t  size)
static

◆ DynamicRuleDataFree()

static void DynamicRuleDataFree ( void *  data)
static

◆ DynamicRuleDataFreeSession()

static void DynamicRuleDataFreeSession ( void *  data)
static

◆ DynamicSetAltDecode()

void DynamicSetAltDecode ( uint16_t  altLen)

Definition at line 1765 of file sf_dynamic_plugins.c.

References SetAltDecode().

Referenced by InitDynamicPreprocessors().

◆ DynamicSetFileDataPtr()

void DynamicSetFileDataPtr ( uint8_t ptr,
uint16_t  decode_size 
)

Definition at line 1754 of file sf_dynamic_plugins.c.

References setFileDataPtr().

Referenced by InitDynamicPreprocessors().

◆ DynamicSetIPRepUpdateCount()

static void DynamicSetIPRepUpdateCount ( uint8_t  count)
static

Definition at line 2595 of file sf_dynamic_plugins.c.

References count, and setIPRepUpdateCount().

Referenced by InitDynamicPreprocessors().

◆ DynamicSetParserPolicy()

void DynamicSetParserPolicy ( SnortConfig sc,
tSfPolicyId  id 
)

Definition at line 1749 of file sf_dynamic_plugins.c.

References setParserPolicy().

Referenced by InitDynamicPreprocessors().

◆ DynamicSetRuleData()

◆ DynamicSetSSLCallback()

void DynamicSetSSLCallback ( void *  p)

Definition at line 2136 of file sf_dynamic_plugins.c.

References SetSSLCallback().

Referenced by InitDynamicPreprocessors().

◆ DynamicSetSSLPolicyEnabled()

void DynamicSetSSLPolicyEnabled ( struct _SnortConfig sc,
tSfPolicyId  policy,
signed char  value 
)

◆ DynamicSnortEventqLog()

int DynamicSnortEventqLog ( void *  p)

Definition at line 1588 of file sf_dynamic_plugins.c.

References _SnortConfig::event_queue, snort_conf, and SnortEventqLog().

Referenced by InitDynamicPreprocessors().

◆ DynamicSnortIsStrEmpty()

int DynamicSnortIsStrEmpty ( const char *  s)

Definition at line 1880 of file sf_dynamic_plugins.c.

References IsEmptyStr().

Referenced by InitDynamicPreprocessors().

◆ DynamicSnortStrcasestr()

const char* DynamicSnortStrcasestr ( const char *  s,
int  slen,
const char *  accept 
)

Definition at line 1796 of file sf_dynamic_plugins.c.

References SnortStrcasestr().

Referenced by InitDynamicPreprocessors().

◆ DynamicSnortStrncpy()

int DynamicSnortStrncpy ( char *  dst,
const char *  src,
size_t  dst_size 
)

Definition at line 1801 of file sf_dynamic_plugins.c.

References SnortStrncpy().

Referenced by InitDynamicPreprocessors().

◆ DynamicSnortStrnPbrk()

const char* DynamicSnortStrnPbrk ( const char *  s,
int  slen,
const char *  accept 
)

Definition at line 1806 of file sf_dynamic_plugins.c.

References SnortStrnPbrk().

Referenced by InitDynamicPreprocessors().

◆ DynamicSnortStrnStr()

const char* DynamicSnortStrnStr ( const char *  s,
int  slen,
const char *  accept 
)

Definition at line 1790 of file sf_dynamic_plugins.c.

References SnortStrnStr().

Referenced by InitDynamicPreprocessors().

◆ DynamicSnortStrtol()

long DynamicSnortStrtol ( const char *  nptr,
char **  endptr,
int  base 
)

Definition at line 1780 of file sf_dynamic_plugins.c.

References SnortStrtol().

Referenced by InitDynamicPreprocessors().

◆ DynamicSnortStrtoul()

unsigned long DynamicSnortStrtoul ( const char *  nptr,
char **  endptr,
int  base 
)

Definition at line 1785 of file sf_dynamic_plugins.c.

References SnortStrtoul().

Referenced by InitDynamicPreprocessors().

◆ endSSLSSnLogData()

static void endSSLSSnLogData ( void *  ssnptr,
uint32_t  ssl_flow_messages,
uint64_t  ssl_flow_flags 
)
static

Definition at line 2119 of file sf_dynamic_plugins.c.

References endSSLSSnLogDataFnPtr.

Referenced by InitDynamicPreprocessors().

◆ ErrorMsgThrottled()

static void ErrorMsgThrottled ( void *  tinfo,
const char *  format,
  ... 
)
static

Definition at line 2600 of file sf_dynamic_plugins.c.

References ErrorMessageThrottled(), STD_BUF, and vsnprintf.

Referenced by InitDynamicPreprocessors().

◆ ftpGetDataSessionMode()

static signed char ftpGetDataSessionMode ( void *  ssnptr)
static

Definition at line 2180 of file sf_dynamic_plugins.c.

References ftpGetDataModefnptr.

Referenced by InitDynamicPreprocessors().

◆ geoIpAddressLookup()

static int geoIpAddressLookup ( const sfaddr_t snortIp,
uint16_t geo 
)
static

Definition at line 2053 of file sf_dynamic_plugins.c.

References geoIpAddressLookupFnPtr.

Referenced by InitDynamicPreprocessors().

◆ getAppId()

static int32_t getAppId ( void *  ssnptr)
static

Definition at line 1957 of file sf_dynamic_plugins.c.

References getAppIdFnPtr.

Referenced by InitDynamicPreprocessors().

◆ GetCurrentSnortConfig()

static SnortConfig* GetCurrentSnortConfig ( void  )
static

Definition at line 2590 of file sf_dynamic_plugins.c.

References snort_conf.

Referenced by InitDynamicPreprocessors().

◆ GetDetectionPluginMetaData()

DynamicPluginMeta* GetDetectionPluginMetaData ( void *  p)

Definition at line 3087 of file sf_dynamic_plugins.c.

References _DynamicDetectionPlugin::metaData.

Referenced by DisplayDynamicPluginVersions().

◆ GetEnginePluginMetaData()

DynamicPluginMeta* GetEnginePluginMetaData ( void *  p)

Definition at line 3097 of file sf_dynamic_plugins.c.

References _DynamicEnginePlugin::metaData.

Referenced by DisplayDynamicPluginVersions().

◆ getHttpBuffer()

static const uint8_t* getHttpBuffer ( HTTP_BUFFER  hb_type,
unsigned *  len 
)
static

◆ getIntfData()

static void getIntfData ( void *  ssnptr,
int32_t ingressIntfIndex,
int32_t egressIntfIndex,
int32_t ingressZoneIndex,
int32_t egressZoneIndex 
)
static

Definition at line 2065 of file sf_dynamic_plugins.c.

References getIntfDataFnPtr.

Referenced by InitDynamicPreprocessors().

◆ GetNextDetectionPluginVersion()

void* GetNextDetectionPluginVersion ( SnortConfig sc,
void *  p 
)

◆ GetNextEnginePluginVersion()

void* GetNextEnginePluginVersion ( void *  p)

Definition at line 3024 of file sf_dynamic_plugins.c.

References loadedEngines, _DynamicEnginePlugin::next, and NULL.

Referenced by DisplayDynamicPluginVersions().

◆ GetNextPreprocessorPluginVersion()

void* GetNextPreprocessorPluginVersion ( void *  p)

◆ GetPluginVersion()

void GetPluginVersion ( PluginHandle  handle,
DynamicPluginMeta meta 
)

◆ GetPreprocessorPluginMetaData()

DynamicPluginMeta* GetPreprocessorPluginMetaData ( void *  p)

Definition at line 3107 of file sf_dynamic_plugins.c.

References _DynamicPreprocessorPlugin::metaData.

Referenced by DisplayDynamicPluginVersions().

◆ GetSnortPacketDropPortion()

static double GetSnortPacketDropPortion ( )
static

Definition at line 2576 of file sf_dynamic_plugins.c.

References GetPacketDropPortion().

Referenced by InitDynamicPreprocessors().

◆ GetSnortPacketLatency()

static uint32_t GetSnortPacketLatency ( )
static

Definition at line 2567 of file sf_dynamic_plugins.c.

Referenced by InitDynamicPreprocessors().

◆ GetSnortPerfIndicators()

static int GetSnortPerfIndicators ( void *  p)
static

Definition at line 2562 of file sf_dynamic_plugins.c.

References PerfIndicator_GetIndicators().

Referenced by InitDynamicPreprocessors().

◆ getSSLActualAction()

static int getSSLActualAction ( void *  ssnptr,
uint16_t action 
)
static

Definition at line 2103 of file sf_dynamic_plugins.c.

References getSSLActualActionFnPtr.

Referenced by InitDynamicPreprocessors().

◆ getSymbol()

◆ InitDynamicDetectionPlugins()

◆ InitDynamicEnginePlugins()

◆ InitDynamicEngines()

int InitDynamicEngines ( char *  dynamic_rules_path)

Definition at line 1369 of file sf_dynamic_plugins.c.

References _DynamicEngineData::allocRuleData, _DynamicEngineData::altBuffer, _DynamicEngineData::altDetect, _DynamicEngineData::asn1Detect, _DynamicEngineData::dataDumpDirectory, DebugMessageFunc(), _DynamicEngineData::debugMsg, _DynamicEngineData::debugMsgFile, _DynamicEngineData::debugMsgLine, DecodeBuffer, _DynamicEngineData::decompress, _DynamicEngineData::decompressDestroy, _DynamicEngineData::decompressInit, DetectBuffer, _DynamicEngineData::DetectFlag_Disable, DynamicAsn1Detect(), DynamicDecompress(), DynamicDecompressDestroy(), DynamicDecompressInit(), DynamicDetectFlagDisable(), DynamicFlowbitCheck(), DynamicFlowbitRegister(), DynamicFlowbitUnregister(), DynamicGetAltDetect(), DynamicGetRuleData(), DynamicIsDetectFlag(), DynamicPreprocRuleOptInit(), DynamicRuleDataAlloc(), DynamicRuleDataFree(), DynamicSetAltDetect(), DynamicSetRuleData(), Dynamicsfbase64decode(), DynamicsfUnfold(), ENGINE_DATA_VERSION, _DynamicEngineData::errMsg, ErrorMessage(), FatalError(), _DynamicEngineData::fatalMsg, file_data_ptr, _DynamicEngineData::fileDataBuf, _DynamicEngineData::flowbitCheck, _DynamicEngineData::flowbitRegister, _DynamicEngineData::flowbitUnregister, _DynamicEngineData::freeRuleData, _DynamicEngineData::GetAltDetect, _DynamicEngineData::getHttpBuffer, getHttpBuffer(), _DynamicEngineData::getRuleData, InitDynamicEnginePlugins(), _DynamicEngineData::Is_DetectFlag, LogMessage(), _DynamicEngineData::logMsg, no_file, no_line, NULL, PcreCapture(), _DynamicEngineData::pcreCapture, _DynamicEngineData::pcreCompile, pcreCompile(), _DynamicEngineData::pcreExec, pcreExec(), _DynamicEngineData::pcreOvectorInfo, pcreOvectorInfo(), _DynamicEngineData::pcreStudy, pcreStudy(), _DynamicEngineData::preprocRuleOptInit, RegisterDynamicRule(), _DynamicEngineData::ruleRegister, _DynamicEngineData::SetAltDetect, _DynamicEngineData::setRuleData, _DynamicEngineData::sfbase64decode, _DynamicEngineData::sfUnfold, SnortStrdup(), and _DynamicEngineData::version.

Referenced by SnortInit().

◆ InitDynamicPreprocessorPlugins()

◆ InitDynamicPreprocessors()

int InitDynamicPreprocessors ( void  )

Definition at line 2613 of file sf_dynamic_plugins.c.

References _reputation_get_entry_count(), _reputation_process_external_ip(), _DynamicPreprocessorData::active_PacketWasDropped, _DynamicPreprocessorData::addDetect, AddDetection(), AddFuncToPeriodicCheckList(), _DynamicPreprocessorData::addFuncToPostConfigList, AddFuncToPostConfigList(), AddFuncToPreprocCleanExitList(), AddFuncToPreprocPostConfigList(), AddFuncToPreprocResetList(), AddFuncToPreprocResetStatsList(), AddMetaEval(), _DynamicPreprocessorData::addMetaEval, _DynamicPreprocessorData::addOutputModule, _DynamicPreprocessorData::addPeriodicCheck, _DynamicPreprocessorData::addPktTrace, _DynamicPreprocessorData::addPostConfigFunc, _DynamicPreprocessorData::addPreproc, _DynamicPreprocessorData::addPreprocAllPolicies, _DynamicPreprocessorData::addPreprocConfCheck, AddPreprocessor(), AddPreprocessorAllPolicies(), AddPreprocessorCheck(), _DynamicPreprocessorData::addPreprocExit, _DynamicPreprocessorData::addPreprocProfileFunc, _DynamicPreprocessorData::addPreprocReset, _DynamicPreprocessorData::addPreprocResetStats, AddProtocolReference(), _DynamicPreprocessorData::alertAdd, _DynamicPreprocessorData::altBuffer, _DynamicPreprocessorData::altDetect, appIdApi, _DynamicPreprocessorData::canWhitelist, _DynamicPreprocessorData::changeIpsRuntimePolicy, _DynamicPreprocessorData::changeNapRuntimePolicy, _DynamicPreprocessorData::checkValueInRange, CheckValueInRange(), CloseDynamicLibrary(), _DynamicPreprocessorData::closeDynamicLibrary, _DynamicPreprocessorData::config_file, _DynamicPreprocessorData::config_line, ControlSocketRegisterHandler(), _DynamicPreprocessorData::controlSocketRegisterHandler, DebugMessageFunc(), _DynamicPreprocessorData::debugMsg, _DynamicPreprocessorData::debugMsgFile, _DynamicPreprocessorData::debugMsgLine, DecodeBuffer, _DynamicPreprocessorData::deleteGrinderPkt, _DynamicPreprocessorData::detect, DetectBuffer, _DynamicPreprocessorData::DetectFlag_Disable, _DynamicPreprocessorData::DetectReset, _DynamicPreprocessorData::disableAllDetect, _DynamicPreprocessorData::disableAllPolicies, _DynamicPreprocessorData::disableDetect, _DynamicPreprocessorData::disablePacketAnalysis, _DynamicPreprocessorData::disablePreprocessors, DynamicActivePacketWasDropped(), DynamicAddPktTraceData(), DynamicCanWhitelist(), DynamicChangeIpsRuntimePolicy(), DynamicChangeNapRuntimePolicy(), DynamicDeleteGrinderPkt(), DynamicDetect(), DynamicDetectFlagDisable(), DynamicDetectResetPtr(), DynamicDisableAllDetection(), DynamicDisableAllPolicies(), DynamicDisableDetection(), DynamicDisablePacketAnalysis(), DynamicDisablePreprocessors(), DynamicDropPacket(), DynamicDropSessionAndReset(), DynamicEnableContentDetection(), DynamicEnablePreprocessor(), DynamicEncodeDelete(), DynamicEncodeFormat(), DynamicEncodeNew(), DynamicEncodeUpdate(), DynamicEvalRTN(), DynamicForceDropPacket(), DynamicForceDropSession(), DynamicForceDropSessionAndReset(), DynamicGetAltDetect(), DynamicGetDefaultPolicy(), DynamicGetIpsRuntimePolicy(), DynamicGetLogDirectory(), DynamicGetNapRuntimePolicy(), DynamicGetParserPolicy(), DynamicGetPktTimeOfDay(), DynamicGetPktTraceActionMsg(), DynamicGetPolicyFromId(), DynamicGetRuleClassById(), DynamicGetRuleClassByName(), DynamicGetSnortInstance(), DynamicGetSSLCallback(), DynamicIP6Build(), DynamicIP6SetCallbacks(), DynamicIsDetectFlag(), DynamicIsPafEnabled(), DynamicIsReadMode(), DynamicIsSSLPolicyEnabled(), DynamicIsTestMode(), DynamicNewGrinderPkt(), DynamicPktTime(), DynamicPreprocess(), DynamicProfilingPreprocs(), DynamicReadyForProcess(), DynamicReenablePreprocBitFunc(), DynamicRegisterPreprocessorProfile(), DynamicRetryPacket(), DynamicSetAltDecode(), DynamicSetAltDetect(), DynamicSetFileDataPtr(), _DynamicPreprocessorData::dynamicSetFlowId, DynamicSetIPRepUpdateCount(), DynamicSetParserPolicy(), DynamicSetSSLCallback(), DynamicSetSSLPolicyEnabled(), DynamicSnortEventqLog(), DynamicSnortIsStrEmpty(), DynamicSnortStrcasestr(), DynamicSnortStrncpy(), DynamicSnortStrnPbrk(), DynamicSnortStrnStr(), DynamicSnortStrtol(), DynamicSnortStrtoul(), _DynamicPreprocessorData::enableContentDetect, _DynamicPreprocessorData::enablePreprocessor, _DynamicPreprocessorData::encodeDelete, _DynamicPreprocessorData::encodeFormat, _DynamicPreprocessorData::encodeNew, _DynamicPreprocessorData::encodeUpdate, endSSLSSnLogData(), _DynamicPreprocessorData::endSSLSSnLogData, _DynamicPreprocessorData::errMsg, _DynamicPreprocessorData::errMsgThrottled, ErrorMessage(), ErrorMsgThrottled(), FatalError(), _DynamicPreprocessorData::fatalMsg, file_api, file_data_ptr, file_line, file_name, _DynamicPreprocessorData::fileAPI, _DynamicPreprocessorData::fileDataBuf, FindProtocolReference(), _DynamicPreprocessorData::fpEvalRTN, ftpGetDataSessionMode(), _DynamicPreprocessorData::ftpGetMode, GenerateSnortEvent(), _DynamicPreprocessorData::genSnortEvent, geoIpAddressLookup(), _DynamicPreprocessorData::geoIpAddressLookup, _DynamicPreprocessorData::GetAltDetect, getAppId(), _DynamicPreprocessorData::getAppId, GetCurrentSnortConfig(), _DynamicPreprocessorData::getCurrentSnortConfig, _DynamicPreprocessorData::getDefaultPolicy, getHttpBuffer(), _DynamicPreprocessorData::getHttpBuffer, _DynamicPreprocessorData::getHttpXffFields, GetHttpXffFields(), getIntfData(), _DynamicPreprocessorData::getIntfData, _DynamicPreprocessorData::getIpsRuntimePolicy, _DynamicPreprocessorData::getLogDirectory, _DynamicPreprocessorData::getNapRuntimePolicy, _DynamicPreprocessorData::getPacketDropPortion, _DynamicPreprocessorData::getPacketLatency, _DynamicPreprocessorData::getParserPolicy, _DynamicPreprocessorData::getPerfIndicators, _DynamicPreprocessorData::getPktTimeOfDay, _DynamicPreprocessorData::getPktTraceActionMsg, _DynamicPreprocessorData::getPolicyFromId, _DynamicPreprocessorData::getRuleInfoById, _DynamicPreprocessorData::getRuleInfoByName, _DynamicPreprocessorData::getSnortInstance, GetSnortPacketDropPortion(), GetSnortPacketLatency(), GetSnortPerfIndicators(), getSSLActualAction(), _DynamicPreprocessorData::getSSLActualAction, _DynamicPreprocessorData::getSSLCallback, getSymbol(), _DynamicPreprocessorData::getSymbol, IdleProcessingRegisterHandler(), InitDynamicPreprocessorPlugins(), _DynamicPreprocessorData::inlineDropPacket, _DynamicPreprocessorData::inlineDropSessionAndReset, _DynamicPreprocessorData::inlineForceDropPacket, _DynamicPreprocessorData::inlineForceDropSession, _DynamicPreprocessorData::inlineForceDropSessionAndReset, _DynamicPreprocessorData::inlineRetryPacket, _DynamicPreprocessorData::ip6Build, _DynamicPreprocessorData::ip6SetCallbacks, _DynamicPreprocessorData::Is_DetectFlag, IsAdaptiveConfigured(), IsAdaptiveConfiguredForSnortConfig(), _DynamicPreprocessorData::isPafEnabled, _DynamicPreprocessorData::isPreprocEnabled, IsPreprocEnabled(), _DynamicPreprocessorData::isReadMode, _DynamicPreprocessorData::isSSLPolicyEnabled, _DynamicPreprocessorData::isTestMode, LoadAllLibs(), _DynamicPreprocessorData::loadAllLibs, _DynamicPreprocessorData::logAlerts, LogMessage(), _DynamicPreprocessorData::logMsg, MAX_TRACE_LINE, mSplit(), mSplitFree(), _DynamicPreprocessorData::newGrinderPkt, no_file, no_line, NULL, _DynamicPreprocessorData::obApi, obApi, openDynamicLibrary(), _DynamicPreprocessorData::openDynamicLibrary, output_load_module(), pkt_trace_enabled, _DynamicPreprocessorData::pkt_tracer_enabled, _DynamicPreprocessorData::pktTime, _DynamicPreprocessorData::popAlerts, _DynamicPreprocessorData::portObjectCharPortArray, PortObjectCharPortArray(), _DynamicPreprocessorData::preprocess, PREPROCESSOR_DATA_VERSION, _DynamicPreprocessorData::preprocOptByteOrderKeyword, _DynamicPreprocessorData::preprocOptOverrideKeyword, _DynamicPreprocessorData::preprocOptRegister, _DynamicPreprocessorData::printfappend, _DynamicPreprocessorData::profilingPreprocsFunc, _DynamicPreprocessorData::pushAlerts, _DynamicPreprocessorData::readyForProcess, _DynamicPreprocessorData::reenablePreprocBit, registerEndSSLSSnLogData(), _DynamicPreprocessorData::registerEndSSLSSnLogData, registerFtpModeQuery(), _DynamicPreprocessorData::registerFtpmodeQuery, registerGeoIpAddressLookup(), _DynamicPreprocessorData::registerGeoIpAddressLookup, registerGetAppId(), _DynamicPreprocessorData::registerGetAppId, registerGetIntfData(), _DynamicPreprocessorData::registerGetIntfData, registerGetSSLActualAction(), _DynamicPreprocessorData::registerGetSSLActualAction, _DynamicPreprocessorData::registerIdleHandler, _DynamicPreprocessorData::registerMemoryStatsFunc, RegisterMemoryStatsFunction(), _DynamicPreprocessorData::registerPreproc, RegisterPreprocessor(), RegisterPreprocessorRuleOption(), RegisterPreprocessorRuleOptionByteOrder(), RegisterPreprocessorRuleOptionOverride(), _DynamicPreprocessorData::registerPreprocStats, RegisterPreprocStats(), registerReputationGetEntryCount(), _DynamicPreprocessorData::registerReputationGetEntryCount, registerReputationProcessExternal(), _DynamicPreprocessorData::registerReputationProcessExternal, registerSetTlsHostAppId(), _DynamicPreprocessorData::registerSetTlsHostAppId, registerSslAppIdLookup(), _DynamicPreprocessorData::registerSslAppIdLookup, registerUpdateSSLSSnLogData(), _DynamicPreprocessorData::registerUpdateSSLSSnLogData, registerUrlQuery(), _DynamicPreprocessorData::registerUrlQuery, registerUserGroupIdGet(), _DynamicPreprocessorData::registerUserGroupIdGet, _DynamicPreprocessorData::reputation_get_entry_count, _DynamicPreprocessorData::reputation_process_external_ip, _DynamicPreprocessorData::resetAlerts, search_api, _DynamicPreprocessorData::searchAPI, session_api, _DynamicPreprocessorData::sessionAPI, _DynamicPreprocessorData::SetAltDecode, _DynamicPreprocessorData::SetAltDetect, _DynamicPreprocessorData::setFileDataPtr, setFlowId(), SetHttpBuffer(), _DynamicPreprocessorData::setHttpBuffer, _DynamicPreprocessorData::setIPRepUpdateCount, _DynamicPreprocessorData::setParserPolicy, _DynamicPreprocessorData::setSSLCallback, _DynamicPreprocessorData::setSSLPolicyEnabled, setTlsHostAppId(), _DynamicPreprocessorData::setTlsHostAppId, sfsnprintfappend(), sfthreshold_test(), _DynamicPreprocessorData::size, _DynamicPreprocessorData::snort_conf_dir, snort_conf_dir, _DynamicPreprocessorData::snortAlloc, SnortEventqAdd(), SnortEventqPop(), SnortEventqPush(), SnortEventqReset(), _DynamicPreprocessorData::snortFree, _DynamicPreprocessorData::SnortIsStrEmpty, SnortPreprocAlloc(), SnortPreprocFree(), _DynamicPreprocessorData::SnortStrcasestr, _DynamicPreprocessorData::SnortStrncpy, _DynamicPreprocessorData::SnortStrnPbrk, _DynamicPreprocessorData::SnortStrnStr, _DynamicPreprocessorData::SnortStrtol, _DynamicPreprocessorData::SnortStrtoul, sslAppIdLookup(), _DynamicPreprocessorData::sslAppIdLookup, stream_api, _DynamicPreprocessorData::streamAPI, _DynamicPreprocessorData::thresholdCheck, _DynamicPreprocessorData::tokenFree, _DynamicPreprocessorData::tokenSplit, _DynamicPreprocessorData::totalPerfStats, _DynamicPreprocessorData::trace, trace_line, _DynamicPreprocessorData::traceMax, updateSSLSSnLogData(), _DynamicPreprocessorData::updateSSLSSnLogData, urlQueryCreate(), _DynamicPreprocessorData::urlQueryCreate, urlQueryDestroy(), _DynamicPreprocessorData::urlQueryDestroy, urlQueryMatch(), _DynamicPreprocessorData::urlQueryMatch, userGroupIdGet(), _DynamicPreprocessorData::userGroupIdGet, and _DynamicPreprocessorData::version.

Referenced by SnortInit().

◆ LoadAllDynamicDetectionLibs()

void LoadAllDynamicDetectionLibs ( SnortConfig sc,
const char *const  path 
)

Definition at line 777 of file sf_dynamic_plugins.c.

References LoadAllLibs(), LoadDynamicDetectionLib(), and LogMessage().

Referenced by LoadDynamicPlugins().

◆ LoadAllDynamicEngineLibs()

void LoadAllDynamicEngineLibs ( SnortConfig sc,
const char *const  path 
)

Definition at line 571 of file sf_dynamic_plugins.c.

References LoadAllLibs(), LoadDynamicEngineLib(), and LogMessage().

Referenced by LoadDynamicPlugins().

◆ LoadAllDynamicPreprocessors()

void LoadAllDynamicPreprocessors ( SnortConfig sc,
const char *const  path 
)

Definition at line 3003 of file sf_dynamic_plugins.c.

References LoadAllLibs(), LoadDynamicPreprocessor(), and LogMessage().

Referenced by LoadDynamicPlugins().

◆ LoadAllLibs()

◆ LoadDynamicDetectionLib()

◆ LoadDynamicEngineLib()

◆ LoadDynamicPreprocessor()

◆ openDynamicLibrary()

PluginHandle openDynamicLibrary ( const char *const  library_name,
int  useGlobal 
)

◆ pcreCompile()

void* pcreCompile ( const char *  pattern,
int  options,
const char **  errptr,
int erroffset,
const unsigned char *  tableptr 
)

Definition at line 1252 of file sf_dynamic_plugins.c.

References pcre_compile(), and SNORT_PCRE_OVERRIDE_MATCH_LIMIT.

Referenced by ConvertPcreOption(), and InitDynamicEngines().

◆ pcreExec()

int pcreExec ( const void *  code,
const void *  extra,
const char *  subj,
int  len,
int  start,
int  options,
int ovec,
int  ovecsize 
)

Definition at line 1330 of file sf_dynamic_plugins.c.

References pcre_exec(), and start.

Referenced by InitDynamicEngines().

◆ pcreOvectorInfo()

void pcreOvectorInfo ( int **  ovector,
int ovector_size 
)

◆ pcreStudy()

◆ registerEndSSLSSnLogData()

static void registerEndSSLSSnLogData ( EndSSLSSnLogDataFunc  fn)
static

Definition at line 2114 of file sf_dynamic_plugins.c.

References endSSLSSnLogDataFnPtr.

Referenced by InitDynamicPreprocessors().

◆ registerFtpModeQuery()

void registerFtpModeQuery ( ftpGetModefunc  fnptr)

Definition at line 2174 of file sf_dynamic_plugins.c.

References ftpGetDataModefnptr.

Referenced by InitDynamicPreprocessors().

◆ registerGeoIpAddressLookup()

static void registerGeoIpAddressLookup ( GeoIpAddressLookupFunc  fn)
static

Definition at line 2049 of file sf_dynamic_plugins.c.

References geoIpAddressLookupFnPtr.

Referenced by InitDynamicPreprocessors().

◆ registerGetAppId()

static void registerGetAppId ( GetAppIdFunc  fnptr)
static

Definition at line 1952 of file sf_dynamic_plugins.c.

References getAppIdFnPtr.

Referenced by InitDynamicPreprocessors().

◆ registerGetIntfData()

static void registerGetIntfData ( GetIntfDataFunc  fn)
static

Definition at line 2060 of file sf_dynamic_plugins.c.

References getIntfDataFnPtr.

Referenced by InitDynamicPreprocessors().

◆ registerGetSSLActualAction()

static void registerGetSSLActualAction ( GetSSLActualActionFunc  fn)
static

Definition at line 2098 of file sf_dynamic_plugins.c.

References getSSLActualActionFnPtr.

Referenced by InitDynamicPreprocessors().

◆ registerReputationGetEntryCount()

void registerReputationGetEntryCount ( ReputationGetEntryCountFunc  entryCountFn)

Definition at line 1977 of file sf_dynamic_plugins.c.

References reputatinGetEntryCountFnPtr.

Referenced by InitDynamicPreprocessors().

◆ registerReputationProcessExternal()

void registerReputationProcessExternal ( ReputationProcessExternalIpFunc  extProcessFn)

Definition at line 1982 of file sf_dynamic_plugins.c.

References reputationProcessExternalIpFnPtr.

Referenced by InitDynamicPreprocessors().

◆ registerSetTlsHostAppId()

static void registerSetTlsHostAppId ( SetTlsHostAppIdFunc  fnptr)
static

Definition at line 1937 of file sf_dynamic_plugins.c.

References setTlsHostAppIdFnPtr.

Referenced by InitDynamicPreprocessors().

◆ registerSslAppIdLookup()

static void registerSslAppIdLookup ( SslAppIdLookupFunc  fnptr)
static

Definition at line 1923 of file sf_dynamic_plugins.c.

References sslAppIdLookupFnPtr.

Referenced by InitDynamicPreprocessors().

◆ registerUpdateSSLSSnLogData()

static void registerUpdateSSLSSnLogData ( UpdateSSLSSnLogDataFunc  fn)
static

Definition at line 2074 of file sf_dynamic_plugins.c.

References updateSSLSSnLogDataFnPtr.

Referenced by InitDynamicPreprocessors().

◆ registerUrlQuery()

void registerUrlQuery ( UrlQueryCreateFunc  createFn,
UrlQueryDestroyFunc  destroyFn,
UrlQueryMatchFunc  matchFn 
)

◆ registerUserGroupIdGet()

static void registerUserGroupIdGet ( UserGroupIdGetFunc  userIdFn)
static

Definition at line 2037 of file sf_dynamic_plugins.c.

References userGroupIdGetFnPtr.

Referenced by InitDynamicPreprocessors().

◆ RemoveDetectionPlugin()

◆ RemoveDuplicateDetectionPlugins()

◆ RemoveDuplicateEngines()

◆ RemoveDuplicatePreprocessorPlugins()

◆ RemoveEnginePlugin()

◆ RemovePreprocessorPlugin()

◆ setFlowId()

static int setFlowId ( const void *  p,
uint32_t  id 
)
static

Definition at line 1336 of file sf_dynamic_plugins.c.

References DAQ_ModifyFlowOpaque().

Referenced by InitDynamicPreprocessors().

◆ setTlsHostAppId()

static void setTlsHostAppId ( void *  ssnptr,
const char *  serverName,
const char *  commonName,
const char *  orgName,
const char *  subjectAltName,
signed char  isSniMismatch,
int32_t serviceAppId,
int32_t clientAppId,
int32_t payloadAppId 
)
static

Definition at line 1942 of file sf_dynamic_plugins.c.

References setTlsHostAppIdFnPtr.

Referenced by InitDynamicPreprocessors().

◆ SoRuleMemInUse()

static size_t SoRuleMemInUse ( )
static

Definition at line 1076 of file sf_dynamic_plugins.c.

References so_rule_memory.

Referenced by InitDynamicPreprocessorPlugins().

◆ sslAppIdLookup()

static int sslAppIdLookup ( void *  ssnptr,
const char *  serverName,
const char *  commonName,
int32_t serviceAppId,
int32_t clientAppId,
int32_t payloadAppId 
)
static

Definition at line 1928 of file sf_dynamic_plugins.c.

References sslAppIdLookupFnPtr.

Referenced by InitDynamicPreprocessors().

◆ updateSSLSSnLogData()

static void updateSSLSSnLogData ( void *  ssnptr,
uint8_t  logging_on,
uint8_t  action_is_block,
const char *  ssl_cert_fingerprint,
uint32_t  ssl_cert_fingerprint_len,
uint32_t  ssl_cert_status,
uint8_t ssl_policy_id,
uint32_t  ssl_policy_id_len,
uint32_t  ssl_rule_id,
uint16_t  ssl_cipher_suite,
uint8_t  ssl_version,
uint16_t  ssl_actual_action,
uint16_t  ssl_expected_action,
uint32_t  ssl_url_category,
uint16_t  ssl_flow_status,
uint32_t  ssl_flow_error,
uint32_t  ssl_flow_messages,
uint64_t  ssl_flow_flags,
char *  ssl_server_name,
uint8_t ssl_session_id,
uint8_t  session_id_len,
uint8_t ssl_ticket_id,
uint8_t  ticket_id_len 
)
static

Definition at line 2079 of file sf_dynamic_plugins.c.

References updateSSLSSnLogDataFnPtr.

Referenced by InitDynamicPreprocessors().

◆ urlQueryCreate()

static struct urlQueryContext* urlQueryCreate ( const char *  url)
static

Definition at line 2009 of file sf_dynamic_plugins.c.

References NULL, and urlQueryCreateFnPtr.

Referenced by InitDynamicPreprocessors().

◆ urlQueryDestroy()

static void urlQueryDestroy ( struct urlQueryContext *  context)
static

Definition at line 2018 of file sf_dynamic_plugins.c.

References urlQueryDestroyFnPtr.

Referenced by InitDynamicPreprocessors().

◆ urlQueryMatch()

static int urlQueryMatch ( void *  ssnptr,
struct urlQueryContext *  context,
uint16_t  inUrlCat,
uint16_t  inUrlMinRep,
uint16_t  inUrlMaxRep 
)
static

Definition at line 2023 of file sf_dynamic_plugins.c.

References urlQueryMatchFnPtr.

Referenced by InitDynamicPreprocessors().

◆ userGroupIdGet()

static int userGroupIdGet ( void *  ssnptr,
uint32_t userId,
uint32_t realmId,
unsigned *  groupIdArray,
unsigned  groupIdArrayLen 
)
static

Definition at line 2042 of file sf_dynamic_plugins.c.

References userGroupIdGetFnPtr.

Referenced by InitDynamicPreprocessors().

◆ ValidateDynamicEngines()

◆ VerifyDetectionPluginRequirements()

◆ VerifySharedLibUniqueness()

void VerifySharedLibUniqueness ( )

Variable Documentation

◆ endSSLSSnLogDataFnPtr

EndSSLSSnLogDataFunc endSSLSSnLogDataFnPtr
static

Definition at line 1971 of file sf_dynamic_plugins.c.

Referenced by endSSLSSnLogData(), and registerEndSSLSSnLogData().

◆ error_throttleInfo

ThrottleInfo error_throttleInfo = {0,60,0}
static

Definition at line 1081 of file sf_dynamic_plugins.c.

Referenced by DynamicRuleDataAlloc().

◆ ftpGetDataModefnptr

ftpGetModefunc ftpGetDataModefnptr
static

Definition at line 2173 of file sf_dynamic_plugins.c.

Referenced by ftpGetDataSessionMode(), and registerFtpModeQuery().

◆ geoIpAddressLookupFnPtr

GeoIpAddressLookupFunc geoIpAddressLookupFnPtr
static

Definition at line 1969 of file sf_dynamic_plugins.c.

Referenced by geoIpAddressLookup(), and registerGeoIpAddressLookup().

◆ getAppIdFnPtr

GetAppIdFunc getAppIdFnPtr = 0
static

Definition at line 1950 of file sf_dynamic_plugins.c.

Referenced by getAppId(), and registerGetAppId().

◆ getIntfDataFnPtr

GetIntfDataFunc getIntfDataFnPtr
static

Definition at line 1973 of file sf_dynamic_plugins.c.

Referenced by getIntfData(), and registerGetIntfData().

◆ getSSLActualActionFnPtr

GetSSLActualActionFunc getSSLActualActionFnPtr
static

Definition at line 1972 of file sf_dynamic_plugins.c.

Referenced by getSSLActualAction(), and registerGetSSLActualAction().

◆ loadedEngines

◆ loadedPreprocessorPlugins

◆ no_file

char* no_file = "unknown"

Definition at line 127 of file sf_dynamic_plugins.c.

Referenced by InitDynamicEngines(), and InitDynamicPreprocessors().

◆ no_line

int no_line = 0

Definition at line 128 of file sf_dynamic_plugins.c.

Referenced by InitDynamicEngines(), and InitDynamicPreprocessors().

◆ reputatinGetEntryCountFnPtr

ReputationGetEntryCountFunc reputatinGetEntryCountFnPtr
static

◆ reputationProcessExternalIpFnPtr

ReputationProcessExternalIpFunc reputationProcessExternalIpFnPtr
static

◆ setTlsHostAppIdFnPtr

SetTlsHostAppIdFunc setTlsHostAppIdFnPtr
static

Definition at line 1935 of file sf_dynamic_plugins.c.

Referenced by registerSetTlsHostAppId(), and setTlsHostAppId().

◆ so_rule_memory

uint32_t so_rule_memory = 0
static

◆ sslAppIdLookupFnPtr

SslAppIdLookupFunc sslAppIdLookupFnPtr
static

Definition at line 1921 of file sf_dynamic_plugins.c.

Referenced by registerSslAppIdLookup(), and sslAppIdLookup().

◆ updateSSLSSnLogDataFnPtr

UpdateSSLSSnLogDataFunc updateSSLSSnLogDataFnPtr
static

Definition at line 1970 of file sf_dynamic_plugins.c.

Referenced by registerUpdateSSLSSnLogData(), and updateSSLSSnLogData().

◆ urlQueryCreateFnPtr

UrlQueryCreateFunc urlQueryCreateFnPtr
static

Definition at line 1965 of file sf_dynamic_plugins.c.

Referenced by registerUrlQuery(), and urlQueryCreate().

◆ urlQueryDestroyFnPtr

UrlQueryDestroyFunc urlQueryDestroyFnPtr
static

Definition at line 1966 of file sf_dynamic_plugins.c.

Referenced by registerUrlQuery(), and urlQueryDestroy().

◆ urlQueryMatchFnPtr

UrlQueryMatchFunc urlQueryMatchFnPtr
static

Definition at line 1967 of file sf_dynamic_plugins.c.

Referenced by registerUrlQuery(), and urlQueryMatch().

◆ userGroupIdGetFnPtr

UserGroupIdGetFunc userGroupIdGetFnPtr
static

Definition at line 1968 of file sf_dynamic_plugins.c.

Referenced by registerUserGroupIdGet(), and userGroupIdGet().