1 /* 2 Unix SMB/CIFS implementation. 3 mdssvc client functions 4 5 Copyright (C) Ralph Boehme 2019 6 7 This program is free software; you can redistribute it and/or modify 8 it under the terms of the GNU General Public License as published by 9 the Free Software Foundation; either version 3 of the License, or 10 (at your option) any later version. 11 12 This program is distributed in the hope that it will be useful, 13 but WITHOUT ANY WARRANTY; without even the implied warranty of 14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 GNU General Public License for more details. 16 17 You should have received a copy of the GNU General Public License 18 along with this program. If not, see <http://www.gnu.org/licenses/>. 19 */ 20 21 #ifndef _MDSCLI_PRIVATE_H_ 22 #define _MDSCLI_PRIVATE_H_ 23 24 struct mdsctx_id { 25 uint64_t id; 26 uint64_t connection; 27 }; 28 29 struct mdscli_ctx { 30 uint64_t async_pending; 31 32 struct dcerpc_binding_handle *bh; 33 struct policy_handle ph; 34 35 struct mdsctx_id ctx_id; 36 size_t max_fragment_size; 37 38 /* Known fields used across multiple commands */ 39 uint32_t dev; 40 uint32_t flags; 41 42 /* cmd specific or unknown fields */ 43 struct { 44 char share_path[1025]; 45 uint32_t unkn2; 46 uint32_t unkn3; 47 } mdscmd_open; 48 struct { 49 uint32_t status; 50 uint32_t unkn7; 51 } mdscmd_unknown1; 52 struct { 53 uint32_t fragment; 54 uint32_t unkn9; 55 } mdscmd_cmd; 56 struct { 57 uint32_t status; 58 } mdscmd_close; 59 }; 60 61 struct mdscli_search_ctx { 62 struct mdscli_ctx *mdscli_ctx; 63 struct mdsctx_id ctx_id; 64 uint64_t unique_id; 65 bool live; 66 char *path_scope; 67 char *mds_query; 68 }; 69 70 #endif /* _MDSCLI_PRIVATE_H_ */ 71