「🏗️」 wip: wtf is this
This commit is contained in:
@ -1,15 +1,27 @@
|
||||
#pragma once
|
||||
|
||||
#include <stdint.h>
|
||||
typedef struct {
|
||||
struct options{
|
||||
char *name;
|
||||
char opt;
|
||||
char *doc;
|
||||
uint8_t arg_nb;
|
||||
uint8_t grp;
|
||||
} options_t;
|
||||
};
|
||||
|
||||
static options_t options[] = {
|
||||
typedef enum {
|
||||
USAGE,
|
||||
HELP,
|
||||
VERSION,
|
||||
VERBOSE,
|
||||
COUNT,
|
||||
SIZE,
|
||||
TIMEOUT,
|
||||
LINGER,
|
||||
INTERVAL
|
||||
} options_nb_t;
|
||||
|
||||
static struct options options[] = {
|
||||
#define GRP 0 // AKA random useless sh*t
|
||||
{"usage", 'u', "give a short usage message", 0, GRP},
|
||||
{"help", '?', "give this help list", 0, GRP},
|
||||
@ -22,12 +34,12 @@ static options_t options[] = {
|
||||
{"count", 'c', "stop after sending NUMBER packets", 1, GRP},
|
||||
{"size", 's', "send NUMBER data octets", 1, GRP},
|
||||
{"timeout", 'w', "stop after N seconds", 1, GRP},
|
||||
{"ttl", 't', "specify N as time-to-live", 1, GRP},
|
||||
{"linger", 'W', "number of seconds to wait for response", 1, GRP},
|
||||
{"interval", 'i', "wait NUMBER seconds between sending each packet", 1, GRP}
|
||||
#undef GRP
|
||||
};
|
||||
|
||||
#define OPT_NB 9
|
||||
#define OPT_NB 10
|
||||
|
||||
#define FT_PING_V "0.1"
|
||||
|
||||
|
Reference in New Issue
Block a user