Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: GPL-2.0-or-later */
0002 /*
0003  * Copyright 2020 IBM Corp.
0004  *
0005  */
0006 #ifndef _NX_H
0007 #define _NX_H
0008 
0009 #include <stdbool.h>
0010 
0011 #define NX_FUNC_COMP_842    1
0012 #define NX_FUNC_COMP_GZIP   2
0013 
0014 #ifndef __aligned
0015 #define __aligned(x)    __attribute__((aligned(x)))
0016 #endif
0017 
0018 struct nx842_func_args {
0019     bool use_crc;
0020     bool decompress;        /* true decompress; false compress */
0021     bool move_data;
0022     int timeout;            /* seconds */
0023 };
0024 
0025 struct nxbuf_t {
0026     int len;
0027     char *buf;
0028 };
0029 
0030 /* @function should be EFT (aka 842), GZIP etc */
0031 void *nx_function_begin(int function, int pri);
0032 
0033 int nx_function(void *handle, struct nxbuf_t *in, struct nxbuf_t *out,
0034         void *arg);
0035 
0036 int nx_function_end(void *handle);
0037 
0038 #endif  /* _NX_H */