]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - sys/netipsec/key_var.h
amd64: use register macros for gdb_cpu_getreg()
[FreeBSD/FreeBSD.git] / sys / netipsec / key_var.h
1 /*      $FreeBSD$       */
2 /*      $KAME: key_var.h,v 1.11 2001/09/12 23:05:07 sakane Exp $        */
3
4 /*-
5  * SPDX-License-Identifier: BSD-3-Clause
6  *
7  * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
8  * All rights reserved.
9  *
10  * Redistribution and use in source and binary forms, with or without
11  * modification, are permitted provided that the following conditions
12  * are met:
13  * 1. Redistributions of source code must retain the above copyright
14  *    notice, this list of conditions and the following disclaimer.
15  * 2. Redistributions in binary form must reproduce the above copyright
16  *    notice, this list of conditions and the following disclaimer in the
17  *    documentation and/or other materials provided with the distribution.
18  * 3. Neither the name of the project nor the names of its contributors
19  *    may be used to endorse or promote products derived from this software
20  *    without specific prior written permission.
21  *
22  * THIS SOFTWARE IS PROVIDED BY THE PROJECT AND CONTRIBUTORS ``AS IS'' AND
23  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
24  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
25  * ARE DISCLAIMED.  IN NO EVENT SHALL THE PROJECT OR CONTRIBUTORS BE LIABLE
26  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
27  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
28  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
29  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
30  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
31  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
32  * SUCH DAMAGE.
33  */
34
35 #ifndef _NETIPSEC_KEY_VAR_H_
36 #define _NETIPSEC_KEY_VAR_H_
37
38 /* sysctl */
39 #define KEYCTL_DEBUG_LEVEL              1
40 #define KEYCTL_SPI_TRY                  2
41 #define KEYCTL_SPI_MIN_VALUE            3
42 #define KEYCTL_SPI_MAX_VALUE            4
43 #define KEYCTL_RANDOM_INT               5
44 #define KEYCTL_LARVAL_LIFETIME          6
45 #define KEYCTL_BLOCKACQ_COUNT           7
46 #define KEYCTL_BLOCKACQ_LIFETIME        8
47 #define KEYCTL_ESP_KEYMIN               9
48 #define KEYCTL_ESP_AUTH                 10
49 #define KEYCTL_AH_KEYMIN                11
50 #define KEYCTL_PREFERED_OLDSA           12
51
52 #ifdef _KERNEL
53 #define _ARRAYLEN(p) (sizeof(p)/sizeof(p[0]))
54 #define _KEYLEN(key) ((u_int)((key)->bits >> 3))
55 #define _KEYBITS(key) ((u_int)((key)->bits))
56 #define _KEYBUF(key) ((caddr_t)((caddr_t)(key) + sizeof(struct sadb_key)))
57 #endif /*_KERNEL*/
58
59 #endif /* _NETIPSEC_KEY_VAR_H_ */