Deleted Added
full compact
esp_var.h (252028) esp_var.h (253081)
1/* $FreeBSD: head/sys/netipsec/esp_var.h 252028 2013-06-20 11:44:16Z ae $ */
1/* $FreeBSD: head/sys/netipsec/esp_var.h 253081 2013-07-09 09:32:06Z ae $ */
2/* $OpenBSD: ip_esp.h,v 1.37 2002/06/09 16:26:10 itojun Exp $ */
3/*-
4 * The authors of this code are John Ioannidis (ji@tla.org),
5 * Angelos D. Keromytis (kermit@csd.uch.gr) and
6 * Niels Provos (provos@physnet.uni-hamburg.de).
7 *
8 * The original version of this code was written by John Ioannidis
9 * for BSD/OS in Athens, Greece, in November 1995.

--- 33 unchanged lines hidden (view full) ---

43 * These define the algorithm indices into the histogram. They're
44 * presently based on the PF_KEY v2 protocol values which is bogus;
45 * they should be decoupled from the protocol at which time we can
46 * pack them and reduce the size of the array to a reasonable value.
47 */
48#define ESP_ALG_MAX 256 /* NB: could be < but skipjack is 249 */
49
50struct espstat {
2/* $OpenBSD: ip_esp.h,v 1.37 2002/06/09 16:26:10 itojun Exp $ */
3/*-
4 * The authors of this code are John Ioannidis (ji@tla.org),
5 * Angelos D. Keromytis (kermit@csd.uch.gr) and
6 * Niels Provos (provos@physnet.uni-hamburg.de).
7 *
8 * The original version of this code was written by John Ioannidis
9 * for BSD/OS in Athens, Greece, in November 1995.

--- 33 unchanged lines hidden (view full) ---

43 * These define the algorithm indices into the histogram. They're
44 * presently based on the PF_KEY v2 protocol values which is bogus;
45 * they should be decoupled from the protocol at which time we can
46 * pack them and reduce the size of the array to a reasonable value.
47 */
48#define ESP_ALG_MAX 256 /* NB: could be < but skipjack is 249 */
49
50struct espstat {
51 u_int32_t esps_hdrops; /* Packet shorter than header shows */
52 u_int32_t esps_nopf; /* Protocol family not supported */
53 u_int32_t esps_notdb;
54 u_int32_t esps_badkcr;
55 u_int32_t esps_qfull;
56 u_int32_t esps_noxform;
57 u_int32_t esps_badilen;
58 u_int32_t esps_wrap; /* Replay counter wrapped around */
59 u_int32_t esps_badenc; /* Bad encryption detected */
60 u_int32_t esps_badauth; /* Only valid for transforms with auth */
61 u_int32_t esps_replay; /* Possible packet replay detected */
62 u_int32_t esps_input; /* Input ESP packets */
63 u_int32_t esps_output; /* Output ESP packets */
64 u_int32_t esps_invalid; /* Trying to use an invalid TDB */
65 u_int64_t esps_ibytes; /* Input bytes */
66 u_int64_t esps_obytes; /* Output bytes */
67 u_int32_t esps_toobig; /* Packet got larger than IP_MAXPACKET */
68 u_int32_t esps_pdrops; /* Packet blocked due to policy */
69 u_int32_t esps_crypto; /* Crypto processing failure */
70 u_int32_t esps_tunnel; /* Tunnel sanity check failure */
71 u_int32_t esps_hist[ESP_ALG_MAX]; /* Per-algorithm op count */
51 uint64_t esps_hdrops; /* Packet shorter than header shows */
52 uint64_t esps_nopf; /* Protocol family not supported */
53 uint64_t esps_notdb;
54 uint64_t esps_badkcr;
55 uint64_t esps_qfull;
56 uint64_t esps_noxform;
57 uint64_t esps_badilen;
58 uint64_t esps_wrap; /* Replay counter wrapped around */
59 uint64_t esps_badenc; /* Bad encryption detected */
60 uint64_t esps_badauth; /* Only valid for transforms with auth */
61 uint64_t esps_replay; /* Possible packet replay detected */
62 uint64_t esps_input; /* Input ESP packets */
63 uint64_t esps_output; /* Output ESP packets */
64 uint64_t esps_invalid; /* Trying to use an invalid TDB */
65 uint64_t esps_ibytes; /* Input bytes */
66 uint64_t esps_obytes; /* Output bytes */
67 uint64_t esps_toobig; /* Packet got larger than IP_MAXPACKET */
68 uint64_t esps_pdrops; /* Packet blocked due to policy */
69 uint64_t esps_crypto; /* Crypto processing failure */
70 uint64_t esps_tunnel; /* Tunnel sanity check failure */
71 uint64_t esps_hist[ESP_ALG_MAX]; /* Per-algorithm op count */
72};
73
74#ifdef _KERNEL
75VNET_DECLARE(int, esp_enable);
76VNET_DECLARE(struct espstat, espstat);
77
78#define ESPSTAT_ADD(name, val) V_espstat.name += (val)
79#define ESPSTAT_INC(name) ESPSTAT_ADD(name, 1)
80#define V_esp_enable VNET(esp_enable)
81#define V_espstat VNET(espstat)
82#endif /* _KERNEL */
83#endif /*_NETIPSEC_ESP_VAR_H_*/
72};
73
74#ifdef _KERNEL
75VNET_DECLARE(int, esp_enable);
76VNET_DECLARE(struct espstat, espstat);
77
78#define ESPSTAT_ADD(name, val) V_espstat.name += (val)
79#define ESPSTAT_INC(name) ESPSTAT_ADD(name, 1)
80#define V_esp_enable VNET(esp_enable)
81#define V_espstat VNET(espstat)
82#endif /* _KERNEL */
83#endif /*_NETIPSEC_ESP_VAR_H_*/