Path: blob/buildjre8/ios-missing-include/netinet6/esp.h
861 views
/*1* Copyright (c) 2008-2013 Apple Inc. All rights reserved.2*3* @APPLE_OSREFERENCE_LICENSE_HEADER_START@4*5* This file contains Original Code and/or Modifications of Original Code6* as defined in and that are subject to the Apple Public Source License7* Version 2.0 (the 'License'). You may not use this file except in8* compliance with the License. The rights granted to you under the License9* may not be used to create, or enable the creation or redistribution of,10* unlawful or unlicensed copies of an Apple operating system, or to11* circumvent, violate, or enable the circumvention or violation of, any12* terms of an Apple operating system software license agreement.13*14* Please obtain a copy of the License at15* http://www.opensource.apple.com/apsl/ and read it before using this file.16*17* The Original Code and all software distributed under the License are18* distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER19* EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,20* INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,21* FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.22* Please see the License for the specific language governing rights and23* limitations under the License.24*25* @APPLE_OSREFERENCE_LICENSE_HEADER_END@26*/2728/* $FreeBSD: src/sys/netinet6/esp.h,v 1.2.2.2 2001/07/03 11:01:49 ume Exp $ */29/* $KAME: esp.h,v 1.16 2000/10/18 21:28:00 itojun Exp $ */3031/*32* Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.33* All rights reserved.34*35* Redistribution and use in source and binary forms, with or without36* modification, are permitted provided that the following conditions37* are met:38* 1. Redistributions of source code must retain the above copyright39* notice, this list of conditions and the following disclaimer.40* 2. Redistributions in binary form must reproduce the above copyright41* notice, this list of conditions and the following disclaimer in the42* documentation and/or other materials provided with the distribution.43* 3. Neither the name of the project nor the names of its contributors44* may be used to endorse or promote products derived from this software45* without specific prior written permission.46*47* THIS SOFTWARE IS PROVIDED BY THE PROJECT AND CONTRIBUTORS ``AS IS'' AND48* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE49* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE50* ARE DISCLAIMED. IN NO EVENT SHALL THE PROJECT OR CONTRIBUTORS BE LIABLE51* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL52* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS53* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)54* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT55* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY56* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF57* SUCH DAMAGE.58*/5960/*61* RFC1827/2406 Encapsulated Security Payload.62*/6364#ifndef _NETINET6_ESP_H_65#define _NETINET6_ESP_H_66#include <sys/appleapiopts.h>67#include <net/multi_layer_pkt_log.h>6869struct esp {70u_int32_t esp_spi; /* ESP */71/*variable size, 32bit bound*/ /* Initialization Vector */72/*variable size*/ /* Payload data */73/*variable size*/ /* padding */74/*8bit*/ /* pad size */75/*8bit*/ /* next header */76/*8bit*/ /* next header */77/*variable size, 32bit bound*/ /* Authentication data (new IPsec) */78};7980struct newesp {81u_int32_t esp_spi; /* ESP */82u_int32_t esp_seq; /* Sequence number */83/*variable size*/ /* (IV and) Payload data */84/*variable size*/ /* padding */85/*8bit*/ /* pad size */86/*8bit*/ /* next header */87/*8bit*/ /* next header */88/*variable size, 32bit bound*/ /* Authentication data */89};9091struct esptail {92u_int8_t esp_padlen; /* pad length */93u_int8_t esp_nxt; /* Next header */94/*variable size, 32bit bound*/ /* Authentication data (new IPsec)*/95};969798#endif /* _NETINET6_ESP_H_ */99100101