ipcomp_var.h revision 139823
1128723Sru/* $FreeBSD: head/sys/netipsec/ipcomp_var.h 139823 2005-01-07 01:45:51Z imp $ */ 2185562Sluigi/* $KAME: ipcomp.h,v 1.8 2000/09/26 07:55:14 itojun Exp $ */ 3128723Sru 4128723Sru/*- 5128723Sru * Copyright (C) 1999 WIDE Project. 6128723Sru * All rights reserved. 7128723Sru * 8128723Sru * Redistribution and use in source and binary forms, with or without 9128723Sru * modification, are permitted provided that the following conditions 10128723Sru * are met: 11128723Sru * 1. Redistributions of source code must retain the above copyright 12128723Sru * notice, this list of conditions and the following disclaimer. 13128723Sru * 2. Redistributions in binary form must reproduce the above copyright 14128723Sru * notice, this list of conditions and the following disclaimer in the 15128723Sru * documentation and/or other materials provided with the distribution. 16128723Sru * 3. Neither the name of the project nor the names of its contributors 17128723Sru * may be used to endorse or promote products derived from this software 18128723Sru * without specific prior written permission. 19128722Sru * 20185562Sluigi * THIS SOFTWARE IS PROVIDED BY THE PROJECT AND CONTRIBUTORS ``AS IS'' AND 21185562Sluigi * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 22138048Sjhb * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 23128722Sru * ARE DISCLAIMED. IN NO EVENT SHALL THE PROJECT OR CONTRIBUTORS BE LIABLE 24185562Sluigi * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 25186598Sluigi * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 26185562Sluigi * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 27185562Sluigi * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 28185562Sluigi * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 29185562Sluigi * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 30185562Sluigi * SUCH DAMAGE. 31185562Sluigi */ 32185562Sluigi 33185562Sluigi#ifndef _NETIPSEC_IPCOMP_VAR_H_ 34185579Sluigi#define _NETIPSEC_IPCOMP_VAR_H_ 35185579Sluigi 36185579Sluigi/* 37185579Sluigi * These define the algorithm indices into the histogram. They're 38185579Sluigi * presently based on the PF_KEY v2 protocol values which is bogus; 39185579Sluigi * they should be decoupled from the protocol at which time we can 40185579Sluigi * pack them and reduce the size of the array to a minimum. 41185562Sluigi */ 42185579Sluigi#define IPCOMP_ALG_MAX 8 43185579Sluigi 44185562Sluigistruct ipcompstat { 45185562Sluigi u_int32_t ipcomps_hdrops; /* Packet shorter than header shows */ 46185562Sluigi u_int32_t ipcomps_nopf; /* Protocol family not supported */ 47185562Sluigi u_int32_t ipcomps_notdb; 48185562Sluigi u_int32_t ipcomps_badkcr; 49185562Sluigi u_int32_t ipcomps_qfull; 50185562Sluigi u_int32_t ipcomps_noxform; 51185562Sluigi u_int32_t ipcomps_wrap; 52185562Sluigi u_int32_t ipcomps_input; /* Input IPcomp packets */ 53185562Sluigi u_int32_t ipcomps_output; /* Output IPcomp packets */ 54185562Sluigi u_int32_t ipcomps_invalid;/* Trying to use an invalid TDB */ 55185562Sluigi u_int64_t ipcomps_ibytes; /* Input bytes */ 56185562Sluigi u_int64_t ipcomps_obytes; /* Output bytes */ 57185562Sluigi u_int32_t ipcomps_toobig; /* Packet got > IP_MAXPACKET */ 58185562Sluigi u_int32_t ipcomps_pdrops; /* Packet blocked due to policy */ 59185562Sluigi u_int32_t ipcomps_crypto; /* "Crypto" processing failure */ 60185562Sluigi u_int32_t ipcomps_hist[IPCOMP_ALG_MAX];/* Per-algorithm op count */ 61185562Sluigi}; 62185562Sluigi 63185562Sluigi#ifdef _KERNEL 64185562Sluigiextern int ipcomp_enable; 65185562Sluigiextern struct ipcompstat ipcompstat; 66185562Sluigi#endif /* _KERNEL */ 67185562Sluigi#endif /*_NETIPSEC_IPCOMP_VAR_H_*/ 68185562Sluigi