]> git.ipfire.org Git - thirdparty/mtr.git/commitdiff
Updating some comments 354/head
authorAlejandro Leal <ajleal@msn.com>
Fri, 3 Jul 2020 18:53:28 +0000 (14:53 -0400)
committerAlejandro Leal <ajleal@msn.com>
Fri, 3 Jul 2020 18:53:28 +0000 (14:53 -0400)
13 files changed:
packet/cmdparse.c
packet/construct_unix.c
packet/probe.h
packet/probe_cygwin.c
packet/probe_unix.c
packet/probe_unix.h
packet/wait_unix.c
test/packet_listen.c
test/param.py
test/probe.py
ui/cmdpipe.c
ui/dns.c
ui/net.c

index 76e6c914b527141d841b58d54eec47a6f7b3cddc..85757b622b98f82a5541d1309545df8f8051d756 100644 (file)
@@ -66,8 +66,8 @@ int tokenize_command(
     structure for later semantic interpretation.  Returns EINVAL if the
     command string is unparseable or zero for success.
 
-    comamnd_string will be modified in-place with NUL characters terminating
-    tokens, and the command_t will use pointers to the conents of
+    command_string will be modified in-place with NUL characters terminating
+    tokens, and the command_t will use pointers to the contents of
     command_string without copying, so any interpretation of the
     command_t structure requires that the command_string memory has not yet
     been freed or otherwise reused.
index 09250bcc945c1a6dc745eeb613e684fbab920191..dff17d82b3ec77db8e8bceb2b7ce09666559046c 100644 (file)
@@ -724,7 +724,7 @@ int construct_ip6_packet(
     /*
        Check the current socket address, and if it is the same
        as the source address we intend, we will skip the bind.
-       This is to accomodate Solaris, which, as of Solaris 11.3,
+       This is to accommodate Solaris, which, as of Solaris 11.3,
        will return an EINVAL error on bind if the socket is already
        bound, even if the same address is used.
      */
@@ -754,7 +754,7 @@ int construct_ip6_packet(
         }
     }
 
-    /*  The traffic class in IPv6 is analagous to ToS in IPv4  */
+    /*  The traffic class in IPv6 is analogous to ToS in IPv4  */
     if (setsockopt(send_socket, IPPROTO_IPV6,
                    IPV6_TCLASS, &param->type_of_service, sizeof(int))) {
         return -1;
index 796eb71450375104fc7e422d60c488689fb2c011..e7b8beea9cce49576369632a45a91c0ded15f9d4 100644 (file)
@@ -68,7 +68,7 @@ struct probe_param_t {
     /*  The packet "mark" used for mark-based routing on Linux  */
     int routing_mark;
 
-    /*  Time to live for the transmited probe  */
+    /*  Time to live for the transmitted probe  */
     int ttl;
 
     /*  The packet size (in bytes) including protocol headers  */
index 039e2e3095c363585e15fb02cc926a8024629b16..ab477be6c3c21b69d101fec664945a6e3d7a4abb 100644 (file)
@@ -81,7 +81,7 @@
 
     We use the Cygwin pipe() to create the pipes, but in the ICMP
     service thread we use the Win32 HANDLE that corresponds to the
-    recieving end of the input pipe to wait for ICMP requests.
+    receiving end of the input pipe to wait for ICMP requests.
 */
 
 
@@ -94,7 +94,7 @@ void init_net_state_privileged(
 }
 
 /*
-    Convienience similar to error(), but for reporting Windows
+    Convenience similar to error(), but for reporting Windows
     error codes instead of errno codes.
 */
 void error_win(int exit_code, int win_error, const char *str) {
@@ -717,7 +717,7 @@ void receive_replies(
 }
 
 /*
-    On Windows, an implementation of check_probe_timeout is unnecesary because
+    On Windows, an implementation of check_probe_timeout is unnecessary because
     timeouts are managed by ICMP.DLL, including a call to the I/O completion
     routine when the time fully expires.
 */
index a749f7d7805cc31d429264d0f1d7c9b23434e48b..e77e46f992e89d93d850af7e7f24a7a9893cfa08 100644 (file)
@@ -692,7 +692,7 @@ void receive_probe(
 
 /*
     Read all available packets through our receiving raw socket, and
-    handle any responses to probes we have preivously sent.
+    handle any responses to probes we have previously sent.
 */
 static
 void receive_replies_from_recv_socket(
index cc01e1efde32cf2ba0e9ed8e97339c9e981cee55..0ce7657b4e4038ce953c1e683c89218146184853 100644 (file)
@@ -40,7 +40,7 @@ struct probe_platform_t {
     struct timeval departure_time;
 };
 
-/*  We'll use rack sockets to send and recieve probes on Unix systems  */
+/*  We'll use rack sockets to send and receive probes on Unix systems  */
 struct net_state_platform_t {
     /*  true if we were successful at opening IPv4 sockets  */
     bool ip4_present;
index 06d2ea7973888c67712a3902df5e6f4e28049f5c..ad14238e59368ec1a5513990ce0d3940fab21db0 100644 (file)
@@ -104,7 +104,7 @@ int gather_read_fds(
     Sleep until we receive a new probe response, a new command on the
     command stream, or a probe timeout.  On Unix systems, this means
     we use select to wait on file descriptors for the command stream
-    and the raw recieve socket.
+    and the raw receive socket.
 */
 void wait_for_activity(
     struct command_buffer_t *command_buffer,
index a8227070c76dd1b35e49bc3a950af0b9ee88663c..9a1d931c5310ca306807d8bcec6d3c596487b9c6 100644 (file)
@@ -34,7 +34,7 @@
 #define SEQUENCE_NUM 33000
 
 /*
-    Check to see if the packet we've recieved is intended for this test
+    Check to see if the packet we've received is intended for this test
     process.  We expected the ICMP sequence number to be equal to our
     process ID.
 */
index d22001954b0ba220bd4ce802f77b8825bccf2018..edb8f5c6e171efa1272aaab7aa2337b74c62793f 100755 (executable)
@@ -62,7 +62,7 @@ class TestParameters(mtrpacket.MtrPacketTest):
 
 @unittest.skipIf(sys.platform == 'cygwin', 'No Cygwin test')
 class TestIPv6Parameters(mtrpacket.MtrPacketTest):
-    'Test packet paramter customization for IPv6'
+    'Test packet parameter customization for IPv6'
 
     @unittest.skipUnless(mtrpacket.HAVE_IPV6, 'No IPv6')
     def test_param(self):
index e69214c02b1fe45597c9085bfda1f08dc583709e..b1f0fff15e3c1a01b9b0950bd125373bc0c57bcd 100755 (executable)
@@ -208,7 +208,7 @@ class TestProbeICMPv4(mtrpacket.MtrPacketTest):
     def test_ttl_expired(self):
         'Test sending a probe which will have its time-to-live expire'
 
-        #  Probe Goolge's DNS server, but give the probe only one hop
+        #  Probe Google's DNS server, but give the probe only one hop
         #  to live.
         self.write_command('16 send-probe ip-4 8.8.8.8 ttl 1')
         reply = self.parse_reply()
@@ -220,7 +220,7 @@ class TestProbeICMPv4(mtrpacket.MtrPacketTest):
         '''Test sending multiple probes in parallel
 
         We will expect the probes to complete out-of-order by sending
-        a probe to a distant host immeidately followed by a probe to
+        a probe to a distant host immediately followed by a probe to
         the local host.'''
 
         success_count = 0
@@ -300,7 +300,7 @@ class TestProbeICMPv6(mtrpacket.MtrPacketTest):
     def test_ttl_expired(self):
         'Test sending a probe which will have its time-to-live expire'
 
-        #  Probe Goolge's DNS server, but give the probe only one hop
+        #  Probe Google's DNS server, but give the probe only one hop
         #  to live.
         cmd = '53 send-probe ip-6 ' + self.google_addr + ' ttl 1'
         self.write_command(cmd)
index 2119516ea9287402b34137de53fa300593e5c916..a9197544503d1c4f06a401091a0df05ccece4b9b 100644 (file)
@@ -207,7 +207,7 @@ int check_packet_features(
 
 extern char *myname;
 /*
-    Execute mtr-packet, allowing the MTR_PACKET evironment to override
+    Execute mtr-packet, allowing the MTR_PACKET environment to override
     the PATH when locating the executable.
 */
 static
@@ -755,7 +755,7 @@ void consume_reply_buffer(
         /*
            Terminate the reply string at the newline, which
            is necessary in the case where we are able to read
-           mulitple replies arriving simultaneously.
+           multiple replies arriving simultaneously.
          */
         *end_of_reply = 0;
 
index b0bf1f28af729f73d6295149fc886bb49a80ad2b..7dc888505411cf82aab49bd9e0961ef1830cae88 100644 (file)
--- a/ui/dns.c
+++ b/ui/dns.c
@@ -150,7 +150,7 @@ void dns_open(
             error(EXIT_FAILURE, errno, "signal");
         }
 
-        /* Close all unneccessary FDs.
+        /* Close all unnecessary FDs.
            for debugging and error reporting, keep std-in/out/err. */
         for (i = 3; i < fromdns[1]; i++) {
             if (i == todns[0])
index 830d4ab68cb79f134d3ecb56fb4433dcc41afd47..d2a38b6b65d6316c892008af7de221a2783859b1 100644 (file)
--- a/ui/net.c
+++ b/ui/net.c
@@ -546,7 +546,7 @@ int net_send_batch(
                have a range for "rand()" that runs to 32768, and the 
                destination range is 10000, you end up with 4 out of 32768 
                0-2768's and only 3 out of 32768 for results 2769 .. 9999. 
-               As our detination range (in the example 10000) is much 
+               As our destination range (in the example 10000) is much 
                smaller (reasonable packet sizes), and our rand() range much 
                larger, this effect is insignificant. Oh! That other formula
                didn't work. */