#include "rules.h"
#include "decode.h"
#include <stdio.h>
Go to the source code of this file.
Defines | |
#define | ONE_CHECK(_onevar, xxx) |
Functions | |
void | ParseRulesFile (char *, int) |
int | ContinuationCheck (char *) |
void | ParseRule (FILE *, char *, int) |
void | ParsePreprocessor (char *) |
void | ParseOutputPlugin (char *) |
void | ParseRuleOptions (char *, int, int) |
void | ParseMessage (char *) |
void | ParseLogto (char *) |
void | DumpRuleChains () |
VarEntry * | VarDefine (char *, char *) |
void | VarDelete (char *) |
void | IntegrityCheckRules () |
void | ParseListFile (char *, char *) |
void | LinkDynamicRules () |
void | ParseActivatedBy (char *) |
void | ParseActivates (char *) |
void | ParseCount (char *) |
char * | VarSearch (char *name) |
void | CreateDefaultRules () |
void | OrderRuleLists (char *) |
void | printRuleOrder () |
int | CheckRule (char *) |
int | RuleType (char *) |
int | WhichProto (char *) |
int | ParsePort (char *, u_short *, u_short *, char *, int *) |
int | ConvPort (char *, char *) |
char * | VarGet (char *) |
char * | ExpandVars (char *) |
char * | CreateRule (char *, char *, char *) |
VarEntry * | VarAlloc () |
ListHead * | CreateRuleType (char *, int, int, ListHead *) |
void | ProcessAlertFileOption (char *) |
char * | ProcessFileOption (char *) |
void | ParseConfig (char *) |
void | ParseRuleTypeDeclaration (FILE *, char *) |
char * | ReadLine (FILE *) |
int | checkKeyowrd (char *) |
Variables | |
char * | file_name |
int | file_line |
|
Value: (_onevar)++; \ if ((_onevar) > 1) \ { \ FatalError("%s(%d) => Only one '%s' option per rule\n",\ file_name, file_line, xxx); \ } Definition at line 35 of file parser.h. Referenced by ParseRuleOptions(). |
|
|
|
Definition at line 370 of file parser.c. References index. Referenced by ParseRule(). |
|
Definition at line 342 of file parser.c. References DEBUG_CONFIGRULES, and DEBUG_WRAP. Referenced by ParseRulesFile(). |
|
Definition at line 2445 of file parser.c. References FatalError(), file_line, file_name, and NULL. Referenced by ParsePort(). |
|
Definition at line 1235 of file detect.c. References CreateRuleType(), RULE_ACTIVATE, RULE_ALERT, RULE_DROP, RULE_DYNAMIC, RULE_LOG, RULE_PASS, RULE_REINJECT, RULE_REJECT, RULE_REJECTBOTH, RULE_REJECTDST, RULE_REJECTSRC, and RULE_SDROP. Referenced by SnortMain(). |
|
|
|
Definition at line 1274 of file detect.c. References _ListHead::AlertList, _RuleListNode::evalIndex, _ListHead::IcmpList, _ListHead::IpList, _ListHead::LogList, _RuleListNode::mode, _RuleListNode::name, _RuleListNode::next, NULL, _progvars::num_rule_types, pv, _RuleListNode::RuleList, _ListHead::ruleListNode, _RuleListNode::rval, _ListHead::TcpList, and _ListHead::UdpList. Referenced by CreateDefaultRules(), and ParseRuleTypeDeclaration(). |
|
Definition at line 430 of file parser.c. References DumpChain(), _ListHead::IcmpList, _ListHead::IpList, _RuleListNode::name, _RuleListNode::next, NULL, _RuleListNode::RuleList, _ListHead::TcpList, and _ListHead::UdpList. Referenced by ParseRulesFile(). |
|
Definition at line 3015 of file parser.c. References bzero, DEBUG_CONFIGRULES, DEBUG_WRAP, ErrorMessage(), FatalError(), file_line, file_name, NULL, PARSERULE_SIZE, and VarGet(). Referenced by ParseRule(). |
|
Definition at line 446 of file parser.c. References DEBUG_CONFIGRULES, DEBUG_WRAP, _ListHead::IcmpList, IntegrityCheck(), _ListHead::IpList, _RuleListNode::name, _RuleListNode::next, NULL, pv, _progvars::quiet_flag, _RuleListNode::RuleList, _ListHead::TcpList, and _ListHead::UdpList. Referenced by ParseRulesFile(). |
|
Definition at line 3165 of file parser.c. References _ListHead::IcmpList, SetLinks(), _ListHead::TcpList, and _ListHead::UdpList. Referenced by ParseRulesFile(). |
|
Definition at line 1350 of file detect.c. References addNodeToOrderedList(), FatalError(), LogMessage(), mSplit(), mSplitFree(), _RuleListNode::name, _RuleListNode::next, and NULL. Referenced by ParseConfig(), and SnortMain(). |
|
Definition at line 2670 of file parser.c. References _RuleTreeNode::activate_list, _OptTreeNode::activated_by, _ActivateList::activated_by, errno, FatalError(), _ActivateList::next, and NULL. Referenced by ParseRuleOptions(). |
|
Definition at line 2642 of file parser.c. References _OptTreeNode::activates. Referenced by ParseRuleOptions(). |
|
|
Definition at line 2719 of file parser.c. References _OptTreeNode::activation_counter, DEBUG_CONFIGRULES, and DEBUG_WRAP. Referenced by ParseRuleOptions(). |
|
|
|
Definition at line 2596 of file parser.c. References bzero, index, _OptTreeNode::logto, and NULL. Referenced by ParseRuleOptions(). |
|
Definition at line 2510 of file parser.c. References DEBUG_CONFIGRULES, DEBUG_WRAP, ErrorMessage(), file_line, file_name, index, _SigInfo::message, NULL, and _OptTreeNode::sigInfo. Referenced by ParseRuleOptions(). |
|
Definition at line 1512 of file parser.c. References _progvars::alert_cmd_override, ErrorMessage(), FatalError(), file_line, file_name, _OutputKeywordNode::func, GetOutputPlugin(), _progvars::log_cmd_override, mSplit(), mSplitFree(), _OutputKeywordNode::node_type, NT_OUTPUT_ALERT, NT_OUTPUT_LOG, NT_OUTPUT_SPECIAL, NULL, and pv. Referenced by ParseRule(), and ParseRuleTypeDeclaration(). |
|
Definition at line 2343 of file parser.c. References ConvPort(), FatalError(), file_line, file_name, index, mSplit(), mSplitFree(), NULL, strcasecmp, and VarGet(). Referenced by ParsePortList(), ParseRule(), and ScanParseIp(). |
|
Definition at line 1445 of file parser.c. References DEBUG_CONFIGRULES, DEBUG_WRAP, _PreprocessKeywordList::entry, FatalError(), _PreprocessKeywordNode::func, _PreprocessKeywordNode::keyword, mSplit(), mSplitFree(), _PreprocessKeywordList::next, NULL, and strcasecmp. Referenced by ParseRule(). |
|
|
|
Definition at line 151 of file parser.c. References bzero, _progvars::config_dir, ContinuationCheck(), DEBUG_CONFIGRULES, DEBUG_WRAP, DumpRuleChains(), dynamic_rules_present, errno, FatalError(), file_line, file_name, head_count, index, IntegrityCheckRules(), LinkDynamicRules(), LogMessage(), MAX_LINE_LENGTH, NULL, opt_count, ParseRule(), PARSERULE_SIZE, pv, _progvars::quiet_flag, rule_count, strlcat(), and strlcpy. Referenced by ParseRule(), and SnortMain(). |
|
Definition at line 4293 of file parser.c. References checkKeyword(), CreateRuleType(), DEBUG_CONFIGRULES, DEBUG_WRAP, FatalError(), file_line, file_name, mSplit(), mSplitFree(), NULL, _progvars::num_rule_types, ParseOutputPlugin(), pv, ReadLine(), RULE_ACTIVATE, RULE_ALERT, RULE_DYNAMIC, RULE_LOG, RULE_OUTPUT, RULE_PASS, RuleType(), and strcasecmp. Referenced by ParseRule(). |
|
Definition at line 1255 of file detect.c. References printRuleListOrder(). Referenced by SnortMain(). |
|
Definition at line 3280 of file parser.c. References _progvars::alert_filename, DEBUG_CONFIGRULES, DEBUG_WRAP, ProcessFileOption(), and pv. Referenced by ParseConfig(). |
|
Definition at line 3289 of file parser.c. References buffer, DEBUG_CONFIGRULES, DEBUG_WRAP, FatalError(), _progvars::log_dir, NULL, pv, _progvars::quiet_flag, STD_BUF, strlcat(), strlcpy, and strstr(). Referenced by AlertCSVParseArgs(), ParseAlertFastArgs(), ParseAlertFullArgs(), and ProcessAlertFileOption(). |
|
Definition at line 4393 of file parser.c. References bzero, file_line, file_name, index, LogMessage(), MAX_LINE_LENGTH, and NULL. Referenced by ParseRuleTypeDeclaration(). |
|
Definition at line 2030 of file parser.c. References FatalError(), file_line, file_name, NULL, RULE_ACTIVATE, RULE_ALERT, RULE_CONFIG, RULE_DECLARE, RULE_DROP, RULE_DYNAMIC, RULE_INCLUDE, RULE_LOG, RULE_OUTPUT, RULE_PASS, RULE_PREPROCESS, RULE_REINJECT, RULE_REJECT, RULE_REJECTBOTH, RULE_REJECTDST, RULE_REJECTSRC, RULE_SDROP, RULE_SUPPRESS, RULE_THRESHOLD, RULE_UNKNOWN, RULE_VAR, and strcasecmp. Referenced by checkKeyword(), ParseRule(), and ParseRuleTypeDeclaration(). |
|
Definition at line 2840 of file parser.c. References FatalError(), and NULL. Referenced by VarDefine(). |
|
Definition at line 2864 of file parser.c. References FatalError(), file_line, file_name, VarEntry::flags, VarEntry::name, VarEntry::next, NULL, VarEntry::prev, strcasecmp, VarEntry::value, VAR_STATIC, and VarAlloc(). Referenced by DefineIfaceVar(), ParseCmdLine(), and ParseRule(). |
|
Definition at line 2929 of file parser.c. References VarEntry::name, VarEntry::next, NULL, VarEntry::prev, strcasecmp, and VarEntry::value. |
|
Definition at line 2978 of file parser.c. References FatalError(), file_line, file_name, VarEntry::name, VarEntry::next, NULL, strcasecmp, and VarEntry::value. Referenced by ExpandVars(), IpAddrSetParse(), ParsePort(), ParseRule(), ParseSyslogArgs(), PortscanIgnoreParseIP(), PortscanParseIP(), ProcessIP(), ScanParseIp(), and ScanParsePort(). |
|
Definition at line 4431 of file parser.c. References VarEntry::name, VarEntry::next, NULL, strcasecmp, and VarEntry::value. |
|
Definition at line 2117 of file parser.c. References ETHERNET_TYPE_ARP, ETHERNET_TYPE_IP, FatalError(), file_line, file_name, and strcasecmp. Referenced by ParsePortList(), and ParseRule(). |
|
|
|
|