xform_userland.h revision 329175
138032Speter/*-
2111823Sgshapiro * Copyright (c) 2015 Allan Jude <allanjude@FreeBSD.org>
364562Sgshapiro * All rights reserved.
438032Speter *
538032Speter * Redistribution and use in source and binary forms, with or without
638032Speter * modification, are permitted provided that the following conditions
738032Speter * are met:
838032Speter * 1. Redistributions of source code must retain the above copyright
938032Speter *    notice, this list of conditions and the following disclaimer.
1038032Speter * 2. Redistributions in binary form must reproduce the above copyright
1138032Speter *    notice, this list of conditions and the following disclaimer in the
1238032Speter *    documentation and/or other materials provided with the distribution.
1338032Speter *
1490792Sgshapiro * THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND
1590792Sgshapiro * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
1690792Sgshapiro * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
1790792Sgshapiro * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE
1890792Sgshapiro * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
1938032Speter * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
2090792Sgshapiro * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
2173188Sgshapiro * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
2264562Sgshapiro * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
2338032Speter * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
2438032Speter * SUCH DAMAGE.
2538032Speter *
2664562Sgshapiro * $FreeBSD: stable/11/sys/opencrypto/xform_userland.h 329175 2018-02-12 17:44:35Z kevans $
2738032Speter */
28111823Sgshapiro
2938032Speter#ifndef _CRYPTO_XFORM_USERLAND_H_
3038032Speter#define _CRYPTO_XFORM_USERLAND_H_
3164562Sgshapiro
3264562Sgshapiro#ifdef _KERNEL
3364562Sgshapiro#include <sys/systm.h>
3464562Sgshapiro#define KMALLOC(size, type, flags)	malloc(size, type, flags)
3590792Sgshapiro#define KFREE(ptr, type)		free(ptr, type)
3690792Sgshapiro#else /* not _KERNEL */
3790792Sgshapiro#ifdef _STANDALONE
3890792Sgshapiro#include <stand.h>
3990792Sgshapiro#else /* !_STAND */
4090792Sgshapiro#include <stdlib.h>
4190792Sgshapiro#include <string.h>
4290792Sgshapiro#endif /* _STAND */
4390792Sgshapiro#define KMALLOC(size, type, flags)	malloc(size)
4490792Sgshapiro#define KFREE(ptr, type)		free(ptr)
4590792Sgshapiro#endif /* _KERNEL */
4690792Sgshapiro
4777349Sgshapiro
4890792Sgshapiro#endif /* _CRYPTO_XFORM_USERLAND_H_ */
4990792Sgshapiro