1 #ifndef _IP_SET_SKBINFO_H
2 #define _IP_SET_SKBINFO_H
4 /* Copyright (C) 2015 Jozsef Kadlecsik <kadlec@blackhole.kfki.hu>
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
14 ip_set_get_skbinfo(struct ip_set_skbinfo *skbinfo,
15 const struct ip_set_ext *ext,
16 struct ip_set_ext *mext, u32 flags)
18 mext->skbinfo = *skbinfo;
22 ip_set_put_skbinfo(struct sk_buff *skb, const struct ip_set_skbinfo *skbinfo)
24 /* Send nonzero parameters only */
25 return ((skbinfo->skbmark || skbinfo->skbmarkmask) &&
26 nla_put_net64(skb, IPSET_ATTR_SKBMARK,
27 cpu_to_be64((u64)skbinfo->skbmark << 32 |
28 skbinfo->skbmarkmask),
31 nla_put_net32(skb, IPSET_ATTR_SKBPRIO,
32 cpu_to_be32(skbinfo->skbprio))) ||
34 nla_put_net16(skb, IPSET_ATTR_SKBQUEUE,
35 cpu_to_be16(skbinfo->skbqueue)));
39 ip_set_init_skbinfo(struct ip_set_skbinfo *skbinfo,
40 const struct ip_set_ext *ext)
42 *skbinfo = ext->skbinfo;
45 #endif /* __KERNEL__ */
46 #endif /* _IP_SET_SKBINFO_H */