xform_comp.h 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. /* $FreeBSD$ */
  2. /* $OpenBSD: xform.h,v 1.8 2001/08/28 12:20:43 ben Exp $ */
  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. #ifndef _CRYPTO_XFORM_COMP_H_
  30. #define _CRYPTO_XFORM_COMP_H_
  31. #include <sys/malloc.h>
  32. #include <sys/errno.h>
  33. #include <opencrypto/deflate.h>
  34. #include <opencrypto/cryptodev.h>
  35. /* Declarations */
  36. struct comp_algo {
  37. int type;
  38. char *name;
  39. size_t minlen;
  40. uint32_t (*compress) (uint8_t *, uint32_t, uint8_t **);
  41. uint32_t (*decompress) (uint8_t *, uint32_t, uint8_t **);
  42. };
  43. extern struct comp_algo comp_algo_deflate;
  44. #endif /* _CRYPTO_XFORM_COMP_H_ */