Home | History | Annotate | Download | only in dhcpcd

Lines Matching refs:arg

169 #define parse_string(buf, len, arg) parse_string_hwaddr(buf, len, arg, 0)
276 splitv(int *argc, char **argv, const char *arg)
279 char *o = xstrdup(arg), *p, *t;
292 parse_addr(struct in_addr *addr, struct in_addr *net, const char *arg)
297 if (arg == NULL || *arg == '\0') {
304 if ((p = strchr(arg, '/')) != NULL) {
315 if (addr != NULL && inet_aton(arg, addr) == 0) {
316 syslog(LOG_ERR, "`%s' is not a valid IP address", arg);
327 parse_option(struct if_options *ifo, int opt, const char *arg)
348 strlcpy(ifo->script, arg, sizeof(ifo->script));
354 add_environ(ifo, arg, 1);
357 if (arg) {
359 HOSTNAME_MAX_LEN, arg);
377 if (arg)
379 VENDORCLASSID_MAX_LEN, arg);
392 if (*arg == '-') {
398 ifo->leasetime = (uint32_t)strtol(arg, NULL, 0);
400 syslog(LOG_ERR, "`%s' out of range", arg);
405 ifo->metric = atoint(arg);
412 if (make_option_mask(ifo->requestmask, arg, 1) != 0) {
413 syslog(LOG_ERR, "unknown option `%s'", arg);
424 if (parse_addr(&ifo->req_addr, NULL, arg) != 0)
430 if (arg && *arg != '\0') {
432 arg) != 0)
442 ifo->timeout = atoint(arg);
452 s, arg);
463 p = strchr(arg, ',');
470 if (p == arg) {
471 arg++;
473 VENDOR_MAX_LEN, arg);
490 i = atoint(arg);
491 arg = p + 1;
498 if (inet_aton(arg, &addr) == 1) {
507 ifo->vendor[0] + 3, s, arg);
523 ifo->reboot = atoint(arg);
530 ifav = splitv(&ifac, ifav, arg);
542 while ((p = strchr(arg, ',')))
544 s = strlen("skip_hooks=") + strlen(arg) + 1;
546 snprintf(p, s, "skip_hooks=%s", arg);
557 if (!arg) {
561 if (strcmp(arg, "none") == 0)
563 else if (strcmp(arg, "ptr") == 0)
565 else if (strcmp(arg, "both") == 0)
567 else if (strcmp(arg, "disable") == 0)
570 syslog(LOG_ERR, "invalid value `%s' for FQDN", arg);
583 if (arg)
585 CLIENTID_MAX_LEN, arg, 1);
605 if (make_option_mask(ifo->requestmask, arg, -1) != 0 ||
606 make_option_mask(ifo->requiremask, arg, -1) != 0 ||
607 make_option_mask(ifo->nomask, arg, 1) != 0)
609 syslog(LOG_ERR, "unknown option `%s'", arg);
614 if (make_option_mask(ifo->requiremask, arg, 1) != 0 ||
615 make_option_mask(ifo->requestmask, arg, 1) != 0)
617 syslog(LOG_ERR, "unknown option `%s'", arg);
622 p = strchr(arg, '=');
628 if (strncmp(arg, "ip_address=", strlen("ip_address=")) == 0) {
634 } else if (strncmp(arg, "routes=", strlen("routes=")) == 0 ||
635 strncmp(arg, "static_routes=", strlen("static_routes=")) == 0 ||
636 strncmp(arg, "classless_static_routes=", strlen("classless_static_routes=")) == 0 ||
637 strncmp(arg, "ms_classless_static_routes=", strlen("ms_classless_static_routes=")) == 0)
660 } else if (strncmp(arg, "routers=", strlen("routers=")) == 0) {
679 if (strncmp(ifo->config[s], arg,
680 p - arg) == 0)
683 ifo->config[s] = xstrdup(arg);
691 ifo->config[s] = xstrdup(arg);
696 if (parse_addr(&addr, &addr2, arg) != 0)
698 if (strchr(arg, '/') == NULL)
706 if (parse_addr(&addr, &addr2, arg) != 0)
708 if (strchr(arg, '/') == NULL)
716 ifdv = splitv(&ifdc, ifdv, arg);
719 if (parse_addr(&addr, NULL, arg) != 0)
726 if (make_option_mask(ifo->dstmask, arg, 2) != 0) {
729 " an IPv4 address", arg);
731 syslog(LOG_ERR, "unknown option `%s'", arg);
737 ifo->fallback = xstrdup(arg);