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.

37 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 map 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 each
  14. * function, we define template functions where anything that depends
  15. * on the size of the IP address is defined using the following macros.
  16. */
  17. /* The name of the cork_ipvX type. */
  18. #define CORK_IP struct cork_ipv6
  19. /* The number of bits in an IPvX address. */
  20. #define IP_BIT_SIZE 128
  21. /* The value of the discriminator variable for an IPvX address. */
  22. #define IP_DISCRIMINATOR_VALUE false
  23. /* Creates a identifier of the form “ipset_ipv6_<basename>”. */
  24. #define IPSET_NAME(basename) ipset_ipv6_##basename
  25. /* Creates a identifier of the form “ipmap_ipv6_<basename>”. */
  26. #define IPMAP_NAME(basename) ipmap_ipv6_##basename
  27. /* Now include all of the templates. */
  28. #include "inspection-template.c.in"