You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

38 lines
1.2 KiB

10 years ago
  1. /* -*- coding: utf-8 -*-
  2. * ----------------------------------------------------------------------
  3. * Copyright © 2009-2012, RedJack, LLC.
  4. * All rights reserved.
  5. *
  6. * Please see the LICENSE.txt file in this distribution for license
  7. * details.
  8. * ----------------------------------------------------------------------
  9. */
  10. /*
  11. * The IPv4 and IPv6 set types are basically identical, except for the
  12. * names of the functions, and the size of the values that are being
  13. * stored. Rather than having two mostly duplicate definitions of
  14. * each function, we define template functions where anything that
  15. * depends on the size of the IP address is defined using the
  16. * following macros.
  17. */
  18. /* The name of the cork_ipvX type. */
  19. #define CORK_IP struct cork_ipv6
  20. /* The number of bits in an IPvX address. */
  21. #define IP_BIT_SIZE 128
  22. /* The value of the discriminator variable for an IPvX address. */
  23. #define IP_DISCRIMINATOR_VALUE false
  24. /* Creates a identifier of the form “ipset_ipv6_<basename>”. */
  25. #define IPSET_NAME(basename) ipset_ipv6_##basename
  26. /* Creates a identifier of the form “ipset_<basename>_ipv6”. */
  27. #define IPSET_PRENAME(basename) ipset_##basename##_ipv6
  28. /* Now include all of the templates. */
  29. #include "inspection-template.c.in"