Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: GPL-2.0-or-later */
0002 /*
0003  *   Copyright (C) 2018 Samsung Electronics Co., Ltd.
0004  */
0005 
0006 #ifndef __KSMBD_IDA_MANAGEMENT_H__
0007 #define __KSMBD_IDA_MANAGEMENT_H__
0008 
0009 #include <linux/slab.h>
0010 #include <linux/idr.h>
0011 
0012 /*
0013  * 2.2.1.6.7 TID Generation
0014  *    The value 0xFFFF MUST NOT be used as a valid TID. All other
0015  *    possible values for TID, including zero (0x0000), are valid.
0016  *    The value 0xFFFF is used to specify all TIDs or no TID,
0017  *    depending upon the context in which it is used.
0018  */
0019 int ksmbd_acquire_smb2_tid(struct ida *ida);
0020 
0021 /*
0022  * 2.2.1.6.8 UID Generation
0023  *    The value 0xFFFE was declared reserved in the LAN Manager 1.0
0024  *    documentation, so a value of 0xFFFE SHOULD NOT be used as a
0025  *    valid UID.<21> All other possible values for a UID, excluding
0026  *    zero (0x0000), are valid.
0027  */
0028 int ksmbd_acquire_smb2_uid(struct ida *ida);
0029 int ksmbd_acquire_async_msg_id(struct ida *ida);
0030 
0031 int ksmbd_acquire_id(struct ida *ida);
0032 
0033 void ksmbd_release_id(struct ida *ida, int id);
0034 #endif /* __KSMBD_IDA_MANAGEMENT_H__ */