From 8dc58a6e9de068152a22f601d47d094681ea4c64 Mon Sep 17 00:00:00 2001 From: Victor Julien Date: Fri, 5 May 2023 21:11:20 +0200 Subject: [PATCH] capture: spelling --- src/runmode-dpdk.c | 2 +- src/runmode-napatech.c | 2 +- src/runmode-pfring.c | 2 +- src/source-af-packet.c | 11 ++++++----- src/source-erf-dag.c | 2 +- src/source-ipfw.c | 2 +- src/source-napatech.c | 3 +-- src/source-nflog.c | 6 +++--- src/source-pcap.c | 2 +- src/util-napatech.c | 9 +++++---- 10 files changed, 21 insertions(+), 20 deletions(-) diff --git a/src/runmode-dpdk.c b/src/runmode-dpdk.c index 2be947b8bb..947e1d7a86 100644 --- a/src/runmode-dpdk.c +++ b/src/runmode-dpdk.c @@ -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(); diff --git a/src/runmode-napatech.c b/src/runmode-napatech.c index 6b83c02763..912126b9fe 100644 --- a/src/runmode-napatech.c +++ b/src/runmode-napatech.c @@ -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(); diff --git a/src/runmode-pfring.c b/src/runmode-pfring.c index 2de535fc27..7580fdd6cc 100644 --- a/src/runmode-pfring.c +++ b/src/runmode-pfring.c @@ -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 diff --git a/src/source-af-packet.c b/src/source-af-packet.c index f1183dd7b8..89f8c2e803 100644 --- a/src/source-af-packet.c +++ b/src/source-af-packet.c @@ -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; diff --git a/src/source-erf-dag.c b/src/source-erf-dag.c index 9dde3a644b..b1a8286360 100644 --- a/src/source-erf-dag.c +++ b/src/source-erf-dag.c @@ -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); diff --git a/src/source-ipfw.c b/src/source-ipfw.c index 10ed26f78a..75bd738fee 100644 --- a/src/source-ipfw.c +++ b/src/source-ipfw.c @@ -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. * diff --git a/src/source-napatech.c b/src/source-napatech.c index 90ff4c328e..b3d969f8fe 100644 --- a/src/source-napatech.c +++ b/src/source-napatech.c @@ -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 diff --git a/src/source-nflog.c b/src/source-nflog.c index 622e3df300..da544e7c6a 100644 --- a/src/source-nflog.c +++ b/src/source-nflog.c @@ -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 diff --git a/src/source-pcap.c b/src/source-pcap.c index 0bf5dab25b..ac46e08c80 100644 --- a/src/source-pcap.c +++ b/src/source-pcap.c @@ -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, diff --git a/src/util-napatech.c b/src/util-napatech.c index b8e0baa678..c8e5e36580 100644 --- a/src/util-napatech.c +++ b/src/util-napatech.c @@ -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;