44 #define PING_DEFAULT_SIZE 64 47 #define PING_DEFAULT_TIMEOUT TICKS_PER_SEC int parse_integer(char *text, unsigned int *value)
Parse integer value.
struct arbelprm_rc_send_wqe rc
unsigned int size
Payload length.
int optind
Current option index.
int parse_timeout(char *text, unsigned long *value)
Parse timeout value (in ms)
static int ping_exec(int argc, char **argv)
The "ping" command.
#define PING_DEFAULT_SIZE
Default payload length.
Parse command-line options.
static struct option_descriptor ping_opts[]
"ping" option list
FILE_LICENCE(GPL2_OR_LATER_OR_UBDL)
int reparse_options(int argc, char **argv, struct command_descriptor *cmd, void *opts)
Reparse command-line options.
int parse_flag(char *text __unused, int *flag)
Parse flag.
unsigned int count
Number of packets to send (or zero for no limit)
Command line option parsing.
Option does not take an argument.
unsigned long timeout
Timeout (in ms)
static union @437 opts
"cert<xxx>" option list
const char * name
Name of the command.
#define PING_DEFAULT_TIMEOUT
Default timeout.
static struct command_descriptor ping_cmd
"ping" command descriptor
#define OPTION_DESC(_longopt, _shortopt, _has_arg, _struct, _field, _parse)
Construct option descriptor.
Option requires an argument.
uint16_t count
Number of entries.
A command-line option descriptor.
uint8_t size
Entry size (in 32-bit words)
#define COMMAND_DESC(_struct, _options, _min_args, _max_args, _usage)
Construct command descriptor.
struct command ping_command __command
Ping command.
int ping(const char *hostname, unsigned long timeout, size_t len, unsigned int count, int quiet)
Ping a host.
void * memset(void *dest, int character, size_t len) __nonnull