From: Francois-Xavier Le Bail Date: Sat, 12 Dec 2020 14:58:48 +0000 (+0100) Subject: Fix some typos X-Git-Tag: libpcap-1.10-bp~16 X-Git-Url: https://git.tcpdump.org/libpcap/commitdiff_plain/cb69b4d7bd006559e501ac1bdf7f92e12579a4b3 Fix some typos [skip ci] --- diff --git a/CHANGES b/CHANGES index e4b39125..612833af 100644 --- a/CHANGES +++ b/CHANGES @@ -336,7 +336,7 @@ Summary for 1.3.0 libpcap release Friday December 9, 2011. guy@alum.mit.edu. 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 diff --git a/aclocal.m4 b/aclocal.m4 index 0523f7c5..786423bf 100644 --- a/aclocal.m4 +++ b/aclocal.m4 @@ -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. # diff --git a/atmuni31.h b/atmuni31.h index 0f854300..7d4f270b 100644 --- a/atmuni31.h +++ b/atmuni31.h @@ -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 */ diff --git a/configure b/configure index 49633861..d85be30f 100755 --- 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. # diff --git a/optimize.c b/optimize.c index 2c9c4b39..610a0303 100644 --- a/optimize.c +++ b/optimize.c @@ -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; diff --git a/pcap-bpf.c b/pcap-bpf.c index 881ce196..f0ccb965 100644 --- a/pcap-bpf.c +++ b/pcap-bpf.c @@ -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; diff --git a/pcap-dlpi.c b/pcap-dlpi.c index abba8aef..208a63bc 100644 --- a/pcap-dlpi.c +++ b/pcap-dlpi.c @@ -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); } diff --git a/pcap-dpdk.c b/pcap-dpdk.c index 837ad1c2..765abe59 100644 --- a/pcap-dpdk.c +++ b/pcap-dpdk.c @@ -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; diff --git a/pcap-linux.c b/pcap-linux.c index 10997abe..74816892 100644 --- a/pcap-linux.c +++ b/pcap-linux.c @@ -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; diff --git a/pcap-netfilter-linux.c b/pcap-netfilter-linux.c index cdd6d7fc..17f528fc 100644 --- a/pcap-netfilter-linux.c +++ b/pcap-netfilter-linux.c @@ -56,13 +56,13 @@ #include #include -/* 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" diff --git a/pcap-npf.c b/pcap-npf.c index a4ee1d9c..ad204e75 100644 --- a/pcap-npf.c +++ b/pcap-npf.c @@ -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) { diff --git a/pcap-pf.c b/pcap-pf.c index f483a0e6..4563a225 100644 --- 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 diff --git a/pcap-rpcap.c b/pcap-rpcap.c index a480f9e0..a2612e99 100644 --- a/pcap-rpcap.c +++ b/pcap-rpcap.c @@ -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', diff --git a/pcap-sita.html b/pcap-sita.html index d9b7376e..33f1e10f 100644 --- a/pcap-sita.html +++ b/pcap-sita.html @@ -22,7 +22,7 @@ A { text-decoration:none }
    Note: This document is part of the libpcap Git and was derived from 'pcap.3' (circa Aug/07).

    - 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.

    @@ -362,7 +362,7 @@ A { text-decoration:none } SMP -> IOP 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. IOP @@ -719,7 +719,7 @@ A { text-decoration:none } ps_ifdrop 4 - The number of packets dropped by the network inteface + The number of packets dropped by the network interface (regardless of whether they would have passed the input filter). diff --git a/pcap-usb-linux.c b/pcap-usb-linux.c index 9e7e8404..3596428e 100644 --- a/pcap-usb-linux.c +++ b/pcap-usb-linux.c @@ -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; } diff --git a/rpcapd/daemon.c b/rpcapd/daemon.c index 7a31a2b3..620dec31 100644 --- a/rpcapd/daemon.c +++ b/rpcapd/daemon.c @@ -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; } diff --git a/rpcapd/rpcapd.c b/rpcapd/rpcapd.c index 206181e7..b91a401e 100644 --- a/rpcapd/rpcapd.c +++ b/rpcapd/rpcapd.c @@ -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; diff --git a/testprogs/capturetest.c b/testprogs/capturetest.c index 545ac9e3..4eadd336 100644 --- a/testprogs/capturetest.c +++ b/testprogs/capturetest.c @@ -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; diff --git a/testprogs/fuzz/onefile.c b/testprogs/fuzz/onefile.c index 854dceb8..690a63bd 100644 --- a/testprogs/fuzz/onefile.c +++ b/testprogs/fuzz/onefile.c @@ -45,7 +45,7 @@ int main(int argc, char** argv) return 2; } - //lauch fuzzer + //launch fuzzer LLVMFuzzerTestOneInput(Data, Size); free(Data); fclose(fp);