Home | History | Annotate | Download | only in dhcpcd

Lines Matching refs:opt

166 	const struct dhcp_opt *opt;
168 for (opt = dhcp_opts; opt->option; opt++)
169 if (opt->var)
170 printf("%03d %s\n", opt->option, opt->var);
176 const struct dhcp_opt *opt;
182 for (opt = dhcp_opts; opt->option; opt++) {
183 if (!opt->var)
186 if (strcmp(opt->var, token) == 0)
192 if (opt->option == n)
198 opt->option);
201 opt->option);
205 if (!opt->option) {
217 const struct dhcp_opt *opt;
223 for (opt = dhcp_opts; opt->option; opt++) {
224 if (opt->option != option)
228 *type = opt->type;
230 if (opt->type == 0 || opt->type & STRING || opt->type & RFC3442)
234 if (opt->type & UINT32 || opt->type & IPV4)
236 if (opt->type & UINT16)
238 if (opt->type & UINT8)
240 if (opt->type & IPV4 || opt->type & ARRAY)
255 #define get_option_raw(dhcp, opt) get_option(dhcp, opt, NULL, NULL)
257 get_option(const struct dhcp_message *dhcp, uint8_t opt, int *len, int *type)
270 if (o == opt) {
313 if (valid_length(opt, bl, type) == -1) {
768 const struct dhcp_opt *opt;
938 for (opt = dhcp_opts; opt->option; opt++) {
939 if (!(opt->type & REQUEST ||
940 has_option_mask(options->requestmask, opt->option)))
942 switch (opt->option) {
949 *p++ = opt->option;
1211 const struct dhcp_opt *opt;
1220 for (opt = dhcp_opts; opt->option; opt++) {
1221 if (!opt->var)
1223 if (has_option_mask(options->nomask, opt->option))
1225 if (get_option_raw(dhcp, opt->option))
1263 for (opt = dhcp_opts; opt->option; opt++) {
1264 if (!opt->var)
1266 if (has_option_mask(options->nomask, opt->option))
1269 p = get_option(dhcp, opt->option, &pl, NULL);
1273 if (opt->option == DHO_FQDN) {
1277 len = print_option(NULL, 0, opt->type, pl, p);
1280 e = strlen(prefix) + strlen(opt->var) + len + 4;
1282 v += snprintf(val, e, "%s_%s=", prefix, opt->var);
1284 print_option(v, len, opt->type, pl, p);