MFC corrected printing of the slice number when adding a GPT partition.
[dragonfly.git] / sys / netproto / ipsec / esp_var.h
blob95a5598ba96743523c5577fbc2e0c2c8d46b84b3
1 /* $FreeBSD: src/sys/netipsec/esp_var.h,v 1.1.4.1 2003/01/24 05:11:35 sam Exp $ */
2 /* $DragonFly: src/sys/netproto/ipsec/esp_var.h,v 1.2 2003/06/17 04:28:53 dillon 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).
9 * The original version of this code was written by John Ioannidis
10 * for BSD/OS in Athens, Greece, in November 1995.
12 * Ported to OpenBSD and NetBSD, with additional transforms, in December 1996,
13 * by Angelos D. Keromytis.
15 * Additional transforms and features in 1997 and 1998 by Angelos D. Keromytis
16 * and Niels Provos.
18 * Additional features in 1999 by Angelos D. Keromytis.
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.
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.
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.
40 #ifndef _NETIPSEC_ESP_VAR_H_
41 #define _NETIPSEC_ESP_VAR_H_
44 * These define the algorithm indices into the histogram. They're
45 * presently based on the PF_KEY v2 protocol values which is bogus;
46 * they should be decoupled from the protocol at which time we can
47 * pack them and reduce the size of the array to a reasonable value.
49 #define ESP_ALG_MAX 256 /* NB: could be < but skipjack is 249 */
51 struct espstat {
52 u_int32_t esps_hdrops; /* Packet shorter than header shows */
53 u_int32_t esps_nopf; /* Protocol family not supported */
54 u_int32_t esps_notdb;
55 u_int32_t esps_badkcr;
56 u_int32_t esps_qfull;
57 u_int32_t esps_noxform;
58 u_int32_t esps_badilen;
59 u_int32_t esps_wrap; /* Replay counter wrapped around */
60 u_int32_t esps_badenc; /* Bad encryption detected */
61 u_int32_t esps_badauth; /* Only valid for transforms with auth */
62 u_int32_t esps_replay; /* Possible packet replay detected */
63 u_int32_t esps_input; /* Input ESP packets */
64 u_int32_t esps_output; /* Output ESP packets */
65 u_int32_t esps_invalid; /* Trying to use an invalid TDB */
66 u_int64_t esps_ibytes; /* Input bytes */
67 u_int64_t esps_obytes; /* Output bytes */
68 u_int32_t esps_toobig; /* Packet got larger than IP_MAXPACKET */
69 u_int32_t esps_pdrops; /* Packet blocked due to policy */
70 u_int32_t esps_crypto; /* Crypto processing failure */
71 u_int32_t esps_tunnel; /* Tunnel sanity check failure */
72 u_int32_t esps_hist[ESP_ALG_MAX]; /* Per-algorithm op count */
75 #ifdef _KERNEL
76 extern int esp_enable;
77 extern struct espstat espstat;
78 #endif /* _KERNEL */
79 #endif /*_NETIPSEC_ESP_VAR_H_*/