mirror of
git://git.code.sf.net/p/xtables-addons/xtables-addons
synced 2025-09-22 12:34:58 +02:00
ipset: update to 5.4.1
This commit is contained in:
@@ -5,12 +5,31 @@
|
||||
#include <linux/netfilter.h>
|
||||
|
||||
/* Prefixlen maps, by Jan Engelhardt */
|
||||
extern const union nf_inet_addr prefixlen_netmask_map[];
|
||||
extern const union nf_inet_addr prefixlen_hostmask_map[];
|
||||
extern const union nf_inet_addr ip_set_netmask_map[];
|
||||
extern const union nf_inet_addr ip_set_hostmask_map[];
|
||||
|
||||
#define NETMASK(n) prefixlen_netmask_map[n].ip
|
||||
#define NETMASK6(n) prefixlen_netmask_map[n].ip6
|
||||
#define HOSTMASK(n) prefixlen_hostmask_map[n].ip
|
||||
#define HOSTMASK6(n) prefixlen_hostmask_map[n].ip6
|
||||
static inline __be32
|
||||
ip_set_netmask(u8 pfxlen)
|
||||
{
|
||||
return ip_set_netmask_map[pfxlen].ip;
|
||||
}
|
||||
|
||||
static inline const __be32 *
|
||||
ip_set_netmask6(u8 pfxlen)
|
||||
{
|
||||
return &ip_set_netmask_map[pfxlen].ip6[0];
|
||||
}
|
||||
|
||||
static inline u32
|
||||
ip_set_hostmask(u8 pfxlen)
|
||||
{
|
||||
return (__force u32) ip_set_hostmask_map[pfxlen].ip;
|
||||
}
|
||||
|
||||
static inline const __be32 *
|
||||
ip_set_hostmask6(u8 pfxlen)
|
||||
{
|
||||
return &ip_set_hostmask_map[pfxlen].ip6[0];
|
||||
}
|
||||
|
||||
#endif /*_PFXLEN_H */
|
||||
|
Reference in New Issue
Block a user