The Design and Implementation of the FreeBSD Operating System, Second Edition
Now available: The Design and Implementation of the FreeBSD Operating System (Second Edition)


[ source navigation ] [ diff markup ] [ identifier search ] [ freetext search ] [ file search ] [ list types ] [ track identifier ]

FreeBSD/Linux Kernel Cross Reference
sys/netipsec/esp_var.h

Version: -  FREEBSD  -  FREEBSD11  -  FREEBSD10  -  FREEBSD9  -  FREEBSD92  -  FREEBSD91  -  FREEBSD90  -  FREEBSD8  -  FREEBSD82  -  FREEBSD81  -  FREEBSD80  -  FREEBSD7  -  FREEBSD74  -  FREEBSD73  -  FREEBSD72  -  FREEBSD71  -  FREEBSD70  -  FREEBSD6  -  FREEBSD64  -  FREEBSD63  -  FREEBSD62  -  FREEBSD61  -  FREEBSD60  -  FREEBSD5  -  FREEBSD55  -  FREEBSD54  -  FREEBSD53  -  FREEBSD52  -  FREEBSD51  -  FREEBSD50  -  FREEBSD4  -  FREEBSD3  -  FREEBSD22  -  linux-2.6  -  linux-2.4.22  -  MK83  -  MK84  -  PLAN9  -  DFBSD  -  NETBSD  -  NETBSD5  -  NETBSD4  -  NETBSD3  -  NETBSD20  -  OPENBSD  -  xnu-517  -  xnu-792  -  xnu-792.6.70  -  xnu-1228  -  xnu-1456.1.26  -  xnu-1699.24.8  -  xnu-2050.18.24  -  OPENSOLARIS  -  minix-3-1-1 
SearchContext: -  none  -  3  -  10 

    1 /*      $FreeBSD: releng/9.2/sys/netipsec/esp_var.h 252693 2013-07-04 08:59:34Z 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.
   10  *
   11  * Ported to OpenBSD and NetBSD, with additional transforms, in December 1996,
   12  * by Angelos D. Keromytis.
   13  *
   14  * Additional transforms and features in 1997 and 1998 by Angelos D. Keromytis
   15  * and Niels Provos.
   16  *
   17  * Additional features in 1999 by Angelos D. Keromytis.
   18  *
   19  * Copyright (C) 1995, 1996, 1997, 1998, 1999 by John Ioannidis,
   20  * Angelos D. Keromytis and Niels Provos.
   21  * Copyright (c) 2001 Angelos D. Keromytis.
   22  *
   23  * Permission to use, copy, and modify this software with or without fee
   24  * is hereby granted, provided that this entire notice is included in
   25  * all copies of any software which is or includes a copy or
   26  * modification of this software.
   27  * You may use this code under the GNU public license if you so wish. Please
   28  * contribute changes back to the authors under this freer than GPL license
   29  * so that we may further the use of strong encryption without limitations to
   30  * all.
   31  *
   32  * THIS SOFTWARE IS BEING PROVIDED "AS IS", WITHOUT ANY EXPRESS OR
   33  * IMPLIED WARRANTY. IN PARTICULAR, NONE OF THE AUTHORS MAKES ANY
   34  * REPRESENTATION OR WARRANTY OF ANY KIND CONCERNING THE
   35  * MERCHANTABILITY OF THIS SOFTWARE OR ITS FITNESS FOR ANY PARTICULAR
   36  * PURPOSE.
   37  */
   38 
   39 #ifndef _NETIPSEC_ESP_VAR_H_
   40 #define _NETIPSEC_ESP_VAR_H_
   41 
   42 /*
   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 
   50 struct 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 */
   72 };
   73 
   74 #ifdef _KERNEL
   75 VNET_DECLARE(int, esp_enable);
   76 VNET_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_*/

Cache object: ca23c9c95eeb91689789c2cdd4763771


[ source navigation ] [ diff markup ] [ identifier search ] [ freetext search ] [ file search ] [ list types ] [ track identifier ]


This page is part of the FreeBSD/Linux Linux Kernel Cross-Reference, and was automatically generated using a modified version of the LXR engine.