Path: blob/main/crypto/openssl/apps/include/function.h
34878 views
/*1* Copyright 2019-2020 The OpenSSL Project Authors. All Rights Reserved.2*3* Licensed under the Apache License 2.0 (the "License"). You may not use4* this file except in compliance with the License. You can obtain a copy5* in the file LICENSE in the source distribution or at6* https://www.openssl.org/source/license.html7*/89#ifndef OSSL_APPS_FUNCTION_H10# define OSSL_APPS_FUNCTION_H1112# include <openssl/lhash.h>13# include "opt.h"1415#define DEPRECATED_NO_ALTERNATIVE "unknown"1617typedef enum FUNC_TYPE {18FT_none, FT_general, FT_md, FT_cipher, FT_pkey,19FT_md_alg, FT_cipher_alg20} FUNC_TYPE;2122typedef struct function_st {23FUNC_TYPE type;24const char *name;25int (*func)(int argc, char *argv[]);26const OPTIONS *help;27const char *deprecated_alternative;28const char *deprecated_version;29} FUNCTION;3031DEFINE_LHASH_OF_EX(FUNCTION);3233/* Structure to hold the number of columns to be displayed and the34* field width used to display them.35*/36typedef struct {37int columns;38int width;39} DISPLAY_COLUMNS;4041void calculate_columns(FUNCTION *functions, DISPLAY_COLUMNS *dc);4243#endif444546