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