| @@ -217,6 +217,15 @@ struct ip_set; · 216 unmodified lines |
| 217 | typedef int (*ipset_adtfn)(struct ip_set *set, void *value, | 217 | typedef int (*ipset_adtfn)(struct ip_set *set, void *value, |
| 218 | u32 timeout, u32 flags); | 218 | u32 timeout, u32 flags); |
| 219 | | 219 | |
| | 220 | /* Kernel API function options */ |
| | 221 | struct ip_set_adt_opt { |
| | 222 | u8 family; /* Actual protocol family */ |
| | 223 | u8 dim; /* Dimension of match/target */ |
| | 224 | u8 flags; /* Direction and negation flags */ |
| | 225 | u32 cmdflags; /* Command-like flags */ |
| | 226 | u32 timeout; /* Timeout value */ |
| | 227 | }; |
| | 228 | |
| 220 | /* Set type, variant-specific part */ | 229 | /* Set type, variant-specific part */ |
| 221 | struct ip_set_type_variant { | 230 | struct ip_set_type_variant { |
| 222 | /* Kernelspace: test/add/del entries | 231 | /* Kernelspace: test/add/del entries |
| @@ -224,7 +233,7 @@ struct ip_set_type_variant { · 1 unmodified line |
| 224 | * zero for no match/success to add/delete | 233 | * zero for no match/success to add/delete |
| 225 | * positive for matching element */ | 234 | * positive for matching element */ |
| 226 | int (*kadt)(struct ip_set *set, const struct sk_buff * skb, | 235 | int (*kadt)(struct ip_set *set, const struct sk_buff * skb, |
| 227 | enum ipset_adt adt, u8 pf, u8 dim, u8 flags); | 236 | enum ipset_adt adt, const struct ip_set_adt_opt *opt); |
| 228 | | 237 | |
| 229 | /* Userspace: test/add/del entries | 238 | /* Userspace: test/add/del entries |
| 230 | * returns negative error code, | 239 | * returns negative error code, |
| @@ -314,12 +323,13 @@ extern ip_set_id_t ip_set_nfnl_get_byindex(ip_set_id_t index); · 83 unmodified lines |
| 314 | extern void ip_set_nfnl_put(ip_set_id_t index); | 323 | extern void ip_set_nfnl_put(ip_set_id_t index); |
| 315 | | 324 | |
| 316 | /* API for iptables set match, and SET target */ | 325 | /* API for iptables set match, and SET target */ |
| | 326 | |
| 317 | extern int ip_set_add(ip_set_id_t id, const struct sk_buff *skb, | 327 | extern int ip_set_add(ip_set_id_t id, const struct sk_buff *skb, |
| 318 | u8 family, u8 dim, u8 flags); | 328 | const struct ip_set_adt_opt *opt); |
| 319 | extern int ip_set_del(ip_set_id_t id, const struct sk_buff *skb, | 329 | extern int ip_set_del(ip_set_id_t id, const struct sk_buff *skb, |
| 320 | u8 family, u8 dim, u8 flags); | 330 | const struct ip_set_adt_opt *opt); |
| 321 | extern int ip_set_test(ip_set_id_t id, const struct sk_buff *skb, | 331 | extern int ip_set_test(ip_set_id_t id, const struct sk_buff *skb, |
| 322 | u8 family, u8 dim, u8 flags); | 332 | const struct ip_set_adt_opt *opt); |
| 323 | | 333 | |
| 324 | /* Utility functions */ | 334 | /* Utility functions */ |
| 325 | extern void * ip_set_alloc(size_t size); | 335 | extern void * ip_set_alloc(size_t size); |