]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
log: spelling
authorVictor Julien <vjulien@oisf.net>
Sat, 6 May 2023 04:54:32 +0000 (06:54 +0200)
committerVictor Julien <vjulien@oisf.net>
Sat, 6 May 2023 12:50:43 +0000 (14:50 +0200)
src/log-cf-common.c
src/log-cf-common.h
src/log-httplog.c
src/log-pcap.c
src/log-stats.c
src/log-tcp-data.c
src/log-tlsstore.c

index 1e38a1248d7df169983292ac5c32b01d696acdcc..077813501c32201eae76a328d1078a6c77e9df82 100644 (file)
@@ -63,7 +63,7 @@ LogCustomFormat *LogCustomFormatAlloc(void)
 
 /**
  *  \brief Frees memory held by a custom format node
- *  \param LogCustomFormatNode * node - node to relaease
+ *  \param LogCustomFormatNode * node - node to release
  */
 void LogCustomFormatNodeFree(LogCustomFormatNode *node)
 {
@@ -75,7 +75,7 @@ void LogCustomFormatNodeFree(LogCustomFormatNode *node)
 
 /**
  *  \brief Frees memory held by a custom format
- *  \param LogCustomFormat * cf - format to relaease
+ *  \param LogCustomFormat * cf - format to release
  */
 void LogCustomFormatFree(LogCustomFormat *cf)
 {
@@ -205,7 +205,7 @@ void LogCustomFormatAddNode(LogCustomFormat *cf, LogCustomFormatNode *node)
  *  \brief Writes a timestamp with given format into a MemBuffer
  *  \param MemBuffer * buffer - where to write
  *  \param const char * fmt - format to be used write timestamp
- *  \param const struct timeveal *ts  - the timetstamp
+ *  \param const struct timeveal *ts  - the timestamp
  *
  */
 void LogCustomFormatWriteTimestamp(MemBuffer *buffer, const char *fmt, const SCTime_t ts)
index de72c78842893513204871e3b2c772b11df17754..2b7a41d9b1ba70ee88379e52e22bc49658536c97 100644 (file)
@@ -22,7 +22,7 @@
  * \author Ignacio Sanchez <sanchezmartin.ji@gmail.com>
  * \author Paulo Pacheco <fooinha@gmail.com>
  *
- * Common custom loggging format
+ * Common custom logging format
  */
 
 #ifndef __LOG_CF_COMMON_H__
@@ -50,8 +50,7 @@
 #define LOG_CF_SPACE_SEPARATOR " "
 #define LOG_CF_UNKNOWN_VALUE "-"
 
-#define LOG_CF_WRITE_STAR_SEPATATOR(buffer) \
-    MemBufferWriteString(buffer, LOG_CF_STAR_SEPARATOR);
+#define LOG_CF_WRITE_STAR_SEPARATOR(buffer) MemBufferWriteString(buffer, LOG_CF_STAR_SEPARATOR);
 
 #define LOG_CF_WRITE_SPACE_SEPARATOR(buffer) \
     MemBufferWriteString(buffer, LOG_CF_SPACE_SEPARATOR);
@@ -65,7 +64,7 @@
 
 typedef struct LogCustomFormatNode_ {
     uint32_t type;              /**< Node format type. ie: LOG_CF_LITERAL, ... */
-    uint32_t maxlen;            /**< Maximun length of the data */
+    uint32_t maxlen;            /**< Maximum length of the data */
     char data[LOG_NODE_STRLEN]; /**< optional data. ie: http header name */
 } LogCustomFormatNode;
 
index da311a999393b729fc543e2259ff33635c71e4e3..1e45053abb2c323f9ec002a7b6864ff61ac522b1 100644 (file)
@@ -316,7 +316,7 @@ static void LogHttpLogCustom(LogHttpLogThread *aft, htp_tx_t *tx, const SCTime_t
 
 static void LogHttpLogExtended(LogHttpLogThread *aft, htp_tx_t *tx)
 {
-    LOG_CF_WRITE_STAR_SEPATATOR(aft->buffer);
+    LOG_CF_WRITE_STAR_SEPARATOR(aft->buffer);
 
     /* referer */
     htp_header_t *h_referer = NULL;
@@ -331,7 +331,7 @@ static void LogHttpLogExtended(LogHttpLogThread *aft, htp_tx_t *tx)
         MemBufferWriteString(aft->buffer, "<no referer>");
     }
 
-    LOG_CF_WRITE_STAR_SEPATATOR(aft->buffer);
+    LOG_CF_WRITE_STAR_SEPARATOR(aft->buffer);
 
     /* method */
     if (tx->request_method != NULL) {
@@ -339,7 +339,7 @@ static void LogHttpLogExtended(LogHttpLogThread *aft, htp_tx_t *tx)
                        (uint8_t *)bstr_ptr(tx->request_method),
                        bstr_len(tx->request_method));
     }
-    LOG_CF_WRITE_STAR_SEPATATOR(aft->buffer);
+    LOG_CF_WRITE_STAR_SEPARATOR(aft->buffer);
 
     /* protocol */
     if (tx->request_protocol != NULL) {
@@ -349,7 +349,7 @@ static void LogHttpLogExtended(LogHttpLogThread *aft, htp_tx_t *tx)
     } else {
         MemBufferWriteString(aft->buffer, "<no protocol>");
     }
-    LOG_CF_WRITE_STAR_SEPATATOR(aft->buffer);
+    LOG_CF_WRITE_STAR_SEPARATOR(aft->buffer);
 
     /* response status */
     if (tx->response_status != NULL) {
@@ -372,7 +372,7 @@ static void LogHttpLogExtended(LogHttpLogThread *aft, htp_tx_t *tx)
     }
 
     /* length */
-    LOG_CF_WRITE_STAR_SEPATATOR(aft->buffer);
+    LOG_CF_WRITE_STAR_SEPARATOR(aft->buffer);
     MemBufferWriteString(aft->buffer, "%"PRIuMAX" bytes", (uintmax_t)tx->response_message_len);
 }
 
@@ -440,7 +440,7 @@ static TmEcode LogHttpLogIPWrapper(ThreadVars *tv, void *data, const Packet *p,
         } else {
             MemBufferWriteString(aft->buffer, "<hostname unknown>");
         }
-        LOG_CF_WRITE_STAR_SEPATATOR(aft->buffer);
+        LOG_CF_WRITE_STAR_SEPARATOR(aft->buffer);
 
         /* uri */
         if (tx->request_uri != NULL) {
@@ -448,7 +448,7 @@ static TmEcode LogHttpLogIPWrapper(ThreadVars *tv, void *data, const Packet *p,
                     (uint8_t *)bstr_ptr(tx->request_uri),
                     bstr_len(tx->request_uri));
         }
-        LOG_CF_WRITE_STAR_SEPATATOR(aft->buffer);
+        LOG_CF_WRITE_STAR_SEPARATOR(aft->buffer);
 
         /* user agent */
         htp_header_t *h_user_agent = NULL;
@@ -467,7 +467,7 @@ static TmEcode LogHttpLogIPWrapper(ThreadVars *tv, void *data, const Packet *p,
         }
 
         /* ip/tcp header info */
-        LOG_CF_WRITE_STAR_SEPATATOR(aft->buffer);
+        LOG_CF_WRITE_STAR_SEPARATOR(aft->buffer);
         MemBufferWriteString(aft->buffer,
                 "%s:%" PRIu16 " -> %s:%" PRIu16 "\n",
                 srcip, sp, dstip, dp);
@@ -521,7 +521,7 @@ TmEcode LogHttpLogThreadInit(ThreadVars *t, const void *initdata, void **data)
         return TM_ECODE_FAILED;
     }
 
-    /* Use the Ouptut Context (file pointer and mutex) */
+    /* Use the Output Context (file pointer and mutex) */
     aft->httplog_ctx= ((OutputCtx *)initdata)->data;
 
     *data = (void *)aft;
index 083d840cbd43cda56c8ecd15154a22e99e89fa4b..3238f2a076abbf4f97b9d95d4c951539c7f4b3d9 100644 (file)
@@ -341,7 +341,7 @@ static void PcapFileNameFree(PcapFileName *pf)
  * \param t Thread Variable containing  input/output queue, cpu affinity etc.
  * \param pl PcapLog thread variable.
  *
- * \retval 0 on succces
+ * \retval 0 on success
  * \retval -1 on failure
  */
 static int PcapLogRotateFile(ThreadVars *t, PcapLogData *pl)
@@ -680,7 +680,7 @@ static int PcapLog (ThreadVars *t, void *thread_data, const Packet *p)
                 return TM_ECODE_OK;
             }
 
-            /* PcapLogDumpSegment has writtens over the PcapLogData variables so need to update */
+            /* PcapLogDumpSegment has written over the PcapLogData variables so need to update */
             pl->h->ts.tv_sec = SCTIME_SECS(p->ts);
             pl->h->ts.tv_usec = SCTIME_USECS(p->ts);
             if (IS_TUNNEL_PKT(p) && !IS_TUNNEL_ROOT_PKT(p)) {
@@ -1068,7 +1068,7 @@ static TmEcode PcapLogDataInit(ThreadVars *t, const void *initdata, void **data)
 
     PcapLogLock(td->pcap_log);
 
-    /** Use the Ouptut Context (file pointer and mutex) */
+    /** Use the Output Context (file pointer and mutex) */
     td->pcap_log->pkt_cnt = 0;
     td->pcap_log->pcap_dead_handle = NULL;
     td->pcap_log->pcap_dumper = NULL;
@@ -1186,7 +1186,7 @@ static void PcapLogDataFree(PcapLogData *pl)
  *
  *  \param t Thread Variable containing  input/output queue, cpu affinity etc.
  *  \param data PcapLog thread data.
- *  \retval TM_ECODE_OK on succces
+ *  \retval TM_ECODE_OK on success
  *  \retval TM_ECODE_FAILED on failure
  */
 static TmEcode PcapLogDataDeinit(ThreadVars *t, void *thread_data)
@@ -1371,7 +1371,7 @@ static OutputInitResult PcapLogInitCtx(ConfNode *conf)
 
     const char *filename = NULL;
 
-    if (conf != NULL) { /* To faciliate unit tests. */
+    if (conf != NULL) { /* To facilitate unit tests. */
         filename = ConfNodeLookupChildValue(conf, "filename");
     }
 
@@ -1615,7 +1615,7 @@ static OutputInitResult PcapLogInitCtx(ConfNode *conf)
     }
 
     const char *ts_format = NULL;
-    if (conf != NULL) { /* To faciliate unit tests. */
+    if (conf != NULL) { /* To facilitate unit tests. */
         ts_format = ConfNodeLookupChildValue(conf, "ts-format");
     }
     if (ts_format != NULL) {
@@ -1630,7 +1630,7 @@ static OutputInitResult PcapLogInitCtx(ConfNode *conf)
     }
 
     const char *use_stream_depth = NULL;
-    if (conf != NULL) { /* To faciliate unit tests. */
+    if (conf != NULL) { /* To facilitate unit tests. */
         use_stream_depth = ConfNodeLookupChildValue(conf, "use-stream-depth");
     }
     if (use_stream_depth != NULL) {
@@ -1644,7 +1644,7 @@ static OutputInitResult PcapLogInitCtx(ConfNode *conf)
     }
 
     const char *honor_pass_rules = NULL;
-    if (conf != NULL) { /* To faciliate unit tests. */
+    if (conf != NULL) { /* To facilitate unit tests. */
         honor_pass_rules = ConfNodeLookupChildValue(conf, "honor-pass-rules");
     }
     if (honor_pass_rules != NULL) {
index 52ad90c589057294350f1d3f6afd9c64ede34e99..e694eb8d8d56de63ee3a3d781fb2df707180d12e 100644 (file)
@@ -183,7 +183,7 @@ TmEcode LogStatsLogThreadInit(ThreadVars *t, const void *initdata, void **data)
         return TM_ECODE_FAILED;
     }
 
-    /* Use the Ouptut Context (file pointer and mutex) */
+    /* Use the Output Context (file pointer and mutex) */
     aft->statslog_ctx= ((OutputCtx *)initdata)->data;
 
     *data = (void *)aft;
index ffc5a97e7f97d5b55784702871447157ca139ad2..538cfc91e12b9b6b781048ae070d2b0a5a74d9e6 100644 (file)
@@ -183,7 +183,7 @@ TmEcode LogTcpDataLogThreadInit(ThreadVars *t, const void *initdata, void **data
         return TM_ECODE_FAILED;
     }
 
-    /* Use the Ouptut Context (file pointer and mutex) */
+    /* Use the Output Context (file pointer and mutex) */
     aft->tcpdatalog_ctx= ((OutputCtx *)initdata)->data;
 
     *data = (void *)aft;
index 2ff86916b7804a2a7b5c350ae1ec109c7e61ef87..4e1d54a5fe3a75d978c36f8888e4cadacc52d8f5 100644 (file)
@@ -363,7 +363,7 @@ static OutputInitResult LogTlsStoreLogInitCtx(ConfNode *conf)
     output_ctx->data = NULL;
     output_ctx->DeInit = LogTlsStoreLogDeInitCtx;
 
-    /* FIXME we need to implement backward compability here */
+    /* FIXME we need to implement backward compatibility here */
     const char *s_default_log_dir = NULL;
     s_default_log_dir = ConfigGetLogDirectory();