18c2ecf20Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0 */
28c2ecf20Sopenharmony_ci/*
38c2ecf20Sopenharmony_ci * fs/hmdfs/comm/message_verify.h
48c2ecf20Sopenharmony_ci *
58c2ecf20Sopenharmony_ci * Copyright (c) 2020-2021 Huawei Device Co., Ltd.
68c2ecf20Sopenharmony_ci */
78c2ecf20Sopenharmony_ci
88c2ecf20Sopenharmony_ci#ifndef HMDFS_MESSAGE_VERIFY_H
98c2ecf20Sopenharmony_ci#define HMDFS_MESSAGE_VERIFY_H
108c2ecf20Sopenharmony_ci
118c2ecf20Sopenharmony_ci#include "protocol.h"
128c2ecf20Sopenharmony_ci
138c2ecf20Sopenharmony_cienum MESSAGE_LEN_JUDGE_TYPE {
148c2ecf20Sopenharmony_ci	MESSAGE_LEN_JUDGE_RANGE = 0,
158c2ecf20Sopenharmony_ci	MESSAGE_LEN_JUDGE_BIN = 1,
168c2ecf20Sopenharmony_ci};
178c2ecf20Sopenharmony_ci
188c2ecf20Sopenharmony_ci#define HMDFS_MESSAGE_MIN_INDEX		0
198c2ecf20Sopenharmony_ci#define HMDFS_MESSAGE_MAX_INDEX		1
208c2ecf20Sopenharmony_ci#define HMDFS_MESSAGE_LEN_JUDGE_INDEX	2
218c2ecf20Sopenharmony_ci#define HMDFS_MESSAGE_MIN_MAX		3
228c2ecf20Sopenharmony_ci
238c2ecf20Sopenharmony_civoid hmdfs_message_verify_init(void);
248c2ecf20Sopenharmony_ciint hmdfs_message_verify(struct hmdfs_peer *con, struct hmdfs_head_cmd *head,
258c2ecf20Sopenharmony_ci			 void *data);
268c2ecf20Sopenharmony_ci
278c2ecf20Sopenharmony_ci#endif
28