Home | History | Annotate | Line # | Download | only in netipsec
esp_var.h revision 1.3.70.1
      1  1.3.70.1       mjf /*	$NetBSD: esp_var.h,v 1.3.70.1 2008/06/02 13:24:28 mjf Exp $	*/
      2       1.1  jonathan /*	$FreeBSD: src/sys/netipsec/esp_var.h,v 1.1.4.1 2003/01/24 05:11:35 sam Exp $	*/
      3       1.1  jonathan /*	$OpenBSD: ip_esp.h,v 1.37 2002/06/09 16:26:10 itojun Exp $	*/
      4       1.1  jonathan /*
      5       1.1  jonathan  * The authors of this code are John Ioannidis (ji (at) tla.org),
      6       1.1  jonathan  * Angelos D. Keromytis (kermit (at) csd.uch.gr) and
      7       1.1  jonathan  * Niels Provos (provos (at) physnet.uni-hamburg.de).
      8       1.1  jonathan  *
      9       1.1  jonathan  * The original version of this code was written by John Ioannidis
     10       1.1  jonathan  * for BSD/OS in Athens, Greece, in November 1995.
     11       1.1  jonathan  *
     12       1.1  jonathan  * Ported to OpenBSD and NetBSD, with additional transforms, in December 1996,
     13       1.1  jonathan  * by Angelos D. Keromytis.
     14       1.1  jonathan  *
     15       1.1  jonathan  * Additional transforms and features in 1997 and 1998 by Angelos D. Keromytis
     16       1.1  jonathan  * and Niels Provos.
     17       1.1  jonathan  *
     18       1.1  jonathan  * Additional features in 1999 by Angelos D. Keromytis.
     19       1.1  jonathan  *
     20       1.1  jonathan  * Copyright (C) 1995, 1996, 1997, 1998, 1999 by John Ioannidis,
     21       1.1  jonathan  * Angelos D. Keromytis and Niels Provos.
     22       1.1  jonathan  * Copyright (c) 2001 Angelos D. Keromytis.
     23       1.1  jonathan  *
     24       1.1  jonathan  * Permission to use, copy, and modify this software with or without fee
     25       1.1  jonathan  * is hereby granted, provided that this entire notice is included in
     26       1.1  jonathan  * all copies of any software which is or includes a copy or
     27       1.1  jonathan  * modification of this software.
     28       1.1  jonathan  * You may use this code under the GNU public license if you so wish. Please
     29       1.1  jonathan  * contribute changes back to the authors under this freer than GPL license
     30       1.1  jonathan  * so that we may further the use of strong encryption without limitations to
     31       1.1  jonathan  * all.
     32       1.1  jonathan  *
     33       1.1  jonathan  * THIS SOFTWARE IS BEING PROVIDED "AS IS", WITHOUT ANY EXPRESS OR
     34       1.1  jonathan  * IMPLIED WARRANTY. IN PARTICULAR, NONE OF THE AUTHORS MAKES ANY
     35       1.1  jonathan  * REPRESENTATION OR WARRANTY OF ANY KIND CONCERNING THE
     36       1.1  jonathan  * MERCHANTABILITY OF THIS SOFTWARE OR ITS FITNESS FOR ANY PARTICULAR
     37       1.1  jonathan  * PURPOSE.
     38       1.1  jonathan  */
     39       1.1  jonathan 
     40       1.1  jonathan #ifndef _NETIPSEC_ESP_VAR_H_
     41       1.1  jonathan #define _NETIPSEC_ESP_VAR_H_
     42       1.1  jonathan 
     43       1.1  jonathan /*
     44       1.1  jonathan  * These define the algorithm indices into the histogram.  They're
     45       1.1  jonathan  * presently based on the PF_KEY v2 protocol values which is bogus;
     46       1.1  jonathan  * they should be decoupled from the protocol at which time we can
     47       1.1  jonathan  * pack them and reduce the size of the array to a reasonable value.
     48       1.1  jonathan  */
     49       1.1  jonathan #define	ESP_ALG_MAX	256		/* NB: could be < but skipjack is 249 */
     50       1.1  jonathan 
     51  1.3.70.1       mjf #define	ESP_STAT_HDROPS		0	/* packet shorter than header shows */
     52  1.3.70.1       mjf #define	ESP_STAT_NOPF		1	/* protocol family not supported */
     53  1.3.70.1       mjf #define	ESP_STAT_NOTDB		2
     54  1.3.70.1       mjf #define	ESP_STAT_BADKCR		3
     55  1.3.70.1       mjf #define	ESP_STAT_QFULL		4
     56  1.3.70.1       mjf #define	ESP_STAT_NOXFORM	5
     57  1.3.70.1       mjf #define	ESP_STAT_BADILEN	6
     58  1.3.70.1       mjf #define	ESP_STAT_WRAP		7	/* replay counter wrapped around */
     59  1.3.70.1       mjf #define	ESP_STAT_BADENC		8	/* bad encryption detected */
     60  1.3.70.1       mjf #define	ESP_STAT_BADAUTH	9	/* (only valid for xforms with auth) */
     61  1.3.70.1       mjf #define	ESP_STAT_REPLAY		10	/* possible packet replay detected */
     62  1.3.70.1       mjf #define	ESP_STAT_INPUT		11	/* input ESP packets */
     63  1.3.70.1       mjf #define	ESP_STAT_OUTPUT		12	/* output ESP packets */
     64  1.3.70.1       mjf #define	ESP_STAT_INVALID	13	/* trying to use an invalid TDB */
     65  1.3.70.1       mjf #define	ESP_STAT_IBYTES		14	/* input bytes */
     66  1.3.70.1       mjf #define	ESP_STAT_OBYTES		15	/* output bytes */
     67  1.3.70.1       mjf #define	ESP_STAT_TOOBIG		16	/* packet got larger than IP_MAXPACKET */
     68  1.3.70.1       mjf #define	ESP_STAT_PDROPS		17	/* packet blocked due to policy */
     69  1.3.70.1       mjf #define	ESP_STAT_CRYPTO		18	/* crypto processing failure */
     70  1.3.70.1       mjf #define	ESP_STAT_TUNNEL		19	/* tunnel sanity check failure */
     71  1.3.70.1       mjf #define	ESP_STAT_HIST		20	/* per-algorithm op count */
     72  1.3.70.1       mjf 		/* space for ESP_ALG_MAX (256) counters */
     73  1.3.70.1       mjf 
     74  1.3.70.1       mjf #define	ESP_NSTATS		276
     75       1.1  jonathan 
     76       1.1  jonathan #ifdef _KERNEL
     77       1.1  jonathan extern	int esp_enable;
     78       1.1  jonathan #endif /* _KERNEL */
     79       1.3      elad #endif /* !_NETIPSEC_ESP_VAR_H_ */
     80