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