diff --git a/extensions/compat_xtables.h b/extensions/compat_xtables.h index c0c6470..8456550 100644 --- a/extensions/compat_xtables.h +++ b/extensions/compat_xtables.h @@ -1,6 +1,7 @@ #ifndef _XTABLES_COMPAT_H #define _XTABLES_COMPAT_H 1 +#include #include #include "compat_skbuff.h" #include "compat_xtnu.h" @@ -70,6 +71,27 @@ # define csum_replace2 nf_csum_replace2 #endif +#if !defined(NIP6) && !defined(NIP6_FMT) +# define NIP6(addr) \ + ntohs((addr).s6_addr16[0]), \ + ntohs((addr).s6_addr16[1]), \ + ntohs((addr).s6_addr16[2]), \ + ntohs((addr).s6_addr16[3]), \ + ntohs((addr).s6_addr16[4]), \ + ntohs((addr).s6_addr16[5]), \ + ntohs((addr).s6_addr16[6]), \ + ntohs((addr).s6_addr16[7]) +# define NIP6_FMT "%04x:%04x:%04x:%04x:%04x:%04x:%04x:%04x" +#endif +#if !defined(NIPQUAD) && !defined(NIPQUAD_FMT) +# define NIPQUAD(addr) \ + ((const unsigned char *)&addr)[0], \ + ((const unsigned char *)&addr)[1], \ + ((const unsigned char *)&addr)[2], \ + ((const unsigned char *)&addr)[3] +# define NIPQUAD_FMT "%u.%u.%u.%u" +#endif + #define ip_route_me_harder xtnu_ip_route_me_harder #define skb_make_writable xtnu_skb_make_writable #define xt_target xtnu_target