]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
templates: fix typos 6018/head
authorJuliana Fajardini <jufajardini@gmail.com>
Tue, 23 Mar 2021 17:59:58 +0000 (17:59 +0000)
committerVictor Julien <victor@inliniac.net>
Thu, 1 Apr 2021 13:47:09 +0000 (15:47 +0200)
- *template*files[ch][rs]: fix typos
- scripts/setup-app-layer: fix typos

rust/src/applayertemplate/template.rs
scripts/setup-app-layer.py
src/app-layer-template-rust.c
src/app-layer-template.c
src/app-layer-template.h
src/detect-template-buffer.c
src/detect-template-rust-buffer.c
src/detect-template.h
src/detect-template2.c
src/tests/detect-template2.c

index e331779c8440b1456113800d5a88efdaf4f0f215..50af3526eab3e0d148f7e664cb4f781d04a26ab3 100644 (file)
@@ -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();
     }
 
index d0f0b0e72be9495f4f8b5aac13d9a7aef36800d6..d43d5869a179a512fa7021e314a02ef67ef4230c 100755 (executable)
@@ -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
index fd2e689eefc8dce627d3eb18cc19d139cc7e30e1..3ba9349f306eccbe37703398bdde7c648495d7b1 100644 (file)
@@ -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.
index 5604654d335cdb5a29cdcc63a4bc1756c37d9b93..234d7affbd2cc211e4eba097c2ea6fe0092586ba 100644 (file)
@@ -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);
@@ -416,7 +416,7 @@ static void *TemplateGetTx(void *statev, uint64_t tx_id)
  * 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)
@@ -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);
index bf0cb86cc49cb820d475ec7aaca5f56e817336cb..79960e21a50804bd925db78510d8820332f6aada 100644 (file)
@@ -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;
index e988255b9ebf0f3ab9aed6fe6894a94097bb23e8..c294bb1fe695f0d18fa9713eca4973171b0a8777 100644 (file)
@@ -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 =
index d8806c4fb9f361000223eca069e1ef55da17cfa0..439256700626ec74932cc0a69f20b8d80503fc7c 100644 (file)
@@ -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
index 7e4aa75834dfc608d9cdfa7bae0e194c8cf89964..2d72c84aab6e2e8c446af2ea5cb78e313edb736d 100644 (file)
@@ -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.
  */
index ee7ca5d0ff7d2e1d846b2e8f4a0a40f0862ca0d6..60c715a83b8d53296670f993a8297b1676e974f2 100644 (file)
@@ -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
index e40d6542a5f196f884c65043066f51365c236a26..7cf086247b1be0504ce94155776177af21c4973f 100644 (file)
@@ -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)