5 static struct argp_option argp_options
[] = {
6 { "dstaddr", 'd', "ADDR", 0,
7 "set destination (peer) address to ADDR" },
8 { "peer", 'p', "ADDR", OPTION_ALIAS
},
12 static error_t
parse_opt (int key
, char *arg
, struct argp_state
*state
);
14 static struct argp argp
=
16 argp_options
, parse_opt
22 do_test (int argc
, char *argv
[])
25 argp_parse (&argp
, argc
, argv
, 0, &remaining
, NULL
);
30 parse_opt (int key
, char *arg
, struct argp_state
*state
)
36 printf ("got '%c' with argument '%s'\n", key
, arg
);
41 case ARGP_KEY_NO_ARGS
:
43 case ARGP_KEY_SUCCESS
:
46 return ARGP_ERR_UNKNOWN
;
48 printf ("invalid key '%x'\n", key
);
54 #define TEST_FUNCTION do_test (argc, argv)
55 #include "../test-skeleton.c"