]> The Tcpdump Group git mirrors - libpcap/commitdiff
Fix some typos
authorFrancois-Xavier Le Bail <[email protected]>
Sat, 12 Dec 2020 14:58:48 +0000 (15:58 +0100)
committerFrancois-Xavier Le Bail <[email protected]>
Sat, 12 Dec 2020 14:59:40 +0000 (15:59 +0100)
[skip ci]

19 files changed:
CHANGES
aclocal.m4
atmuni31.h
configure
optimize.c
pcap-bpf.c
pcap-dlpi.c
pcap-dpdk.c
pcap-linux.c
pcap-netfilter-linux.c
pcap-npf.c
pcap-pf.c
pcap-rpcap.c
pcap-sita.html
pcap-usb-linux.c
rpcapd/daemon.c
rpcapd/rpcapd.c
testprogs/capturetest.c
testprogs/fuzz/onefile.c

diff --git a/CHANGES b/CHANGES
index e4b391256a9fbd38885fa4b6eb6fb137c04b4a53..612833af922f2600078fa6743af82f65a4170c96 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -336,7 +336,7 @@ Summary for 1.3.0 libpcap release
 Friday  December 9, 2011.  [email protected].
 Summary for 1.2.1 libpcap release
        Update README file.
-       Fix typoes in README.linux file.
+       Fix typos in README.linux file.
        Clean up some compiler warnings.
        Fix Linux compile problems and tests for ethtool.h.
        Treat Debian/kFreeBSD and GNU/Hurd as systems with GNU
index 0523f7c54817a4105943420a27bb50d5b414922e..786423bfdf84003b3c7f9d8bea3c241311234f18 100644 (file)
@@ -271,7 +271,7 @@ dnl with the flag in question, and the "treat warnings as errors" flag
 dnl set, and don't add the flag to the first argument if the compile
 dnl fails; this is for warning options cause problems that can't be
 dnl worked around.  If a third argument is supplied, a fourth argument
-dnl should also be supplied; it's a message desribing what the test
+dnl should also be supplied; it's a message describing what the test
 dnl program is checking.
 dnl
 AC_DEFUN(AC_LBL_CHECK_COMPILER_OPT,
@@ -522,7 +522,7 @@ AC_DEFUN(AC_LBL_SHLIBS_INIT,
                    #
                    V_SONAME_OPT="-Wl,+h,"
                    #
-                   # By default, directories specifed with -L
+                   # By default, directories specified with -L
                    # are added to the run-time search path, so
                    # we don't add them in pcap-config.
                    #
@@ -583,7 +583,7 @@ AC_DEFUN(AC_LBL_SHLIBS_INIT,
                    V_SHLIB_OPT="-b"
                    V_SONAME_OPT="+h "
                    #
-                   # By default, directories specifed with -L
+                   # By default, directories specified with -L
                    # are added to the run-time search path, so
                    # we don't add them in pcap-config.
                    #
index 0f85430098ced80778b064f1e61a20d8a0b0a0d1..7d4f270be9d0c6f32d20335b5b5dc182e7a3a3d3 100644 (file)
@@ -76,7 +76,7 @@
 #define PROTO_POS       0      /* offset of protocol discriminator */
 #define CALL_REF_POS    2      /* offset of call reference value */
 #define MSG_TYPE_POS    5      /* offset of message type */
-#define MSG_LEN_POS     7      /* offset of mesage length */
+#define MSG_LEN_POS     7      /* offset of message length */
 #define IE_BEGIN_POS    9      /* offset of first information element */
 
 /* format of signalling messages */
index 496338611ef57dc134806618e21e71cd60199b06..d85be30fca4141a8712e3034d9468fdd5b40373b 100755 (executable)
--- a/configure
+++ b/configure
@@ -4349,7 +4349,7 @@ $as_echo "#define const /**/" >>confdefs.h
                    #
                    V_SONAME_OPT="-Wl,+h,"
                    #
-                   # By default, directories specifed with -L
+                   # By default, directories specified with -L
                    # are added to the run-time search path, so
                    # we don't add them in pcap-config.
                    #
@@ -4410,7 +4410,7 @@ $as_echo "#define const /**/" >>confdefs.h
                    V_SHLIB_OPT="-b"
                    V_SONAME_OPT="+h "
                    #
-                   # By default, directories specifed with -L
+                   # By default, directories specified with -L
                    # are added to the run-time search path, so
                    # we don't add them in pcap-config.
                    #
index 2c9c4b396c02e3e060da46a28fa964606c61820c..610a03037a0838e8f90518f347258a24a4f18fb5 100644 (file)
@@ -552,7 +552,7 @@ atomuse(struct stmt *s)
        case BPF_LDX:
                /*
                 * As there are fewer than 2^31 memory locations,
-                * s->k should be convertable to int without problems.
+                * s->k should be convertible to int without problems.
                 */
                return (BPF_MODE(c) == BPF_IND) ? X_ATOM :
                        (BPF_MODE(c) == BPF_MEM) ? (int)s->k : -1;
index 881ce196c3e2f0102e18fd3a1b7aa42bc58d45bc..f0ccb96561c4d4c93197dbb825915f1ecc857192 100644 (file)
@@ -152,7 +152,7 @@ struct pcap_bpf {
         * As there is a header on the front size of the mmap'd buffer, only
         * some of the buffer is exposed to libpcap as a whole via bufsize;
         * zbufsize is the true size.  zbuffer tracks the current zbuf
-        * assocated with buffer so that it can be used to decide which the
+        * associated with buffer so that it can be used to decide which the
         * next buffer to read will be.
         */
        u_char *zbuf1, *zbuf2, *zbuffer;
index abba8aefcdd9bb4a13c58ce09eb43d8064f8303a..208a63bc354dd4fa0adf75dbe0b6a41e37b34ae1 100644 (file)
@@ -1813,7 +1813,7 @@ get_dlpi_ppa(register int fd, register const char *ifname, register u_int unit,
        }
        if (nl[NL_IFNET].n_value == 0) {
                snprintf(ebuf, PCAP_ERRBUF_SIZE,
-                   "could't find %s kernel symbol",
+                   "couldn't find %s kernel symbol",
                    nl[NL_IFNET].n_name);
                return (PCAP_ERROR);
        }
index 837ad1c22ac61b4f28f9a78feffd58ab21015d56..765abe59ba6568932eda3a0031e6126a634f145f 100644 (file)
@@ -34,7 +34,7 @@ Description:
 
 Limitations:
 1. DPDK support will be on if DPDK is available. Please set DIR for --with-dpdk[=DIR] with ./configure or -DDPDK_DIR[=DIR] with cmake if DPDK is installed manually.
-2. Only support link libdpdk.so dynamicly, because the libdpdk.a will not work correctly.
+2. Only support link libdpdk.so dynamically, because the libdpdk.a will not work correctly.
 3. Only support read operation, and packet injection has not been supported yet.
 
 Usage:
@@ -55,7 +55,7 @@ $RTE_SDK/examples/l2fwd/$RTE_TARGET/l2fwd -dlibrte_pmd_e1000.so -dlibrte_pmd_ixg
 
 3. Compile libpcap with dpdk options.
 
-If DPDK has not been found automatically, you shall export DPDK envionment variable which are used for compiling DPDK. And then pass $RTE_SDK/$RTE_TARGET to --with-dpdk or -DDPDK_DIR
+If DPDK has not been found automatically, you shall export DPDK environment variable which are used for compiling DPDK. And then pass $RTE_SDK/$RTE_TARGET to --with-dpdk or -DDPDK_DIR
 
 export RTE_SDK={your DPDK base directory}
 export RTE_TARGET={your target name}
@@ -293,7 +293,7 @@ static int dpdk_read_with_timeout(pcap_t *p, struct rte_mbuf **pkts_burst, const
                // In non-blocking mode, just read once, no matter how many packets are captured.
                nb_rx = (int)rte_eth_rx_burst(pd->portid, 0, pkts_burst, burst_cnt);
        }else{
-               // In blocking mode, read many times until packets are captured or timeout or break_loop is setted.
+               // In blocking mode, read many times until packets are captured or timeout or break_loop is set.
                // if timeout_ms == 0, it may be blocked forever.
                while (timeout_ms == 0 || sleep_ms < timeout_ms){
                        nb_rx = (int)rte_eth_rx_burst(pd->portid, 0, pkts_burst, burst_cnt);
@@ -343,14 +343,14 @@ static int pcap_dpdk_dispatch(pcap_t *p, int max_cnt, pcap_handler cb, u_char *c
                        return PCAP_ERROR_BREAK;
                }
                // read once in non-blocking mode, or try many times waiting for timeout_ms.
-               // if timeout_ms == 0, it will be blocked until one packet arrives or break_loop is setted.
+               // if timeout_ms == 0, it will be blocked until one packet arrives or break_loop is set.
                nb_rx = dpdk_read_with_timeout(p, pkts_burst, burst_cnt);
                if (nb_rx == 0){
                        if (pd->nonblock){
                                RTE_LOG(DEBUG, USER1, "dpdk: no packets available in non-blocking mode.\n");
                        }else{
                                if (p->break_loop){
-                                       RTE_LOG(DEBUG, USER1, "dpdk: no packets available and break_loop is setted in blocking mode.\n");
+                                       RTE_LOG(DEBUG, USER1, "dpdk: no packets available and break_loop is set in blocking mode.\n");
                                        p->break_loop = 0;
                                        return PCAP_ERROR_BREAK;
 
@@ -962,7 +962,7 @@ static int pcap_dpdk_activate(pcap_t *p)
        return ret;
 }
 
-// device name for dpdk shoud be in the form as dpdk:number, such as dpdk:0
+// device name for dpdk should be in the form as dpdk:number, such as dpdk:0
 pcap_t * pcap_dpdk_create(const char *device, char *ebuf, int *is_ours)
 {
        pcap_t *p=NULL;
index 10997abe6a77f282f34196b2ca23c15ddf9ecab1..74816892437dda8fe9938d875efa8e7e9feeb36a 100644 (file)
@@ -4205,7 +4205,7 @@ pcap_setfilter_linux(pcap_t *handle, struct bpf_program *filter)
                return -1;
 
        /*
-        * Run user level packet filter by default. Will be overriden if
+        * Run user level packet filter by default. Will be overridden if
         * installing a kernel filter succeeds.
         */
        handlep->filter_in_userland = 1;
index cdd6d7fcc073309e28dd9ed736a16d7740ff5c56..17f528fc0783fadb62ed9111d903b12e52870496 100644 (file)
 #include <linux/netfilter/nfnetlink_log.h>
 #include <linux/netfilter/nfnetlink_queue.h>
 
-/* NOTE: if your program drops privilages after pcap_activate() it WON'T work with nfqueue.
+/* NOTE: if your program drops privileges after pcap_activate() it WON'T work with nfqueue.
  *       It took me quite some time to debug ;/
  *
- *       Sending any data to nfnetlink socket requires CAP_NET_ADMIN privilages,
+ *       Sending any data to nfnetlink socket requires CAP_NET_ADMIN privileges,
  *       and in nfqueue we need to send verdict reply after recving packet.
  *
- *       In tcpdump you can disable dropping privilages with -Z root
+ *       In tcpdump you can disable dropping privileges with -Z root
  */
 
 #include "pcap-netfilter-linux.h"
index a4ee1d9c848b4ec0e8b4404904c500491bd0392a..ad204e75fa86fd2c85e0764a1ed9dfb9ff99bd85 100644 (file)
@@ -1419,7 +1419,7 @@ pcap_setfilter_npf(pcap_t *p, struct bpf_program *fp)
 }
 
 /*
- * We filter at user level, since the kernel driver does't process the packets
+ * We filter at user level, since the kernel driver doesn't process the packets
  */
 static int
 pcap_setfilter_win32_dag(pcap_t *p, struct bpf_program *fp) {
index f483a0e66bc905c29626bf270f06d8a9f0535211..4563a225ddc2500015d17715b0653c73398f2684 100644 (file)
--- a/pcap-pf.c
+++ b/pcap-pf.c
@@ -256,7 +256,7 @@ pcap_stats_pf(pcap_t *p, struct pcap_stat *ps)
         *      full.
         *
         *      "ps_ifdrop" counts packets dropped by the network
-        *      inteface (regardless of whether they would have passed
+        *      interface (regardless of whether they would have passed
         *      the input filter, of course).
         *
         * If packet filtering is not being done in the kernel:
@@ -268,7 +268,7 @@ pcap_stats_pf(pcap_t *p, struct pcap_stat *ps)
         *      the userland filter.
         *
         *      "ps_ifdrop" counts packets dropped by the network
-        *      inteface (regardless of whether they would have passed
+        *      interface (regardless of whether they would have passed
         *      the input filter, of course).
         *
         * These statistics don't include packets not yet read from
index a480f9e01de547e5bd415eed8f4b79ad20a7d4d9..a2612e99243c6cb6dbba3b2b3fee4ab84b688be6 100644 (file)
@@ -1488,7 +1488,7 @@ error_nodiscard:
  * This function can be called in two cases:
  * - pcap_startcapture_remote() is called (we have to send the filter
  *   along with the 'start capture' command)
- * - we want to udpate the filter during a capture (i.e. pcap_setfilter()
+ * - we want to update the filter during a capture (i.e. pcap_setfilter()
  *   after the capture has been started)
  *
  * This function serializes the filter into the sending buffer ('sendbuf',
index d9b7376e2341e5d2c3b9eb8fafa638b0ee210ced..33f1e10fa52c8409ae695b0ed5eba02c298c02b9 100644 (file)
@@ -22,7 +22,7 @@ A { text-decoration:none }
 <UL>
        <STRONG>Note:</STRONG> This document is part of the libpcap Git and was derived from 'pcap.3' (circa Aug/07).
        <P>
-       The ACN provides a customized/distributed version of this library that alows SMPs to
+       The ACN provides a customized/distributed version of this library that allows SMPs to
        interact with the various IOPs within the site providing a standard mechanism
        to capture LAN and WAN message traffic.
        <P>
@@ -362,7 +362,7 @@ A { text-decoration:none }
                <TR><TH VALIGN=TOP NOWRAP>SMP -> IOP</TH>
                        <TD>
                        The SMP closes the file descriptor, and if the descriptor is that of
-                       the comminucation session with an IOP, it too is terminated.
+                       the communication session with an IOP, it too is terminated.
                        </TD>
                </TR>
                <TR><TH VALIGN=TOP NOWRAP>IOP</TH>
@@ -719,7 +719,7 @@ A { text-decoration:none }
                                        <TR>
                                                <TD VALIGN=TOP>ps_ifdrop</TD>
                                                <TD VALIGN=TOP ALIGN=CENTER>4</TD>
-                                               <TD VALIGN=TOP>The number of packets dropped by the network inteface
+                                               <TD VALIGN=TOP>The number of packets dropped by the network interface
                                                        (regardless of whether they would have passed the input filter).</TD>
                                        </TR>
                                </TABLE>
index 9e7e8404fd4896be689bd23a7d4dd1951a4df970..3596428e4b34af2c01fbf2048bdec6cac8369736 100644 (file)
@@ -1376,7 +1376,7 @@ usb_read_linux_mmap(pcap_t *handle, int max_packets, pcap_handler callback, u_ch
                        }
                }
 
-               /* with max_packets specifying "unlimited" we stop afer the first chunk*/
+               /* with max_packets specifying "unlimited" we stop after the first chunk*/
                if (PACKET_COUNT_IS_UNLIMITED(max_packets) || (packets == max_packets))
                        break;
        }
index 7a31a2b3e0579a44245d579010c1dcffcdeefba1..620dec313d4befe85f9253f2d8a41b0329d05baf 100644 (file)
@@ -395,7 +395,7 @@ daemon_serviceloop(SOCKET sockctrl, int isactive, char *passiveClients,
                        if (sock_send(sockctrl, NULL, (char *) &tls_header,
                            TLS_RECORD_HEADER_LEN, errbuf, PCAP_ERRBUF_SIZE) == -1)
                        {
-                               // That failed; log a messsage and give up.
+                               // That failed; log a message and give up.
                                rpcapd_log(LOGPRIO_ERROR, "Send to client failed: %s", errbuf);
                                goto end;
                        }
@@ -405,7 +405,7 @@ daemon_serviceloop(SOCKET sockctrl, int isactive, char *passiveClients,
                        if (sock_send(sockctrl, NULL, (char *) &tls_alert,
                            TLS_ALERT_LEN, errbuf, PCAP_ERRBUF_SIZE) == -1)
                        {
-                               // That failed; log a messsage and give up.
+                               // That failed; log a message and give up.
                                rpcapd_log(LOGPRIO_ERROR, "Send to client failed: %s", errbuf);
                                goto end;
                        }
@@ -1377,7 +1377,7 @@ daemon_msg_auth_req(struct daemon_slpars *pars, uint32 plen)
        // Send the reply.
        if (sock_send(pars->sockctrl, pars->ssl, sendbuf, sendbufidx, errbuf, PCAP_ERRBUF_SIZE) == -1)
        {
-               // That failed; log a messsage and give up.
+               // That failed; log a message and give up.
                rpcapd_log(LOGPRIO_ERROR, "Send to client failed: %s", errbuf);
                return -1;
        }
@@ -2423,7 +2423,7 @@ daemon_msg_updatefilter_req(uint8 ver, struct daemon_slpars *pars,
 
        if (sock_send(pars->sockctrl, pars->ssl, (char *) &header, sizeof (struct rpcap_header), pcap_geterr(session->fp), PCAP_ERRBUF_SIZE))
        {
-               // That failed; log a messsage and give up.
+               // That failed; log a message and give up.
                rpcapd_log(LOGPRIO_ERROR, "Send to client failed: %s", errbuf);
                return -1;
        }
@@ -2473,7 +2473,7 @@ daemon_msg_setsampling_req(uint8 ver, struct daemon_slpars *pars, uint32 plen,
 
        if (sock_send(pars->sockctrl, pars->ssl, (char *) &header, sizeof (struct rpcap_header), errbuf, PCAP_ERRBUF_SIZE) == -1)
        {
-               // That failed; log a messsage and give up.
+               // That failed; log a message and give up.
                rpcapd_log(LOGPRIO_ERROR, "Send to client failed: %s", errbuf);
                return -1;
        }
index 206181e7097ca0fb89555ae64977ec88b652f52e..b91a401e976e005b75b10b317b51a56f4e3930c6 100644 (file)
@@ -1161,7 +1161,7 @@ accept_connection(SOCKET listen_sock)
                        break;
                }
 
-               // The accept() call can return this error when a signal is catched
+               // The accept() call can return this error when a signal is caught
                // In this case, we have simply to ignore this error code
                // Stevens, pg 124
 #ifdef _WIN32
@@ -1388,7 +1388,7 @@ main_active(void *ptr)
                            hostlist_copy, nullAuthAllowed, uses_ssl);
                }
 
-               // If the connection is closed by the user explicitely, don't try to connect to it again
+               // If the connection is closed by the user explicitly, don't try to connect to it again
                // just exit the program
                if (activeclose == 1)
                        break;
index 545ac9e35e90f344b11ae965edebcc9bbdeef6e6..4eadd3367968bbde70c1c4669f1794567c4ee929 100644 (file)
@@ -198,7 +198,7 @@ main(int argc, char **argv)
                sigemptyset(&action.sa_mask);
 
                /*
-                * Should SIGINT interrrupt, or restart, system calls?
+                * Should SIGINT interrupt, or restart, system calls?
                 */
                action.sa_flags = sigrestart ? SA_RESTART : 0;
 
index 854dceb8e40082cd9f4cb32145acc76ff1048232..690a63bdc433878e5980801981bc82ed2aed6c9d 100644 (file)
@@ -45,7 +45,7 @@ int main(int argc, char** argv)
         return 2;
     }
 
-    //lauch fuzzer
+    //launch fuzzer
     LLVMFuzzerTestOneInput(Data, Size);
     free(Data);
     fclose(fp);