No empty .Rs/.Re
[netbsd-mini2440.git] / sys / opencrypto / cryptosoft.h
blob75a48a6ea6906d58004b8eab14512f3fee2f75da
1 /* $NetBSD: cryptosoft.h,v 1.5 2007/03/04 06:03:40 christos Exp $ */
2 /* $OpenBSD: cryptosoft.h,v 1.10 2002/04/22 23:10:09 deraadt Exp $ */
4 /*
5 * The author of this code is Angelos D. Keromytis (angelos@cis.upenn.edu)
7 * This code was written by Angelos D. Keromytis in Athens, Greece, in
8 * February 2000. Network Security Technologies Inc. (NSTI) kindly
9 * supported the development of this code.
11 * Copyright (c) 2000 Angelos D. Keromytis
13 * Permission to use, copy, and modify this software with or without fee
14 * is hereby granted, provided that this entire notice is included in
15 * all source code copies of any software which is or includes a copy or
16 * modification of this software.
18 * THIS SOFTWARE IS BEING PROVIDED "AS IS", WITHOUT ANY EXPRESS OR
19 * IMPLIED WARRANTY. IN PARTICULAR, NONE OF THE AUTHORS MAKES ANY
20 * REPRESENTATION OR WARRANTY OF ANY KIND CONCERNING THE
21 * MERCHANTABILITY OF THIS SOFTWARE OR ITS FITNESS FOR ANY PARTICULAR
22 * PURPOSE.
25 #ifndef _CRYPTO_CRYPTOSOFT_H_
26 #define _CRYPTO_CRYPTOSOFT_H_
28 /* Software session entry */
29 struct swcr_data {
30 int sw_alg; /* Algorithm */
31 union {
32 struct {
33 u_int8_t *SW_ictx;
34 u_int8_t *SW_octx;
35 u_int32_t SW_klen;
36 const struct swcr_auth_hash *SW_axf;
37 } SWCR_AUTH;
38 struct {
39 u_int8_t *SW_kschedule;
40 const struct swcr_enc_xform *SW_exf;
41 } SWCR_ENC;
42 struct {
43 u_int32_t SW_size;
44 u_int32_t SW_crc;
45 const struct swcr_comp_algo *SW_cxf;
46 } SWCR_COMP;
47 } SWCR_UN;
49 #define sw_ictx SWCR_UN.SWCR_AUTH.SW_ictx
50 #define sw_octx SWCR_UN.SWCR_AUTH.SW_octx
51 #define sw_klen SWCR_UN.SWCR_AUTH.SW_klen
52 #define sw_axf SWCR_UN.SWCR_AUTH.SW_axf
53 #define sw_kschedule SWCR_UN.SWCR_ENC.SW_kschedule
54 #define sw_exf SWCR_UN.SWCR_ENC.SW_exf
55 #define sw_size SWCR_UN.SWCR_COMP.SW_size
56 #define sw_cxf SWCR_UN.SWCR_COMP.SW_cxf
58 struct swcr_data *sw_next;
61 #ifdef _KERNEL
62 int swcr_authcompute(struct cryptop *crp, struct cryptodesc *crd,
63 struct swcr_data *sw, void *buf, int outtype);
64 #endif /* _KERNEL */
66 #endif /* _CRYPTO_CRYPTO_H_ */