8579 ixgbe infinite loops in rar and vmdq clearing
[unleashed.git] / usr / src / uts / common / des / des.h
blob002b9ab2f865c587d27885922251efabffcbbd68
1 /*
2 * CDDL HEADER START
4 * The contents of this file are subject to the terms of the
5 * Common Development and Distribution License, Version 1.0 only
6 * (the "License"). You may not use this file except in compliance
7 * with the License.
9 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10 * or http://www.opensolaris.org/os/licensing.
11 * See the License for the specific language governing permissions
12 * and limitations under the License.
14 * When distributing Covered Code, include this CDDL HEADER in each
15 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16 * If applicable, add the following below this CDDL HEADER, with the
17 * fields enclosed by brackets "[]" replaced with your own identifying
18 * information: Portions Copyright [yyyy] [name of copyright owner]
20 * CDDL HEADER END
22 * Copyright 1998 Sun Microsystems, Inc. All rights reserved.
23 * Use is subject to license terms.
26 /* Copyright (c) 1983, 1984, 1985, 1986, 1987, 1988, 1989 AT&T */
27 /* All Rights Reserved */
30 * Portions of this source code were derived from Berkeley 4.3 BSD
31 * under license from the Regents of the University of California.
34 #ifndef _SYS_DES_H
35 #define _SYS_DES_H
38 * Generic DES driver interface
39 * Keep this file hardware independent!
42 #include <sys/ioccom.h>
44 #ifdef __cplusplus
45 extern "C" {
46 #endif
48 #define DES_MAXLEN 65536 /* maximum # of bytes to encrypt */
49 #define DES_QUICKLEN 16 /* maximum # of bytes to encrypt quickly */
51 enum desdir { ENCRYPT, DECRYPT };
52 enum desmode { CBC, ECB };
55 * parameters to ioctl call
57 struct desparams {
58 uchar_t des_key[8]; /* key (with low bit parity) */
59 enum desdir des_dir; /* direction */
60 enum desmode des_mode; /* mode */
61 uchar_t des_ivec[8]; /* input vector */
62 unsigned int des_len; /* number of bytes to crypt */
63 union {
64 uchar_t UDES_data[DES_QUICKLEN];
65 uchar_t *UDES_buf;
66 } UDES;
67 #define des_data UDES.UDES_data /* direct data here if quick */
68 #define des_buf UDES.UDES_buf /* otherwise, pointer to data */
72 * Encrypt an arbitrary sized buffer
74 #define DESIOCBLOCK _IOWR('d', 6, struct desparams)
77 * Encrypt of small amount of data, quickly
79 #define DESIOCQUICK _IOWR('d', 7, struct desparams)
81 #ifdef __cplusplus
83 #endif
85 #endif /* _SYS_DES_H */