};
if eof {
- // If needed, handled EOF, or pass it into the parser.
+ // If needed, handle EOF, or pass it into the parser.
return AppLayerResult::ok();
}
output.write(line)
open(filename, "w").write(output.getvalue())
-def detect_patch_detect_enginer_register_c(protoname, buffername):
+def detect_patch_detect_engine_register_c(protoname, buffername):
filename = "src/detect-engine-register.c"
print("Patching %s." % (filename))
output = io.StringIO()
output.write(line)
open(filename, "w").write(output.getvalue())
-def detect_patch_detect_enginer_register_h(protoname, buffername):
+def detect_patch_detect_engine_register_h(protoname, buffername):
filename = "src/detect-engine-register.h"
print("Patching %s." % (filename))
output = io.StringIO()
patching src/app-layer-template.[ch] then linking the new files into
the build system.
-By default both the parser and logger will be generate. To generate
+By default both the parser and logger will be generated. To generate
just one or the other use the --parser or --logger command line flags.
Examples:
raise SetupError("no app-layer parser exists for %s" % (proto))
detect_copy_templates(proto, args.buffer, args.rust)
detect_patch_makefile_am(proto, args.buffer)
- detect_patch_detect_enginer_register_c(proto, args.buffer)
- detect_patch_detect_enginer_register_h(proto, args.buffer)
+ detect_patch_detect_engine_register_c(proto, args.buffer)
+ detect_patch_detect_engine_register_h(proto, args.buffer)
if parser:
if args.rust:
print("""
-An application detector and parser for the protocol %(proto)s has
+An application detector and parser for the protocol %(proto)s have
now been setup in the files:
rust/src/applayer%(proto_lower)s/mod.rs
})
else:
print("""
-An application detector and parser for the protocol %(proto)s has
+An application detector and parser for the protocol %(proto)s have
now been setup in the files:
src/app-layer-%(proto_lower)s.h
* \author FirstName LastName <yourname@domain>
*
* TemplateRust application layer detector and parser for learning and
- * templaterust pruposes.
+ * templaterust purposes.
*
* This templaterust implements a simple application layer for something
* like the echo protocol running on port 7.
* \author FirstName LastName <yourname@domain>
*
* Template application layer detector and parser for learning and
- * template pruposes.
+ * template purposes.
*
* This template implements a simple application layer for something
* like the echo protocol running on port 7.
*
* But note that if a "protocol data unit" is not received in one
* chunk of data, and the buffering is done on the transaction, we
- * may need to look for the transaction that this newly recieved
+ * may need to look for the transaction that this newly received
* data belongs to.
*/
TemplateTransaction *tx = TemplateTxAlloc(state);
* considered complete.
*
* For the response to be considered done, the response for a request
- * needs to be seen. The response_done flag is set on response for
+ * needs to be seen. The response_done flag is set on response for
* checking here.
*/
static int TemplateGetStateProgress(void *txv, uint8_t direction)
if (RunmodeIsUnittests()) {
- SCLogNotice("Unittest mode, registeringd default configuration.");
+ SCLogNotice("Unittest mode, registering default configuration.");
AppLayerProtoDetectPPRegister(IPPROTO_TCP, TEMPLATE_DEFAULT_PORT,
ALPROTO_TEMPLATE, 0, TEMPLATE_MIN_FRAME_LEN, STREAM_TOSERVER,
TemplateProbingParserTs, TemplateProbingParserTc);
}
else {
- SCLogNotice("Protocol detecter and parser disabled for Template.");
+ SCLogNotice("Protocol detector and parser disabled for Template.");
return;
}
AppLayerParserRegisterGetEventsFunc(IPPROTO_TCP, ALPROTO_TEMPLATE,
TemplateGetEvents);
- /* Leave this is if you parser can handle gaps, otherwise
+ /* Leave this is if your parser can handle gaps, otherwise
* remove. */
AppLayerParserRegisterOptionFlags(IPPROTO_TCP, ALPROTO_TEMPLATE,
APP_LAYER_PARSER_OPT_ACCEPT_GAPS);
TAILQ_HEAD(, TemplateTransaction) tx_list;
/** A count of the number of transactions created. The
- * transaction ID for each transaction is allocted
+ * transaction ID for each transaction is allocated
* by incrementing this value. */
uint64_t transaction_max;
} TemplateState;
/* TEMPLATE_END_REMOVE */
sigmatch_table[DETECT_AL_TEMPLATE_BUFFER].name = "template_buffer";
sigmatch_table[DETECT_AL_TEMPLATE_BUFFER].desc =
- "Template content modififier to match on the template buffers";
+ "Template content modifier to match on the template buffers";
sigmatch_table[DETECT_AL_TEMPLATE_BUFFER].Setup = DetectTemplateBufferSetup;
#ifdef UNITTESTS
sigmatch_table[DETECT_AL_TEMPLATE_BUFFER].RegisterTests =
sigmatch_table[DETECT_AL_TEMPLATE_RUST_BUFFER].name =
"template_rust_buffer";
sigmatch_table[DETECT_AL_TEMPLATE_RUST_BUFFER].desc =
- "Template content modififier to match on the template buffers";
+ "Template content modifier to match on the template buffers";
sigmatch_table[DETECT_AL_TEMPLATE_RUST_BUFFER].Setup =
DetectTemplateRustBufferSetup;
#ifdef UNITTESTS
#define __DETECT_TEMPLATE_H__
/** Per keyword data. This is set up by the DetectTemplateSetup() function.
- * Each signature will have an instance of DetectTemplateData per occurence
+ * Each signature will have an instance of DetectTemplateData per occurrence
* of the keyword.
* The structure should be considered static/readonly after initialization.
*/
}
/**
- * \brief this function is used to atemplate2d the parsed template2 data into the current signature
+ * \brief this function is used to add the parsed template2 data into the current signature
*
* \param de_ctx pointer to the Detection Engine Context
* \param s pointer to the Current Signature
/**
* \test DetectTemplate2ParseTest04 is a test for setting up an valid template2 value with
- * ">" operator and include spaces arround the given values.
+ * ">" operator and include spaces around the given values.
*/
static int DetectTemplate2ParseTest04 (void)
/**
* \test DetectTemplate2ParseTest05 is a test for setting up an valid template2 values with
- * "-" operator and include spaces arround the given values.
+ * "-" operator and include spaces around the given values.
*/
static int DetectTemplate2ParseTest05 (void)
/**
* \test DetectTemplate2ParseTest06 is a test for setting up an valid template2 values with
- * invalid "=" operator and include spaces arround the given values.
+ * invalid "=" operator and include spaces around the given values.
*/
static int DetectTemplate2ParseTest06 (void)
/**
* \test DetectTemplate2ParseTest07 is a test for setting up an valid template2 values with
- * invalid "<>" operator and include spaces arround the given values.
+ * invalid "<>" operator and include spaces around the given values.
*/
static int DetectTemplate2ParseTest07 (void)