• Home
  • Raw
  • Download

Lines Matching refs:iter

212 static void genl_op_from_split(struct genl_op_iter *iter)  in genl_op_from_split()  argument
214 const struct genl_family *family = iter->family; in genl_op_from_split()
217 i = iter->entry_idx - family->n_ops - family->n_small_ops; in genl_op_from_split()
220 iter->doit = family->split_ops[i + cnt]; in genl_op_from_split()
221 genl_op_fill_in_reject_policy_split(family, &iter->doit); in genl_op_from_split()
224 memset(&iter->doit, 0, sizeof(iter->doit)); in genl_op_from_split()
229 iter->dumpit = family->split_ops[i + cnt]; in genl_op_from_split()
230 genl_op_fill_in_reject_policy_split(family, &iter->dumpit); in genl_op_from_split()
233 memset(&iter->dumpit, 0, sizeof(iter->dumpit)); in genl_op_from_split()
237 iter->entry_idx += cnt; in genl_op_from_split()
334 genl_op_iter_init(const struct genl_family *family, struct genl_op_iter *iter) in genl_op_iter_init() argument
336 iter->family = family; in genl_op_iter_init()
337 iter->cmd_idx = 0; in genl_op_iter_init()
338 iter->entry_idx = 0; in genl_op_iter_init()
340 iter->flags = 0; in genl_op_iter_init()
342 return iter->family->n_ops + in genl_op_iter_init()
343 iter->family->n_small_ops + in genl_op_iter_init()
344 iter->family->n_split_ops; in genl_op_iter_init()
347 static bool genl_op_iter_next(struct genl_op_iter *iter) in genl_op_iter_next() argument
349 const struct genl_family *family = iter->family; in genl_op_iter_next()
353 if (iter->entry_idx < family->n_ops) { in genl_op_iter_next()
354 genl_op_from_full(family, iter->entry_idx, &op); in genl_op_iter_next()
355 } else if (iter->entry_idx < family->n_ops + family->n_small_ops) { in genl_op_iter_next()
356 genl_op_from_small(family, iter->entry_idx - family->n_ops, in genl_op_iter_next()
358 } else if (iter->entry_idx < in genl_op_iter_next()
362 genl_op_from_split(iter); in genl_op_iter_next()
367 iter->cmd_idx++; in genl_op_iter_next()
370 iter->entry_idx++; in genl_op_iter_next()
372 genl_cmd_full_to_split(&iter->doit, family, in genl_op_iter_next()
374 genl_cmd_full_to_split(&iter->dumpit, family, in genl_op_iter_next()
378 iter->cmd = iter->doit.cmd | iter->dumpit.cmd; in genl_op_iter_next()
379 iter->flags = iter->doit.flags | iter->dumpit.flags; in genl_op_iter_next()
390 static unsigned int genl_op_iter_idx(struct genl_op_iter *iter) in genl_op_iter_idx() argument
392 return iter->cmd_idx; in genl_op_iter_idx()