You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
44 lines
1.1 KiB
44 lines
1.1 KiB
/*
|
|
* Copyright (c) Hisilicon Technologies Co., Ltd. 2020-2021. All rights reserved.
|
|
* Description: This file is for interpreting the configuration file.
|
|
* Author: Hisilicon
|
|
* Create: 2020-06-11
|
|
*/
|
|
|
|
#ifndef PARSE_CONFIG_FILE
|
|
#define PARSE_CONFIG_FILE
|
|
|
|
#include "td_type.h"
|
|
|
|
#ifdef __cplusplus
|
|
#if __cplusplus
|
|
extern "C" {
|
|
#endif
|
|
#endif /* End of #ifdef __cplusplus */
|
|
|
|
#define MAX_FILE_NAME_LEN 1024
|
|
#define MAX_VAR_NUM 128
|
|
#define MAX_VAR_NAME_LEN 128
|
|
#define MAX_VAR_VALUE_LEN MAX_FILE_NAME_LEN
|
|
|
|
#define SESSIONKEY_TAG "SESSIONKEY1"
|
|
#define CONTENTKEY_TAG "CONTENTKEY"
|
|
#define IV_TAG "IV"
|
|
#define PKT_INPUT_DATA "PKTDATAIN"
|
|
#define CIPHER_INPUT_DATA "CIPHERDATAIN"
|
|
#define unused(x) (x) = (x)
|
|
|
|
td_s32 parse_config_file(const td_char *path_to_config_file, td_s32 *var_num);
|
|
|
|
td_s32 get_key_value(const td_char *name, td_u8 *key, td_u32 key_len);
|
|
|
|
td_char *get_config_var(const td_char *var_name);
|
|
|
|
#ifdef __cplusplus
|
|
#if __cplusplus
|
|
}
|
|
#endif
|
|
#endif /* End of #ifdef __cplusplus */
|
|
|
|
#endif /* End of #ifndef PARSE_CFG_FILE_H */
|