···183183#include <linux/netdevice.h>184184185185/**186186- * struct xt_match_param - parameters for match extensions' match functions186186+ * struct xt_action_param - parameters for matches/targets187187 *188188+ * @match: the match extension189189+ * @target: the target extension190190+ * @matchinfo: per-match data191191+ * @targetinfo: per-target data188192 * @in: input netdevice189193 * @out: output netdevice190190- * @match: struct xt_match through which this function was invoked191191- * @matchinfo: per-match data192194 * @fragoff: packet is a fragment, this is the data offset193195 * @thoff: position of transport header relative to skb->data194196 * @hook: hook number given packet came from195197 * @family: Actual NFPROTO_* through which the function is invoked196198 * (helpful when match->family == NFPROTO_UNSPEC)199199+ *200200+ * Fields written to by extensions:201201+ *197202 * @hotdrop: drop packet if we had inspection problems198203 * Network namespace obtainable using dev_net(in/out)199204 */200200-struct xt_match_param {205205+struct xt_action_param {206206+ union {207207+ const struct xt_match *match;208208+ const struct xt_target *target;209209+ };210210+ union {211211+ const void *matchinfo, *targinfo;212212+ };201213 const struct net_device *in, *out;202202- const struct xt_match *match;203203- const void *matchinfo;204214 int fragoff;205215 unsigned int thoff;206216 unsigned int hooknum;207217 u_int8_t family;208208- bool *hotdrop;218218+ bool hotdrop;209219};210220211221/**···249239 struct net *net;250240 const struct xt_match *match;251241 void *matchinfo;252252- u_int8_t family;253253-};254254-255255-/**256256- * struct xt_target_param - parameters for target extensions' target functions257257- *258258- * @hooknum: hook through which this target was invoked259259- * @target: struct xt_target through which this function was invoked260260- * @targinfo: per-target data261261- *262262- * Other fields see above.263263- */264264-struct xt_target_param {265265- const struct net_device *in, *out;266266- const struct xt_target *target;267267- const void *targinfo;268268- unsigned int hooknum;269242 u_int8_t family;270243};271244···291298 non-linear skb, using skb_header_pointer and292299 skb_ip_make_writable. */293300 bool (*match)(const struct sk_buff *skb,294294- const struct xt_match_param *);301301+ struct xt_action_param *);295302296303 /* Called when user tries to insert an entry of this type. */297304 int (*checkentry)(const struct xt_mtchk_param *);···328335 must now handle non-linear skbs, using skb_copy_bits and329336 skb_ip_make_writable. */330337 unsigned int (*target)(struct sk_buff *skb,331331- const struct xt_target_param *);338338+ const struct xt_action_param *);332339333340 /* Called when user tries to insert an entry of this type:334341 hook_mask is a bitmask of hooks from which it can be