Lines Matching refs:ndopts
202 nd6_option_init(void *opt, int icmp6len, union nd_opts *ndopts) in nd6_option_init() argument
205 memset(ndopts, 0, sizeof(*ndopts)); in nd6_option_init()
206 ndopts->nd_opts_search = (struct nd_opt_hdr *)opt; in nd6_option_init()
207 ndopts->nd_opts_last in nd6_option_init()
211 ndopts->nd_opts_done = 1; in nd6_option_init()
212 ndopts->nd_opts_search = NULL; in nd6_option_init()
220 nd6_option(union nd_opts *ndopts) in nd6_option() argument
225 KASSERT(ndopts != NULL); in nd6_option()
226 KASSERT(ndopts->nd_opts_last != NULL); in nd6_option()
228 if (ndopts->nd_opts_search == NULL) in nd6_option()
230 if (ndopts->nd_opts_done) in nd6_option()
233 nd_opt = ndopts->nd_opts_search; in nd6_option()
236 if ((void *)&nd_opt->nd_opt_len >= (void *)ndopts->nd_opts_last) { in nd6_option()
237 memset(ndopts, 0, sizeof(*ndopts)); in nd6_option()
247 memset(ndopts, 0, sizeof(*ndopts)); in nd6_option()
251 ndopts->nd_opts_search = (struct nd_opt_hdr *)((char *)nd_opt + olen); in nd6_option()
252 if (ndopts->nd_opts_search > ndopts->nd_opts_last) { in nd6_option()
254 memset(ndopts, 0, sizeof(*ndopts)); in nd6_option()
256 } else if (ndopts->nd_opts_search == ndopts->nd_opts_last) { in nd6_option()
258 ndopts->nd_opts_done = 1; in nd6_option()
259 ndopts->nd_opts_search = NULL; in nd6_option()
270 nd6_options(union nd_opts *ndopts) in nd6_options() argument
275 KASSERT(ndopts != NULL); in nd6_options()
276 KASSERT(ndopts->nd_opts_last != NULL); in nd6_options()
278 if (ndopts->nd_opts_search == NULL) in nd6_options()
282 nd_opt = nd6_option(ndopts); in nd6_options()
283 if (nd_opt == NULL && ndopts->nd_opts_last == NULL) { in nd6_options()
289 memset(ndopts, 0, sizeof(*ndopts)); in nd6_options()
302 if (ndopts->nd_opt_array[nd_opt->nd_opt_type]) { in nd6_options()
308 ndopts->nd_opt_array[nd_opt->nd_opt_type] in nd6_options()
313 if (ndopts->nd_opt_array[nd_opt->nd_opt_type] == 0) { in nd6_options()
314 ndopts->nd_opt_array[nd_opt->nd_opt_type] in nd6_options()
317 ndopts->nd_opts_pi_end = in nd6_options()
338 if (ndopts->nd_opts_done) in nd6_options()