/* A unique value for matching command requests with replies */
int token;
- /* Text indiciating the command type, or reply type */
+ /* Text indicating the command type, or reply type */
char *command_name;
/* The number of key, value argument pairs used */
#include "wait.h"
-/* Drop SUID privileges. To be used after accquiring raw sockets. */
+/* Drop SUID privileges. To be used after acquiring raw sockets. */
static
int drop_elevated_permissions(
void)
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
#
-'''Test sending probes and receiving respones.'''
+'''Test sending probes and receiving responses.'''
import socket
import sys
'Test timeouts when sending to a non-existant address'
#
- # Probe a non-existant address, and expect no reply
+ # Probe a non-existent address, and expect no reply
#
# I'm not sure what the best way to find an address that doesn't
# exist, but is still route-able. If we use a reserved IP
const char *local_ip_type;
const char *protocol = NULL;
- /* Conver the remote IP address to a string */
+ /* Convert the remote IP address to a string */
if (inet_ntop(ctl->af, address, ip_string, INET6_ADDRSTRLEN) == NULL) {
display_close(ctl);
/*
We may have multiple completed replies. Loop until we don't
- have any more newlines termininating replies.
+ have any more newlines terminating replies.
*/
while (true) {
/* If no newline is found, our reply isn't yet complete */
reply_buffer = cmdpipe->reply_buffer;
/*
- Read the available reply text, up to the the remaining
+ Read the available reply text, up to the remaining
buffer space. (Minus one for the terminating NUL.)
*/
read_buffer = &reply_buffer[cmdpipe->reply_buffer_used];
format_number(n, 5, dst);
} else if (strchr(format, 'f')) {
/* this is for fields where we measure integer microseconds but
- display floating point miliseconds. Convert to float here. */
+ display floating point milliseconds. Convert to float here. */
snprintf(dst, dst_length, format, n / 1000.0);
/* this was marked as a temporary hack over 10 years ago. -- REW */
} else {
if (j < 0)
continue;
- /* 1000.0 is a temporay hack for stats usec to ms, impacted net_loss. */
+ /* 1000.0 is a temporary hack for stats usec to ms, impacted net_loss. */
if (strchr(data_fields[j].format, 'f')) {
snprintf(buf + len, sizeof(buf), data_fields[j].format,
data_fields[j].net_xxx(at) / 1000.0);
if (ret == -1)
goto on_error;
- printf("\n"); // bash promt should be on new line
+ printf("\n"); // bash prompt should be on new line
json_decref(jreport);
return;
on_error:
title = "Loss";
}
- /* 1000.0 is a temporay hack for stats usec to ms, impacted net_loss. */
+ /* 1000.0 is a temporary hack for stats usec to ms, impacted net_loss. */
if (strchr(data_fields[j].format, 'f')) {
printf(name,
title, data_fields[j].net_xxx(at) / 1000.0, title);
if (j < 0)
continue;
- /* 1000.0 is a temporay hack for stats usec to ms, impacted net_loss. */
+ /* 1000.0 is a temporary hack for stats usec to ms, impacted net_loss. */
if (strchr(data_fields[j].format, 'f')) {
printf(",%.2f",
(double) (data_fields[j].net_xxx(at) / 1000.0));
_exit(EXIT_FAILURE);
}
-/* ctime() replacement that will reteturn ISO-8601 timestamp string such as:
+/* ctime() replacement that will return ISO-8601 timestamp string such as:
* 2016-08-29T19:25:02+01:00 */
const char *iso_time(
const time_t * t)