WS63 SDK 文档 7021f4f@fbb_ws63
ws63 和 ws63e 解决方案的 SDK 文档
载入中...
搜索中...
未找到
diag_cmd_password_st.h
浏览该文件的文档.
1/*
2 * Copyright (c) HiSilicon (Shanghai) Technologies Co., Ltd. 2023-2023. All rights reserved.
3 * Description: dfx password st
4 * This file should be changed only infrequently and with great care.
5 */
6
7#ifndef DIAG_CMD_PASSWORD_ST_H
8#define DIAG_CMD_PASSWORD_ST_H
9
10#include <stdint.h>
11
12#define DIAG_CONN_VERTIFY_SIZE 384
13#define DIAG_PWD_MAX_LEN 32
14#define DIAG_CONN_PUB_DATA_SIZE 384
15#define EXT_DIAG_CONN_ERR_OK 0 /* Connection verification succeeded */
16#define EXT_DIAG_CONN_ERR_SYS_CALL 1 /* Connection verification system error */
17#define EXT_DIAG_CONN_ERR_PASS_WORD_WRONG 2 /* Connection verification password error */
18#define EXT_DIAG_CONN_ERR_ACCOUNT_LOCK 3 /* Connection verification account lock */
19#define EXT_DIAG_CONN_ERR_BUSY 6 /* Connection needs to preempt */
20
21#define EXT_CHANGE_PWD_ERR_OK 0 /* password has been updated */
22#define EXT_CHANGE_PWD_ERR_SYS_CALL 1 /* System error */
23#define EXT_CHANGE_PWD_ERR_NOT_SUPPORT 2 /* Not support change password */
24#define EXT_CHANGE_PWD_ERR_PASSWORD_WRONG 3 /* The original password is incorrect */
25#define EXT_CHANGE_PWD_ERR_ACCOUNT_LOCK 4 /* Account Lock */
26#define EXT_CHANGE_PWD_ERR_PASSWORD_FORMAT_ERR 5 /* The password format is incorrect */
27
28typedef struct {
29 uint16_t err_no; /* Error code (as above) */
30 uint16_t res_try_cnt; /* Remaining retries (units) */
31 uint16_t res_lock_time; /* Remaining lock duration (unit s) */
32 uint16_t pad; /* Reserved */
34
35typedef struct {
38
39/* diag connect rsp pub_b */
40#define DIAG_CONN_SALT_SIZE 20
41typedef struct {
43 uint8_t salt[DIAG_CONN_SALT_SIZE];
44 uint32_t salt_len;
45 diag_cmd_conn_auth_ind_stru_t ret_ind; /* In order to be compatible with the old version, put it at the end */
47
48/* diag connect req m */
49#define DIAG_CONN_KEY_HASH_SIZE 32
50typedef struct {
51 uint8_t req_m1[DIAG_CONN_KEY_HASH_SIZE];
53
54/* diag connect rsp m */
55typedef struct {
56 uint32_t ret; /* ERRCODE_SUCC;ERRCODE_FAIL. */
57 uint8_t rsp_m2[DIAG_CONN_KEY_HASH_SIZE];
58 diag_cmd_conn_auth_ind_stru_t ret_ind; /* In order to be compatible with the old version, put it at the end */
60
61typedef struct {
62 uint8_t conn_vertify[384]; /* 128 byte */
63 uint8_t conn_salt[20]; /* 20 count */
64 uint32_t salt_len;
66
67typedef struct {
68 uint8_t old_pwd[DIAG_PWD_MAX_LEN];
69 uint8_t new_pwd[DIAG_PWD_MAX_LEN];
70 uint8_t new_salt[DIAG_CONN_SALT_SIZE];
71 uint8_t old_pwd_len;
72 uint8_t new_pwd_len;
73 uint8_t new_salt_len;
74 uint8_t pad;
76
78#endif
#define DIAG_CONN_PUB_DATA_SIZE
Definition diag_cmd_password_st.h:14
#define DIAG_CONN_KEY_HASH_SIZE
Definition diag_cmd_password_st.h:49
#define DIAG_CONN_SALT_SIZE
Definition diag_cmd_password_st.h:40
#define DIAG_PWD_MAX_LEN
Definition diag_cmd_password_st.h:13
diag_cmd_conn_auth_ind_stru_t diag_cmd_change_pwd_ind_stru_t
Definition diag_cmd_password_st.h:77
Definition diag_cmd_password_st.h:67
uint8_t pad
Definition diag_cmd_password_st.h:74
uint8_t new_salt_len
Definition diag_cmd_password_st.h:73
uint8_t old_pwd_len
Definition diag_cmd_password_st.h:71
uint8_t new_pwd_len
Definition diag_cmd_password_st.h:72
Definition diag_cmd_password_st.h:28
uint16_t pad
Definition diag_cmd_password_st.h:32
uint16_t err_no
Definition diag_cmd_password_st.h:29
uint16_t res_lock_time
Definition diag_cmd_password_st.h:31
uint16_t res_try_cnt
Definition diag_cmd_password_st.h:30
Definition diag_cmd_password_st.h:50
Definition diag_cmd_password_st.h:35
Definition diag_cmd_password_st.h:55
diag_cmd_conn_auth_ind_stru_t ret_ind
Definition diag_cmd_password_st.h:58
uint32_t ret
Definition diag_cmd_password_st.h:56
Definition diag_cmd_password_st.h:41
diag_cmd_conn_auth_ind_stru_t ret_ind
Definition diag_cmd_password_st.h:45
uint32_t salt_len
Definition diag_cmd_password_st.h:44
Definition diag_cmd_password_st.h:61
uint32_t salt_len
Definition diag_cmd_password_st.h:64