• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /* SPDX-License-Identifier: GPL-2.0 */
2 /*
3  * fs/hmdfs/comm/message_verify.h
4  *
5  * Copyright (c) 2020-2021 Huawei Device Co., Ltd.
6  */
7 
8 #ifndef HMDFS_MESSAGE_VERIFY_H
9 #define HMDFS_MESSAGE_VERIFY_H
10 
11 #include "protocol.h"
12 
13 enum MESSAGE_LEN_JUDGE_TYPE {
14 	MESSAGE_LEN_JUDGE_RANGE = 0,
15 	MESSAGE_LEN_JUDGE_BIN = 1,
16 };
17 
18 #define HMDFS_MESSAGE_MIN_INDEX		0
19 #define HMDFS_MESSAGE_MAX_INDEX		1
20 #define HMDFS_MESSAGE_LEN_JUDGE_INDEX	2
21 #define HMDFS_MESSAGE_MIN_MAX		3
22 
23 void hmdfs_message_verify_init(void);
24 int hmdfs_message_verify(struct hmdfs_peer *con, struct hmdfs_head_cmd *head,
25 			 void *data);
26 
27 #endif
28