+ if (ia_pd_mode == IA_MODE_NONE)
+ ia_pd_mode = IA_MODE_TRY;
+
+ if (allow_slaac_only >= 0 && allow_slaac_only < 10)
+ allow_slaac_only = 10;
+
+ char *iaid_begin;
+ int iaid_len = 0;
+
+ int prefix_length = strtoul(optarg, &iaid_begin, 10);
+
+ if (*iaid_begin != '\0' && *iaid_begin != ',' && *iaid_begin != ':') {
+ syslog(LOG_ERR, "invalid argument: '%s'", optarg);
+ return 1;
+ }
+
+ struct odhcp6c_request_prefix prefix = { 0, prefix_length };
+
+ if (*iaid_begin == ',' && (iaid_len = strlen(iaid_begin)) > 1)
+ memcpy(&prefix.iaid, iaid_begin + 1, iaid_len > 4 ? 4 : iaid_len);
+ else if (*iaid_begin == ':')
+ prefix.iaid = htonl((uint32_t)strtoul(&iaid_begin[1], NULL, 16));
+ else
+ prefix.iaid = htonl(++ia_pd_iaid_index);
+
+ odhcp6c_add_state(STATE_IA_PD_INIT, &prefix, sizeof(prefix));
+
+ break;
+
+ case 'F':
+ allow_slaac_only = -1;
+ ia_pd_mode = IA_MODE_FORCE;
+ break;
+
+#ifdef EXT_BFD_PING
+ case 'B':
+ bfd_interval = atoi(optarg);