Lines Matching refs:entry

30 	((void *)((char *)(cb)->data + (cb)->entry->ptroff))
75 const struct xt_option_entry *entry, unsigned int *offset) in xtables_options_xfrm() argument
80 if (entry == NULL) in xtables_options_xfrm()
87 for (num_new = 0; entry[num_new].name != NULL; ++num_new) in xtables_options_xfrm()
109 for (i = 0; i < num_new; ++i, ++mp, ++entry) { in xtables_options_xfrm()
110 mp->name = entry->name; in xtables_options_xfrm()
111 mp->has_arg = entry->type != XTTYPE_NONE; in xtables_options_xfrm()
113 mp->val = entry->id + *offset; in xtables_options_xfrm()
174 const struct xt_option_entry *entry = cb->entry; in xtopt_parse_int() local
175 uintmax_t lmin = 0, lmax = xtopt_max_by_type(entry->type); in xtopt_parse_int()
178 if (cb->entry->min != 0) in xtopt_parse_int()
179 lmin = cb->entry->min; in xtopt_parse_int()
180 if (cb->entry->max != 0) in xtopt_parse_int()
181 lmax = cb->entry->max; in xtopt_parse_int()
187 cb->ext_name, entry->name, lmin, lmax); in xtopt_parse_int()
189 if (entry->type == XTTYPE_UINT8) { in xtopt_parse_int()
191 if (entry->flags & XTOPT_PUT) in xtopt_parse_int()
193 } else if (entry->type == XTTYPE_UINT16) { in xtopt_parse_int()
195 if (entry->flags & XTOPT_PUT) in xtopt_parse_int()
197 } else if (entry->type == XTTYPE_UINT32) { in xtopt_parse_int()
199 if (entry->flags & XTOPT_PUT) in xtopt_parse_int()
201 } else if (entry->type == XTTYPE_UINT64) { in xtopt_parse_int()
203 if (entry->flags & XTOPT_PUT) in xtopt_parse_int()
213 const struct xt_option_entry *entry = cb->entry; in xtopt_parse_float() local
219 (entry->min != entry->max && in xtopt_parse_float()
220 (value < entry->min || value > entry->max))) in xtopt_parse_float()
224 cb->ext_name, entry->name, entry->min, entry->max); in xtopt_parse_float()
227 if (entry->flags & XTOPT_PUT) in xtopt_parse_float()
236 const struct xt_option_entry *entry = cb->entry; in xtopt_mint_value_to_cb() local
240 if (entry->type == XTTYPE_UINT8RC) in xtopt_mint_value_to_cb()
242 else if (entry->type == XTTYPE_UINT16RC) in xtopt_mint_value_to_cb()
244 else if (entry->type == XTTYPE_UINT32RC) in xtopt_mint_value_to_cb()
246 else if (entry->type == XTTYPE_UINT64RC) in xtopt_mint_value_to_cb()
256 const struct xt_option_entry *entry = cb->entry; in xtopt_mint_value_to_ptr() local
259 if (!(entry->flags & XTOPT_PUT)) in xtopt_mint_value_to_ptr()
261 if (entry->type == XTTYPE_UINT8RC) in xtopt_mint_value_to_ptr()
263 else if (entry->type == XTTYPE_UINT16RC) in xtopt_mint_value_to_ptr()
265 else if (entry->type == XTTYPE_UINT32RC) in xtopt_mint_value_to_ptr()
267 else if (entry->type == XTTYPE_UINT64RC) in xtopt_mint_value_to_ptr()
269 data += xtopt_esize_by_type(entry->type); in xtopt_mint_value_to_ptr()
284 const struct xt_option_entry *entry = cb->entry; in xtopt_parse_mint() local
286 size_t esize = xtopt_esize_by_type(entry->type); in xtopt_parse_mint()
287 const uintmax_t lmax = xtopt_max_by_type(entry->type); in xtopt_parse_mint()
294 maxiter = entry->size / esize; in xtopt_parse_mint()
297 if (entry->size % esize != 0) in xtopt_parse_mint()
306 cb->ext_name, entry->name, maxiter); in xtopt_parse_mint()
316 cb->ext_name, entry->name, arg, lmax); in xtopt_parse_mint()
321 cb->ext_name, entry->name, end); in xtopt_parse_mint()
333 const struct xt_option_entry *entry = cb->entry; in xtopt_parse_string() local
337 if (entry->min != 0 && z < entry->min) in xtopt_parse_string()
340 "%u characters\n", entry->min); in xtopt_parse_string()
341 if (entry->max != 0 && z > entry->max) in xtopt_parse_string()
344 "%u characters\n", entry->max); in xtopt_parse_string()
345 if (!(entry->flags & XTOPT_PUT)) in xtopt_parse_string()
347 if (z >= entry->size) in xtopt_parse_string()
348 z = entry->size - 1; in xtopt_parse_string()
415 cb->val.tos_mask = cb->entry->max; in xtopt_parse_tosmask()
438 cb->ext_name, cb->entry->name); in xtopt_parse_markmask()
444 cb->ext_name, cb->entry->name); in xtopt_parse_markmask()
449 cb->ext_name, cb->entry->name); in xtopt_parse_markmask()
457 const struct syslog_level *entry = b; in xtopt_sysloglvl_compare() local
459 return strcmp(name, entry->name); in xtopt_sysloglvl_compare()
487 if (cb->entry->flags & XTOPT_PUT) in xtopt_parse_sysloglevel()
547 if (cb->entry->flags & XTOPT_PUT) in xtopt_parse_host()
590 if (cb->entry->flags & XTOPT_PUT) in xtopt_parse_protocol()
600 const struct xt_option_entry *entry = cb->entry; in xtopt_parse_port() local
608 if (entry->flags & XTOPT_NBO) in xtopt_parse_port()
611 if (entry->flags & XTOPT_PUT) in xtopt_parse_port()
618 const struct xt_option_entry *entry = cb->entry; in xtopt_parse_mport() local
627 maxiter = entry->size / esize; in xtopt_parse_mport()
630 if (entry->size % esize != 0) in xtopt_parse_mport()
642 cb->ext_name, entry->name, maxiter); in xtopt_parse_mport()
653 if (entry->flags & XTOPT_NBO) in xtopt_parse_mport()
664 if (entry->flags & XTOPT_PUT) in xtopt_parse_mport()
703 const struct xt_option_entry *entry = cb->entry; in xtopt_parse_plen() local
716 cb->ext_name, entry->name, 0, cb->val.hlen); in xtopt_parse_plen()
728 const struct xt_option_entry *entry = cb->entry; in xtopt_parse_plenmask() local
753 if (entry->flags & XTOPT_PUT) in xtopt_parse_plenmask()
800 if (cb->entry->flags & XTOPT_PUT) in xtopt_parse_ethermac()
839 const struct xt_option_entry *entry = cb->entry; in xtables_option_parse() local
840 unsigned int eflag = 1 << cb->entry->id; in xtables_option_parse()
848 if ((!(entry->flags & XTOPT_MULTI) || (entry->excl & eflag)) && in xtables_option_parse()
852 cb->ext_name, cb->entry->name); in xtables_option_parse()
853 if (cb->invert && !(entry->flags & XTOPT_INVERT)) in xtables_option_parse()
856 cb->ext_name, entry->name); in xtables_option_parse()
857 if (entry->type != XTTYPE_NONE && optarg == NULL) in xtables_option_parse()
860 cb->ext_name, entry->name); in xtables_option_parse()
867 if (entry->type <= ARRAY_SIZE(xtopt_subparse) && in xtables_option_parse()
868 xtopt_subparse[entry->type] != NULL) in xtables_option_parse()
869 xtopt_subparse[entry->type](cb); in xtables_option_parse()
871 cb->xflags |= 1 << entry->id; in xtables_option_parse()
880 const struct xt_option_entry *entry) in xtables_option_metavalidate() argument
882 for (; entry->name != NULL; ++entry) { in xtables_option_metavalidate()
883 if (entry->id >= CHAR_BIT * sizeof(unsigned int) || in xtables_option_metavalidate()
884 entry->id >= XT_OPTION_OFFSET_SCALE) in xtables_option_metavalidate()
887 name, entry->id); in xtables_option_metavalidate()
888 if (!(entry->flags & XTOPT_PUT)) { in xtables_option_metavalidate()
889 if (entry->ptroff != 0) in xtables_option_metavalidate()
893 "Oversight?", name, entry->name); in xtables_option_metavalidate()
896 if (entry->type >= ARRAY_SIZE(xtopt_psize) || in xtables_option_metavalidate()
897 xtopt_psize[entry->type] == 0) in xtables_option_metavalidate()
901 name, entry->name); in xtables_option_metavalidate()
902 if (xtopt_psize[entry->type] != -1 && in xtables_option_metavalidate()
903 xtopt_psize[entry->type] != entry->size) in xtables_option_metavalidate()
907 name, entry->name, in xtables_option_metavalidate()
908 xtopt_psize[entry->type], entry->size); in xtables_option_metavalidate()
916 xtables_option_lookup(const struct xt_option_entry *entry, unsigned int id) in xtables_option_lookup() argument
918 for (; entry->name != NULL; ++entry) in xtables_option_lookup()
919 if (entry->id == id) in xtables_option_lookup()
920 return entry; in xtables_option_lookup()
944 cb.entry = xtables_option_lookup(t->x6_options, c); in xtables_option_tpcall()
945 if (cb.entry == NULL) in xtables_option_tpcall()
980 cb.entry = xtables_option_lookup(m->x6_options, c); in xtables_option_mpcall()
981 if (cb.entry == NULL) in xtables_option_mpcall()
1003 xtables_option_fcheck2(const char *name, const struct xt_option_entry *entry, in xtables_option_fcheck2() argument
1007 unsigned int ef = 1 << entry->id, of = 1 << other->id; in xtables_option_fcheck2()
1009 if (entry->also & of && !(xflags & of)) in xtables_option_fcheck2()
1012 name, entry->name, other->name); in xtables_option_fcheck2()
1014 if (!(entry->excl & of)) in xtables_option_fcheck2()
1023 name, entry->name, other->name); in xtables_option_fcheck2()
1037 const struct xt_option_entry *entry, *other; in xtables_options_fcheck() local
1040 for (entry = table; entry->name != NULL; ++entry) { in xtables_options_fcheck()
1041 if (entry->flags & XTOPT_MAND && in xtables_options_fcheck()
1042 !(xflags & (1 << entry->id))) in xtables_options_fcheck()
1045 name, entry->name); in xtables_options_fcheck()
1046 if (!(xflags & (1 << entry->id))) in xtables_options_fcheck()
1050 for (i = 0; i < CHAR_BIT * sizeof(entry->id); ++i) { in xtables_options_fcheck()
1051 if (entry->id == i) in xtables_options_fcheck()
1060 xtables_option_fcheck2(name, entry, other, xflags); in xtables_options_fcheck()