]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
capture: spelling
authorVictor Julien <vjulien@oisf.net>
Fri, 5 May 2023 19:11:20 +0000 (21:11 +0200)
committerVictor Julien <vjulien@oisf.net>
Sat, 6 May 2023 12:50:43 +0000 (14:50 +0200)
src/runmode-dpdk.c
src/runmode-napatech.c
src/runmode-pfring.c
src/source-af-packet.c
src/source-erf-dag.c
src/source-ipfw.c
src/source-napatech.c
src/source-nflog.c
src/source-pcap.c
src/util-napatech.c

index 2be947b8bb0bf27b2b5db0f7f8d6725b16ebc41a..947e1d7a861f8a2be1b9062ec46174d9d206f88d 100644 (file)
@@ -287,7 +287,7 @@ static void InitEal(void)
     ArgumentsCleanup(&args);
     SCFree(eal_argv);
 
-    if (retval < 0) { // retval binded to the result of rte_eal_init
+    if (retval < 0) { // retval bound to the result of rte_eal_init
         FatalError("DPDK EAL initialization error: %s", rte_strerror(-retval));
     }
     DPDKSetTimevalOfMachineStart();
index 6b83c02763b5ec0ec929f68be23038082d64a9ca..912126b9feaba380e337d9691c7df2bc96bf5f34 100644 (file)
@@ -165,7 +165,7 @@ static int NapatechRegisterDeviceStreams(void)
         last_stream = stream_config[inst].stream_id;
     }
 
-    /* Napatech stats come from a separate thread.  This will surpress
+    /* Napatech stats come from a separate thread.  This will suppress
      * the counters when suricata exits.
      */
     LiveDeviceHasNoStats();
index 2de535fc275b970fec3b596060d92e286bfc1592..7580fdd6cc14bb0c91b0e659058352b833642224 100644 (file)
@@ -183,7 +183,7 @@ static void *OldParsePfringConfig(const char *iface)
  * to thread or to reparse the file for each thread (and thus have
  * new structure.
  *
- * If old config system is used, then return the smae parameters
+ * If old config system is used, then return the same parameters
  * value for each interface.
  *
  * \return a PfringIfaceConfig corresponding to the interface name
index f1183dd7b8d33f89a8a31ab3b7ba128d59085fcd..89f8c2e80319616c1e54f602ed99aa476629a41e 100644 (file)
@@ -400,7 +400,7 @@ void TmModuleReceiveAFPRegister (void)
  *
  * AF_PACKET has an IPS mode were interface are peered: packet from
  * on interface are sent the peered interface and the other way. The ::AFPPeer
- * list is maitaining the list of peers. Each ::AFPPeer is storing the needed
+ * list is maintaining the list of peers. Each ::AFPPeer is storing the needed
  * information to be able to send packet on the interface.
  * A element of the list must not be destroyed during the run of Suricata as it
  * is used by ::Packet and other threads.
@@ -562,7 +562,7 @@ static void AFPPeersListReachedInc(void)
 
     if ((SC_ATOMIC_ADD(peerslist.reached, 1) + 1) == peerslist.turn) {
         (void)SC_ATOMIC_SET(peerslist.reached, 0);
-        /* Set turn to 0 to skip syncrhonization when ReceiveAFPLoop is
+        /* Set turn to 0 to skip synchronization when ReceiveAFPLoop is
          * restarted.
          */
         peerslist.turn = 0;
@@ -1560,12 +1560,13 @@ static int AFPComputeRingParams(AFPThreadVars *ptv, int order)
 
        Compute frame size:
        described in packet_mmap.txt
-       dependant on snaplen (need to use a variable ?)
+       dependent on snaplen (need to use a variable ?)
 snaplen: MTU ?
 tp_hdrlen determine_version in daq_afpacket
 in V1:  sizeof(struct tpacket_hdr);
 in V2: val in getsockopt(instance->fd, SOL_PACKET, PACKET_HDRLEN, &val, &len)
-frame size: TPACKET_ALIGN(snaplen + TPACKET_ALIGN(TPACKET_ALIGN(tp_hdrlen) + sizeof(struct sockaddr_ll) + ETH_HLEN) - ETH_HLEN);
+frame size: TPACKET_ALIGN(snaplen + TPACKET_ALIGN(TPACKET_ALIGN(tp_hdrlen) + sizeof(struct
+sockaddr_ll) + ETH_HLEN) - ETH_HLEN);
 
      */
     int tp_hdrlen = sizeof(struct tpacket_hdr);
@@ -1967,7 +1968,7 @@ static int AFPCreateSocket(AFPThreadVars *ptv, char *devname, int verbose)
 
 
 #ifdef HAVE_PACKET_FANOUT
-    /* add binded socket to fanout group */
+    /* add bound socket to fanout group */
     if (ptv->threads > 1) {
         uint32_t mode = ptv->cluster_type;
         uint16_t id = ptv->cluster_id;
index 9dde3a644bc92d7651f7172afa812c5541293dfc..b1a8286360cc4747ef50a3352c11baaeb4f2edc7 100644 (file)
@@ -501,7 +501,7 @@ ProcessErfDagRecord(ErfDagThreadVars *ewtn, char *prec)
     p->datalink = LINKTYPE_ETHERNET;
 
     /* Take into account for link type Ethernet ETH frame starts
-     * after ther ERF header + pad.
+     * after the ERF header + pad.
      */
     if (unlikely(PacketCopyData(p, pload->eth.dst, GET_PKT_LEN(p)))) {
         TmqhOutputPacketpool(ewtn->tv, p);
index 10ed26f78ac16008153256aaa6fd26c2aef4de6b..75bd738fee02bc823a93ad8c8f8bf936349cf7a5 100644 (file)
@@ -316,7 +316,7 @@ TmEcode ReceiveIPFWLoop(ThreadVars *tv, void *data, void *slot)
 /**
  * \brief Init function for RecieveIPFW.
  *
- * This is a setup function for recieving packets
+ * This is a setup function for receiving packets
  * via ipfw divert, binds a socket, and prepares to
  * to read from it.
  *
index 90ff4c328e9d9f7b571a69b6df63ef1fe3fc43bb..b3d969f8fe1388ca05f1c1646c5152b32baf7855 100644 (file)
@@ -330,13 +330,12 @@ struct IPv6Tuple4
     uint16_t dp;    /*!< Destination port */
 };
 
-
 /**
  * \brief Compares the byte order value of two IPv6 addresses.
  *
  *
  * \param addr_a The first address to compare
- * \param addr_b The second adress to compare
+ * \param addr_b The second address to compare
  *
  * \return -1 if addr_a < addr_b
  *          1 if addr_a > addr_b
index 622e3df300d675339411884d39fb11b2b3694896..da544e7c6a705d0c5ca740472caa05a76e52de6e 100644 (file)
@@ -203,7 +203,7 @@ static int NFLOGCallback(struct nflog_g_handle *gh, struct nfgenmsg *msg,
 
 /**
  * \brief Receives packet from a nflog group via libnetfilter_log
- * This is a setup function for recieving packets via libnetfilter_log.
+ * This is a setup function for receiving packets via libnetfilter_log.
  * \param tv pointer to ThreadVars
  * \param initdata pointer to the group passed from the user
  * \param data pointer gets populated with NFLOGThreadVars
@@ -410,7 +410,7 @@ static int NFLOGSetnlbufsiz(void *data, unsigned int size)
 /**
  * \brief Recieves packets from a group via libnetfilter_log.
  *
- *  This function recieves packets from a group and passes
+ *  This function receives packets from a group and passes
  *  the packet on to the nflog callback function.
  *
  * \param tv pointer to ThreadVars
@@ -535,7 +535,7 @@ TmEcode DecodeNFLOG(ThreadVars *tv, Packet *p, void *data)
  * \brief This an Init function for DecodeNFLOG
  *
  * \param tv pointer to ThreadVars
- * \param initdata pointer to initilization data.
+ * \param initdata pointer to initialization data.
  * \param data pointer that gets cast into NFLOGThreadVars
  * \retval TM_ECODE_OK is returned on success
  * \retval TM_ECODE_FAILED is returned on error
index 0bf5dab25b022909df32b021bde9a84ce4bb9322..ac46e08c80cc1e627819da0c85ca984961433d43 100644 (file)
@@ -372,7 +372,7 @@ static TmEcode ReceivePcapBreakLoop(ThreadVars *tv, void *data)
 /**
  * \brief Init function for ReceivePcap.
  *
- * This is a setup function for recieving packets
+ * This is a setup function for receiving packets
  * via libpcap. There are two versions of this function
  * depending on the major version of libpcap used.
  * For versions prior to 1.x we use open_pcap_live,
index b8e0baa678ce4ee34a04a34e83c6df8e49aa1c67..c8e5e36580589a63ad441f1af9b3c646ce15049f 100644 (file)
@@ -253,7 +253,7 @@ static uint16_t TestStreamConfig(
 /**
  * \brief  Updates Napatech packet counters
  *
- * \param tv Pointer to TheardVars structure
+ * \param tv Pointer to ThreadVars structure
  * \param hInfo Handle to Napatech Info Stream.
  * \param hstat_stream Handle to Napatech Statistics stream
  * \param num_streams the number of streams that are currently active
@@ -472,7 +472,7 @@ static uint32_t UpdateStreamStats(ThreadVars *tv,
  * Instantiated on the stats thread. Periodically retrieves
  * statistics from the Napatech card and updates the packet counters
  *
- * \param arg Pointer that is cast into a TheardVars structure
+ * \param arg Pointer that is cast into a ThreadVars structure
  */
 static void *NapatechStatsLoop(void *arg)
 {
@@ -1459,8 +1459,9 @@ uint32_t NapatechSetupTraffic(uint32_t first_stream, uint32_t last_stream)
 
                 if (ports_spec.first[iteration] == ports_spec.second[iteration]) {
                     if (is_inline) {
-                        FatalError("Error with napatec.ports in conf file.  When running in inline "
-                                   "mode the two ports specifying a segment must be different.");
+                        FatalError(
+                                "Error with napatech.ports in conf file.  When running in inline "
+                                "mode the two ports specifying a segment must be different.");
                     } else {
                         /* SPAN port configuration */
                         is_span_port[ports_spec.first[iteration]] = 1;