]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
decode: spelling
authorVictor Julien <vjulien@oisf.net>
Fri, 5 May 2023 18:45:48 +0000 (20:45 +0200)
committerVictor Julien <vjulien@oisf.net>
Sat, 6 May 2023 12:50:43 +0000 (14:50 +0200)
src/decode-ethernet.h
src/decode-events.c
src/decode-geneve.c
src/decode-icmpv6.c
src/decode-ipv4.c
src/decode-ipv4.h
src/decode-ipv6.c
src/decode-null.c
src/decode-ppp.h
src/decode-pppoe.c
src/decode-template.h

index 72a75bb03a2fc6698d0929ce86781a658d73424e..aa077056d67260beabb603dd58d5372c5e0632d8 100644 (file)
@@ -33,7 +33,7 @@
 #define ETHERNET_TYPE_PUP             0x0200 /* PUP protocol */
 #define ETHERNET_TYPE_IP              0x0800
 #define ETHERNET_TYPE_ARP             0x0806
-#define ETHERNET_TYPE_BRIDGE          0x6558 /* transparant ethernet bridge (GRE) */
+#define ETHERNET_TYPE_BRIDGE          0x6558 /* transparent ethernet bridge (GRE) */
 #define ETHERNET_TYPE_REVARP          0x8035
 #define ETHERNET_TYPE_EAPOL           0x888e
 #define ETHERNET_TYPE_IPV6            0x86dd
index e0d9fd90a19f32f4d8a7026f05335a32524f4fef..22242e70492b3ac48c07b1e3f71fd6bc84922301 100644 (file)
@@ -445,7 +445,7 @@ const struct DecodeEvents_ DEvents[] = {
             ESP_PKT_TOO_SMALL,
     },
 
-    /* Fragmentation reasembly events. */
+    /* Fragmentation reassembly events. */
     {
             "decoder.ipv4.frag_pkt_too_large",
             IPV4_FRAG_PKT_TOO_LARGE,
index b70275cff78b4bd47bcef8bfe5fac9e94b36b93b..29038f8ce69283c310e0c7b5baaf0e08d850ec57 100644 (file)
@@ -148,12 +148,12 @@ void DecodeGeneveConfig(void)
 
 static inline bool IsValidGeneveVersion(const GeneveHeader *geneve_hdr)
 {
-    const int valid_verisons[] = VALID_GENEVE_VERSIONS;
-    const int num_versions = sizeof(valid_verisons) / sizeof(int);
+    const int valid_versions[] = VALID_GENEVE_VERSIONS;
+    const int num_versions = sizeof(valid_versions) / sizeof(int);
     const uint8_t cur_version = GENEVE_VERSION(geneve_hdr);
 
     for (int i = 0; i < num_versions; i++) {
-        if (valid_verisons[i] == cur_version)
+        if (valid_versions[i] == cur_version)
             return true;
     }
 
index 8f2adc1b0b3669f926929b41f2c821a0a33e475c..e52279ff573a6d2423305021196f5a5772c2e05a 100644 (file)
@@ -1132,7 +1132,7 @@ static int ICMPV6EchoRepTest02(void)
     PASS;
 }
 
-/**\test icmpv6 packet decoding and setting up of payload_len and payload buufer
+/**\test icmpv6 packet decoding and setting up of payload_len and payload buffer
  * \retval retval 0 = Error ; 1 = ok
  */
 static int ICMPV6PayloadTest01(void)
@@ -1556,8 +1556,7 @@ void DecodeICMPV6RegisterTests(void)
 #ifdef UNITTESTS
     UtRegisterTest("ICMPV6CalculateValidChecksumtest01",
                    ICMPV6CalculateValidChecksumtest01);
-    UtRegisterTest("ICMPV6CalculateInValidChecksumtest02",
-                   ICMPV6CalculateInvalidChecksumtest02);
+    UtRegisterTest("ICMPV6CalculateInvalidChecksumtest02", ICMPV6CalculateInvalidChecksumtest02);
 
     UtRegisterTest("ICMPV6ParamProbTest01 (Valid)", ICMPV6ParamProbTest01);
     UtRegisterTest("ICMPV6DestUnreachTest01 (Valid)", ICMPV6DestUnreachTest01);
index 7b84964917f2650687e3e36d1cc655627abbbf15..92d0c6ecfd5c85a49a9fec68309b5639642af5d3 100644 (file)
@@ -200,7 +200,7 @@ static int IPV4OptValidateCIPSO(Packet *p, const IPV4Opt *o)
 
 #if 0
     /* Domain of Interest (DOI) of 0 is reserved and thus invalid */
-    /** \todo Aparently a DOI of zero is fine in practice - verify. */
+    /** \todo Apparently a DOI of zero is fine in practice - verify. */
     if (doi == 0) {
         ENGINE_SET_EVENT(p,IPV4_OPT_MALFORMED);
         return -1;
index 6d696347982843f4a5e6b1a075175618542d2427..d247fa9f00330c9f78781b3b5a6d6028fba68bf5 100644 (file)
@@ -184,7 +184,7 @@ void DecodeIPV4RegisterTests(void);
 /** ----- Inline functions ----- */
 
 /**
- * \brief Calculateor validate the checksum for the IP packet
+ * \brief Calculate or validate the checksum for the IP packet
  *
  * \param pkt  Pointer to the start of the IP packet
  * \param hlen Length of the IP header
index 72d81c86deb661160011f5c080e9c95f63baa519..7629a7c4672c1d8c349a270f0cad7c1649152db8 100644 (file)
@@ -862,14 +862,12 @@ static int DecodeIPV6RouteTest01 (void)
  */
 static int DecodeIPV6HopTest01 (void)
 {
-    uint8_t raw_pkt1[] = {
-        0x60,0x00,0x00,0x00,0x00,0x20,0x00,0x01,0xfe,0x80,0x00,0x00,0x00,0x00,0x00,0x00,
-        0x02,0x0f,0xfe,0xff,0xfe,0x98,0x3d,0x01,0xff,0x02,0x00,0x00,0x00,0x00,0x00,0x00,
-        0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x3a,0x00,0xff, /* 0xff is a nonsene opt */
-        0x02,0x00,0x00,0x00,0x00,
-        0x82,0x00,0x1c,0x6f,0x27,0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
-        0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
-    };
+    uint8_t raw_pkt1[] = { 0x60, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x01, 0xfe, 0x80, 0x00, 0x00,
+        0x00, 0x00, 0x00, 0x00, 0x02, 0x0f, 0xfe, 0xff, 0xfe, 0x98, 0x3d, 0x01, 0xff, 0x02, 0x00,
+        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x3a, 0x00,
+        0xff, /* 0xff is a nonsense opt */
+        0x02, 0x00, 0x00, 0x00, 0x00, 0x82, 0x00, 0x1c, 0x6f, 0x27, 0x10, 0x00, 0x00, 0x00, 0x00,
+        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 };
     Packet *p1 = PacketGetFromAlloc();
     FAIL_IF(unlikely(p1 == NULL));
     ThreadVars tv;
index d926516fdc559769797d2ab3393781e9d84fd70c..5bf9340457667f53de2dd64692b90f38ca6aab30 100644 (file)
  * @{
  */
 
-
 /**
  * \file
  *
  * \author Victor Julien <victor@inliniac.net>
  *
- * Decode linkype null:
+ * Decode linktype null:
  * http://www.tcpdump.org/linktypes.html
  */
 
index 00e61de9f9b4f3cface217ee782721e617cba7af..f8914cf2e77dd9d6f11857e7d329bd1c0c11ec45 100644 (file)
@@ -51,7 +51,7 @@
 #define PPP_DECNETCP   0x8027       /* DECnet Control Protocol */
 #define PPP_APPLECP    0x8029       /* Appletalk Control Protocol */
 #define PPP_IPXCP      0x802b       /* Novell IPX Control Protocol */
-#define PPP_STIICP     0x8033       /* Strean Protocol Control Protocol */
+#define PPP_STIICP     0x8033       /* Stream Protocol Control Protocol */
 #define PPP_VINESCP    0x8035       /* Banyan Vines Control Protocol */
 #define PPP_IPV6CP     0x8057       /* IPv6 Control Protocol */
 #define PPP_MPLSCP     0x8281       /* rfc 3022 */
index 2b798c96f406fa74ebb4ba24ff3298a75db478da..f884085c650ff44dbd33739e99ce03201c2a6117 100644 (file)
@@ -376,7 +376,7 @@ static int DecodePPPOEtest04 (void)
 }
 
 /** DecodePPPOEtest05
- *  \brief Valid exaple PADO PPPOE packet taken from RFC2516, but too short for given length
+ *  \brief Valid example PADO PPPOE packet taken from RFC2516, but too short for given length
  *  \retval 0 Expected test value
  */
 static int DecodePPPOEtest05 (void)
index 9ce0be415fb86bf34ea8ec1f21e88958aca9d28f..f02187faf1e01660abbf50666279cb3baab4932b 100644 (file)
@@ -25,8 +25,7 @@
 #ifndef __DECODE_TEMPLATE_H__
 #define __DECODE_TEMPLATE_H__
 
-
-/* Header layout. Keep things like alignment and endianess in
+/* Header layout. Keep things like alignment and endianness in
  * mind while constructing this. */
 
 typedef struct TemplateHdr_ {