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();
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();
* 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
*
* 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.
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;
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);
#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;
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);
/**
* \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.
*
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
/**
* \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
/**
* \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
* \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
/**
* \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,
/**
* \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
* 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)
{
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;