175115Sfenner/* $NetBSD: esp.h,v 1.13 2000/09/26 08:37:38 itojun Exp $ */ 275115Sfenner/* $KAME: esp.h,v 1.15 2000/09/20 18:15:22 itojun Exp $ */ 375115Sfenner 475115Sfenner/* 575115Sfenner * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project. 675115Sfenner * All rights reserved. 775115Sfenner * 875115Sfenner * Redistribution and use in source and binary forms, with or without 975115Sfenner * modification, are permitted provided that the following conditions 1075115Sfenner * are met: 1175115Sfenner * 1. Redistributions of source code must retain the above copyright 1275115Sfenner * notice, this list of conditions and the following disclaimer. 1375115Sfenner * 2. Redistributions in binary form must reproduce the above copyright 1475115Sfenner * notice, this list of conditions and the following disclaimer in the 1575115Sfenner * documentation and/or other materials provided with the distribution. 1675115Sfenner * 3. Neither the name of the project nor the names of its contributors 1775115Sfenner * may be used to endorse or promote products derived from this software 1875115Sfenner * without specific prior written permission. 1975115Sfenner * 2075115Sfenner * THIS SOFTWARE IS PROVIDED BY THE PROJECT AND CONTRIBUTORS ``AS IS'' AND 2175115Sfenner * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 2275115Sfenner * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 2375115Sfenner * ARE DISCLAIMED. IN NO EVENT SHALL THE PROJECT OR CONTRIBUTORS BE LIABLE 2475115Sfenner * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 2575115Sfenner * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 2675115Sfenner * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 2775115Sfenner * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 2875115Sfenner * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 2975115Sfenner * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 3075115Sfenner * SUCH DAMAGE. 3175115Sfenner */ 3275115Sfenner 3375115Sfenner/* 3475115Sfenner * RFC1827/2406 Encapsulated Security Payload. 3575115Sfenner */ 3675115Sfenner 3775115Sfenner#ifndef _NETINET6_ESP_H_ 3875115Sfenner#define _NETINET6_ESP_H_ 3975115Sfenner 4075115Sfennerstruct esp { 4175115Sfenner u_int32_t esp_spi; /* ESP */ 4275115Sfenner /*variable size, 32bit bound*/ /* Initialization Vector */ 4375115Sfenner /*variable size*/ /* Payload data */ 4475115Sfenner /*variable size*/ /* padding */ 4575115Sfenner /*8bit*/ /* pad size */ 4675115Sfenner /*8bit*/ /* next header */ 4775115Sfenner /*8bit*/ /* next header */ 4875115Sfenner /*variable size, 32bit bound*/ /* Authentication data (new IPsec) */ 4975115Sfenner}; 5075115Sfenner 5175115Sfennerstruct newesp { 5275115Sfenner u_int32_t esp_spi; /* ESP */ 5375115Sfenner u_int32_t esp_seq; /* Sequence number */ 5475115Sfenner /*variable size*/ /* (IV and) Payload data */ 5575115Sfenner /*variable size*/ /* padding */ 5675115Sfenner /*8bit*/ /* pad size */ 5775115Sfenner /*8bit*/ /* next header */ 5875115Sfenner /*8bit*/ /* next header */ 5975115Sfenner /*variable size, 32bit bound*/ /* Authentication data */ 6075115Sfenner}; 6175115Sfenner 6275115Sfennerstruct esptail { 6375115Sfenner u_int8_t esp_padlen; /* pad length */ 6475115Sfenner u_int8_t esp_nxt; /* Next header */ 6575115Sfenner /*variable size, 32bit bound*/ /* Authentication data (new IPsec)*/ 6675115Sfenner}; 6775115Sfenner 6875115Sfenner#endif /*_NETINET6_ESP_H_*/ 69