Lines Matching refs:arg

173 #define parse_string(buf, len, arg) parse_string_hwaddr(buf, len, arg, 0)
280 splitv(int *argc, char **argv, const char *arg)
283 char *o = xstrdup(arg), *p, *t;
296 parse_addr(struct in_addr *addr, struct in_addr *net, const char *arg)
301 if (arg == NULL || *arg == '\0') {
308 if ((p = strchr(arg, '/')) != NULL) {
319 if (addr != NULL && inet_aton(arg, addr) == 0) {
320 syslog(LOG_ERR, "`%s' is not a valid IP address", arg);
331 parse_option(struct if_options *ifo, int opt, const char *arg)
352 strlcpy(ifo->script, arg, sizeof(ifo->script));
358 add_environ(ifo, arg, 1);
361 if (arg) {
363 HOSTNAME_MAX_LEN, arg);
381 if (arg)
383 VENDORCLASSID_MAX_LEN, arg);
396 if (*arg == '-') {
402 ifo->leasetime = (uint32_t)strtol(arg, NULL, 0);
404 syslog(LOG_ERR, "`%s' out of range", arg);
409 ifo->metric = atoint(arg);
416 if (make_option_mask(ifo->requestmask, arg, 1) != 0) {
417 syslog(LOG_ERR, "unknown option `%s'", arg);
428 if (parse_addr(&ifo->req_addr, NULL, arg) != 0)
434 if (arg && *arg != '\0') {
436 arg) != 0)
446 ifo->timeout = atoint(arg);
456 s, arg);
467 p = strchr(arg, ',');
474 if (p == arg) {
475 arg++;
477 VENDOR_MAX_LEN, arg);
494 i = atoint(arg);
495 arg = p + 1;
502 if (inet_aton(arg, &addr) == 1) {
511 ifo->vendor[0] + 3, s, arg);
527 ifo->reboot = atoint(arg);
534 ifav = splitv(&ifac, ifav, arg);
546 while ((p = strchr(arg, ',')))
548 s = strlen("skip_hooks=") + strlen(arg) + 1;
550 snprintf(p, s, "skip_hooks=%s", arg);
561 if (!arg) {
565 if (strcmp(arg, "none") == 0)
567 else if (strcmp(arg, "ptr") == 0)
569 else if (strcmp(arg, "both") == 0)
571 else if (strcmp(arg, "disable") == 0)
574 syslog(LOG_ERR, "invalid value `%s' for FQDN", arg);
587 if (arg)
589 CLIENTID_MAX_LEN, arg, 1);
609 if (make_option_mask(ifo->requestmask, arg, -1) != 0 ||
610 make_option_mask(ifo->requiremask, arg, -1) != 0 ||
611 make_option_mask(ifo->nomask, arg, 1) != 0)
613 syslog(LOG_ERR, "unknown option `%s'", arg);
618 if (make_option_mask(ifo->requiremask, arg, 1) != 0 ||
619 make_option_mask(ifo->requestmask, arg, 1) != 0)
621 syslog(LOG_ERR, "unknown option `%s'", arg);
626 p = strchr(arg, '=');
632 if (strncmp(arg, "ip_address=", strlen("ip_address=")) == 0) {
640 } else if (strncmp(arg, "subnet_mask=", strlen("subnet_mask=")) == 0) {
643 } else if (strncmp(arg, "routes=", strlen("routes=")) == 0 ||
644 strncmp(arg, "static_routes=", strlen("static_routes=")) == 0 ||
645 strncmp(arg, "classless_static_routes=", strlen("classless_static_routes=")) == 0 ||
646 strncmp(arg, "ms_classless_static_routes=", strlen("ms_classless_static_routes=")) == 0)
669 } else if (strncmp(arg, "routers=", strlen("routers=")) == 0) {
688 if (strncmp(ifo->config[s], arg,
689 p - arg) == 0)
692 ifo->config[s] = xstrdup(arg);
700 ifo->config[s] = xstrdup(arg);
705 if (parse_addr(&addr, &addr2, arg) != 0)
707 if (strchr(arg, '/') == NULL)
715 if (parse_addr(&addr, &addr2, arg) != 0)
717 if (strchr(arg, '/') == NULL)
725 ifdv = splitv(&ifdc, ifdv, arg);
728 if (parse_addr(&addr, NULL, arg) != 0)
735 if (make_option_mask(ifo->dstmask, arg, 2) != 0) {
738 " an IPv4 address", arg);
740 syslog(LOG_ERR, "unknown option `%s'", arg);
746 ifo->fallback = xstrdup(arg);