nx.h (699B)
1/* SPDX-License-Identifier: GPL-2.0-or-later */ 2/* 3 * Copyright 2020 IBM Corp. 4 * 5 */ 6#ifndef _NX_H 7#define _NX_H 8 9#include <stdbool.h> 10 11#define NX_FUNC_COMP_842 1 12#define NX_FUNC_COMP_GZIP 2 13 14#ifndef __aligned 15#define __aligned(x) __attribute__((aligned(x))) 16#endif 17 18struct nx842_func_args { 19 bool use_crc; 20 bool decompress; /* true decompress; false compress */ 21 bool move_data; 22 int timeout; /* seconds */ 23}; 24 25struct nxbuf_t { 26 int len; 27 char *buf; 28}; 29 30/* @function should be EFT (aka 842), GZIP etc */ 31void *nx_function_begin(int function, int pri); 32 33int nx_function(void *handle, struct nxbuf_t *in, struct nxbuf_t *out, 34 void *arg); 35 36int nx_function_end(void *handle); 37 38#endif /* _NX_H */