Lines Matching refs:ndopts
389 nd6_option_init(void *opt, int icmp6len, union nd_opts *ndopts) in nd6_option_init() argument
392 bzero(ndopts, sizeof(*ndopts)); in nd6_option_init()
393 ndopts->nd_opts_search = (struct nd_opt_hdr *)opt; in nd6_option_init()
394 ndopts->nd_opts_last in nd6_option_init()
398 ndopts->nd_opts_done = 1; in nd6_option_init()
399 ndopts->nd_opts_search = NULL; in nd6_option_init()
407 nd6_option(union nd_opts *ndopts) in nd6_option() argument
412 KASSERT(ndopts != NULL, ("%s: ndopts == NULL", __func__)); in nd6_option()
413 KASSERT(ndopts->nd_opts_last != NULL, ("%s: uninitialized ndopts", in nd6_option()
415 if (ndopts->nd_opts_search == NULL) in nd6_option()
417 if (ndopts->nd_opts_done) in nd6_option()
420 nd_opt = ndopts->nd_opts_search; in nd6_option()
423 if ((caddr_t)&nd_opt->nd_opt_len >= (caddr_t)ndopts->nd_opts_last) { in nd6_option()
424 bzero(ndopts, sizeof(*ndopts)); in nd6_option()
434 bzero(ndopts, sizeof(*ndopts)); in nd6_option()
438 ndopts->nd_opts_search = (struct nd_opt_hdr *)((caddr_t)nd_opt + olen); in nd6_option()
439 if (ndopts->nd_opts_search > ndopts->nd_opts_last) { in nd6_option()
441 bzero(ndopts, sizeof(*ndopts)); in nd6_option()
443 } else if (ndopts->nd_opts_search == ndopts->nd_opts_last) { in nd6_option()
445 ndopts->nd_opts_done = 1; in nd6_option()
446 ndopts->nd_opts_search = NULL; in nd6_option()
457 nd6_options(union nd_opts *ndopts) in nd6_options() argument
462 KASSERT(ndopts != NULL, ("%s: ndopts == NULL", __func__)); in nd6_options()
463 KASSERT(ndopts->nd_opts_last != NULL, ("%s: uninitialized ndopts", in nd6_options()
465 if (ndopts->nd_opts_search == NULL) in nd6_options()
469 nd_opt = nd6_option(ndopts); in nd6_options()
470 if (nd_opt == NULL && ndopts->nd_opts_last == NULL) { in nd6_options()
476 bzero(ndopts, sizeof(*ndopts)); in nd6_options()
489 if (ndopts->nd_opt_array[nd_opt->nd_opt_type]) { in nd6_options()
495 ndopts->nd_opt_array[nd_opt->nd_opt_type] in nd6_options()
500 if (ndopts->nd_opt_array[nd_opt->nd_opt_type] == 0) { in nd6_options()
501 ndopts->nd_opt_array[nd_opt->nd_opt_type] in nd6_options()
504 ndopts->nd_opts_pi_end = in nd6_options()
533 if (ndopts->nd_opts_done) in nd6_options()