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
37 lines
1.2 KiB
/* -*- coding: utf-8 -*-
|
|
* ----------------------------------------------------------------------
|
|
* Copyright © 2009-2012, RedJack, LLC.
|
|
* All rights reserved.
|
|
*
|
|
* Please see the LICENSE.txt file in this distribution for license
|
|
* details.
|
|
* ----------------------------------------------------------------------
|
|
*/
|
|
|
|
/*
|
|
* The IPv4 and IPv6 map types are basically identical, except for the
|
|
* names of the functions, and the size of the values that are being
|
|
* stored. Rather than having two mostly duplicate definitions of each
|
|
* function, we define “template functions” where anything that depends
|
|
* on the size of the IP address is defined using the following macros.
|
|
*/
|
|
|
|
|
|
/* The name of the cork_ipvX type. */
|
|
#define CORK_IP struct cork_ipv6
|
|
|
|
/* The number of bits in an IPvX address. */
|
|
#define IP_BIT_SIZE 128
|
|
|
|
/* The value of the discriminator variable for an IPvX address. */
|
|
#define IP_DISCRIMINATOR_VALUE false
|
|
|
|
/* Creates a identifier of the form “ipset_ipv6_<basename>”. */
|
|
#define IPSET_NAME(basename) ipset_ipv6_##basename
|
|
|
|
/* Creates a identifier of the form “ipmap_ipv6_<basename>”. */
|
|
#define IPMAP_NAME(basename) ipmap_ipv6_##basename
|
|
|
|
|
|
/* Now include all of the templates. */
|
|
#include "inspection-template.c.in"
|