Home | History | Annotate | Download | only in npfctl

Lines Matching defs:layer

103 	 * The layer 3 default group is mandatory.  Note: npfctl_build_group_end()
105 * if you set a layer 2 rule, layer 2 default also becomes mandatory.
106 * if you don't set layer 2 rules, only layer 3 default is mandatory
109 errx(EXIT_FAILURE, "layer 3 default group was not defined");
113 errx(EXIT_FAILURE, "layer 2 default group not defined");
497 /* Build layer 3 and 4 protocol blocks. */
568 uint32_t layer = fopts->layer;
571 if (layer == NPF_RULE_LAYER_3) {
574 } else if (layer == NPF_RULE_LAYER_2) {
578 yyerror("%s: layer not supported", __func__);
724 *lstr = "layer 2";
726 *lstr = "layer 3";
728 yyerror("%s: layer not yet supported", func);
770 yyerror("%s: layer not supported", __func__);
807 * this function is here to ensure that layer 2 rules are
809 * and vice versa. layer3 group => layer 3 rules
810 * does not allow setting layer 2 rules in layer 3 groups
813 npf_rule_layer_compat(nl_rule_t *cg, uint32_t layer)
817 if ((attr & layer) == 0) {
818 /* only set the layer strings when you need them */
820 npf_check_layer(&str, layer, __func__);
823 " make sure to insert same layer rules in the same group ", str);
825 return layer;
841 .layer = NPF_RULE_LAYER_3,
852 * quickly check for group-rule layer compat
853 * if the filter layer matches group layer,
854 * set the layer bit in rule attribute for kernel
858 attr |= npf_rule_layer_compat(cg, fopts->layer);
860 /* set the layer bit directly for dynamic rules */
861 attr |= fopts->layer;
865 yyerror("return blocks not yet supported in layer 2");
1094 imfopts.layer = NPF_RULE_LAYER_3;
1101 imfopts.layer = NPF_RULE_LAYER_3;