templates: fix typos

- *template*files[ch][rs]: fix typos
- scripts/setup-app-layer: fix typos
pull/6018/head
Juliana Fajardini 4 years ago committed by Victor Julien
parent 4748826dc7
commit c6a35d09b7

@ -335,7 +335,7 @@ pub extern "C" fn rs_template_parse_request(
};
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();
}

@ -344,7 +344,7 @@ def detect_patch_makefile_am(protoname, buffername):
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()
@ -364,7 +364,7 @@ def detect_patch_detect_enginer_register_c(protoname, buffername):
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()
@ -392,7 +392,7 @@ name specified on the command line. This is done by copying and
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:
@ -486,13 +486,13 @@ def main():
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
@ -502,7 +502,7 @@ now been setup in the files:
})
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

@ -27,7 +27,7 @@
* \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.

@ -27,7 +27,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.
@ -280,7 +280,7 @@ static AppLayerResult TemplateParseRequest(Flow *f, void *statev,
*
* 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);
@ -486,7 +486,7 @@ void RegisterTemplateParsers(void)
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);
@ -511,7 +511,7 @@ void RegisterTemplateParsers(void)
}
else {
SCLogNotice("Protocol detecter and parser disabled for Template.");
SCLogNotice("Protocol detector and parser disabled for Template.");
return;
}
@ -561,7 +561,7 @@ void RegisterTemplateParsers(void)
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);

@ -66,7 +66,7 @@ typedef struct TemplateState {
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;

@ -59,7 +59,7 @@ void DetectTemplateBufferRegister(void)
/* 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 =

@ -61,7 +61,7 @@ void DetectTemplateRustBufferRegister(void)
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

@ -25,7 +25,7 @@
#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.
*/

@ -281,7 +281,7 @@ error:
}
/**
* \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

@ -80,7 +80,7 @@ static int DetectTemplate2ParseTest03 (void)
/**
* \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)
@ -98,7 +98,7 @@ 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)
@ -117,7 +117,7 @@ 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)
@ -129,7 +129,7 @@ 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)

Loading…
Cancel
Save