xref: /freebsd/sys/opencrypto/xform_comp.h (revision d9f0ce31900a48d1a2bfc1c8c86f79d1e831451a)
1 /*	$FreeBSD$	*/
2 /*	$OpenBSD: xform.h,v 1.8 2001/08/28 12:20:43 ben Exp $	*/
3 
4 /*-
5  * The author of this code is Angelos D. Keromytis (angelos@cis.upenn.edu)
6  *
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.
10  *
11  * Copyright (c) 2000 Angelos D. Keromytis
12  * Copyright (c) 2014 The FreeBSD Foundation
13  * All rights reserved.
14  *
15  * Portions of this software were developed by John-Mark Gurney
16  * under sponsorship of the FreeBSD Foundation and
17  * Rubicon Communications, LLC (Netgate).
18  *
19  * Permission to use, copy, and modify this software without fee
20  * is hereby granted, provided that this entire notice is included in
21  * all source code copies of any software which is or includes a copy or
22  * modification of this software.
23  *
24  * THIS SOFTWARE IS BEING PROVIDED "AS IS", WITHOUT ANY EXPRESS OR
25  * IMPLIED WARRANTY. IN PARTICULAR, NONE OF THE AUTHORS MAKES ANY
26  * REPRESENTATION OR WARRANTY OF ANY KIND CONCERNING THE
27  * MERCHANTABILITY OF THIS SOFTWARE OR ITS FITNESS FOR ANY PARTICULAR
28  * PURPOSE.
29  */
30 
31 #ifndef _CRYPTO_XFORM_COMP_H_
32 #define _CRYPTO_XFORM_COMP_H_
33 
34 #include <sys/malloc.h>
35 #include <sys/errno.h>
36 
37 #include <opencrypto/deflate.h>
38 #include <opencrypto/cryptodev.h>
39 #include <opencrypto/xform_userland.h>
40 
41 /* Declarations */
42 struct comp_algo {
43 	int type;
44 	char *name;
45 	size_t minlen;
46 	u_int32_t (*compress) (u_int8_t *, u_int32_t, u_int8_t **);
47 	u_int32_t (*decompress) (u_int8_t *, u_int32_t, u_int8_t **);
48 };
49 
50 extern struct comp_algo comp_algo_deflate;
51 
52 #endif /* _CRYPTO_XFORM_COMP_H_ */
53