2 * Copyright 2016 The OpenSSL Project Authors. All Rights Reserved.
4 * Licensed under the OpenSSL license (the "License"). You may not use
5 * this file except in compliance with the License. You can obtain a copy
6 * in the file LICENSE in the source distribution or at
7 * https://www.openssl.org/source/license.html
10 #ifndef HEADER_AFALG_H
11 # define HEADER_AFALG_H
14 # define ALG_DGB(x, ...) fprintf(stderr, "ALG_DBG: " x, __VA_ARGS__)
15 # define ALG_INFO(x, ...) fprintf(stderr, "ALG_INFO: " x, __VA_ARGS__)
16 # define ALG_WARN(x, ...) fprintf(stderr, "ALG_WARN: " x, __VA_ARGS__)
18 # define ALG_DGB(x, ...)
19 # define ALG_INFO(x, ...)
20 # define ALG_WARN(x, ...)
23 # define ALG_ERR(x, ...) fprintf(stderr, "ALG_ERR: " x, __VA_ARGS__)
24 # define ALG_PERR(x, ...) \
26 fprintf(stderr, "ALG_PERR: " x, __VA_ARGS__); \
29 # define ALG_PWARN(x, ...) \
31 fprintf(stderr, "ALG_PERR: " x, __VA_ARGS__); \
35 # ifndef AES_BLOCK_SIZE
36 # define AES_BLOCK_SIZE 16
38 # define AES_KEY_SIZE_128 16
39 # define AES_IV_LEN 16
41 # define MAX_INFLIGHTS 1
52 aio_context_t aio_ctx;
53 struct io_event events[MAX_INFLIGHTS];
54 struct iocb cbt[MAX_INFLIGHTS];
56 typedef struct afalg_aio_st afalg_aio;
59 * MAGIC Number to identify correct initialisation
62 # define MAGIC_INIT_NUM 0x1890671
74 typedef struct afalg_ctx_st afalg_ctx;