str2int
static int str2int(const char *, const char *, int, int);
class = str2int(optarg, "traffic class", 0,
first_ttl = str2int(optarg, "first ttl", 1, MAXTTL);
flow = str2int(optarg, "flow label", 0, MAX_FLOW_LABEL);
max_ttl = str2int(optarg, "max ttl(hop limit)", 1,
port = str2int(optarg, "port", 1, MAX_PORT);
max_timeout = str2int(optarg, "max timeout", 1, -1);
nprobes = str2int(optarg, "nprobes", 1, -1);
tos = (uchar_t)str2int(optarg, "tos", 0, MAX_TOS);
waittime = str2int(optarg, "wait time", 2, -1);
packlen_input = str2int(argv[optind + 1],
if (!str2int(argv[optind], &key)) {
if (!str2int(arg, &key))
if (!str2int(optarg, &vid) || vid < 1 || vid > 4094)
static boolean_t str2int(const char *, int *);
if (!str2int(argv[optind], &key)) {
if (!str2int(optarg, (int *)&vrid) ||
if (!str2int(optarg, &vid) || vid < 1 || vid > 4094)
if (!str2int(optarg, &timeout) || timeout < 0)
if (!str2int(optarg, &cfg.forward_delay) ||
if (!str2int(optarg, &cfg.force_version) ||
if (!str2int(optarg, &cfg.hello_time) ||
if (!str2int(optarg, &cfg.max_age) ||
if (!str2int(optarg, &cfg.bridge_priority) ||
if (!str2int(optarg, &interval) || interval == 0)