Namjae Jeon | 0626e66 | 2021-03-16 13:07:11 +0900 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0-or-later */ |
| 2 | /* |
| 3 | * Copyright (C) 2018 Samsung Electronics Co., Ltd. |
| 4 | */ |
| 5 | |
| 6 | #ifndef __KSMBD_TRANSPORT_IPC_H__ |
| 7 | #define __KSMBD_TRANSPORT_IPC_H__ |
| 8 | |
| 9 | #include <linux/wait.h> |
Namjae Jeon | 0626e66 | 2021-03-16 13:07:11 +0900 | [diff] [blame] | 10 | |
| 11 | #define KSMBD_IPC_MAX_PAYLOAD 4096 |
| 12 | |
| 13 | struct ksmbd_login_response * |
| 14 | ksmbd_ipc_login_request(const char *account); |
| 15 | |
| 16 | struct ksmbd_session; |
| 17 | struct ksmbd_share_config; |
| 18 | struct ksmbd_tree_connect; |
| 19 | struct sockaddr; |
| 20 | |
| 21 | struct ksmbd_tree_connect_response * |
| 22 | ksmbd_ipc_tree_connect_request(struct ksmbd_session *sess, |
Hyunchul Lee | d7e5852 | 2021-05-29 09:59:59 +0900 | [diff] [blame] | 23 | struct ksmbd_share_config *share, |
| 24 | struct ksmbd_tree_connect *tree_conn, |
| 25 | struct sockaddr *peer_addr); |
Namjae Jeon | 0626e66 | 2021-03-16 13:07:11 +0900 | [diff] [blame] | 26 | int ksmbd_ipc_tree_disconnect_request(unsigned long long session_id, |
| 27 | unsigned long long connect_id); |
Namjae Jeon | 621be84 | 2021-10-13 17:28:31 +0900 | [diff] [blame] | 28 | int ksmbd_ipc_logout_request(const char *account, int flags); |
Namjae Jeon | 0626e66 | 2021-03-16 13:07:11 +0900 | [diff] [blame] | 29 | struct ksmbd_share_config_response * |
| 30 | ksmbd_ipc_share_config_request(const char *name); |
Namjae Jeon | 0626e66 | 2021-03-16 13:07:11 +0900 | [diff] [blame] | 31 | struct ksmbd_spnego_authen_response * |
| 32 | ksmbd_ipc_spnego_authen_request(const char *spnego_blob, int blob_len); |
Namjae Jeon | 0626e66 | 2021-03-16 13:07:11 +0900 | [diff] [blame] | 33 | int ksmbd_ipc_id_alloc(void); |
| 34 | void ksmbd_rpc_id_free(int handle); |
Namjae Jeon | 64b39f4 | 2021-03-30 14:25:35 +0900 | [diff] [blame] | 35 | struct ksmbd_rpc_command *ksmbd_rpc_open(struct ksmbd_session *sess, int handle); |
| 36 | struct ksmbd_rpc_command *ksmbd_rpc_close(struct ksmbd_session *sess, int handle); |
Namjae Jeon | 64b39f4 | 2021-03-30 14:25:35 +0900 | [diff] [blame] | 37 | struct ksmbd_rpc_command *ksmbd_rpc_write(struct ksmbd_session *sess, int handle, |
Namjae Jeon | 070fb21 | 2021-05-26 17:57:12 +0900 | [diff] [blame] | 38 | void *payload, size_t payload_sz); |
Namjae Jeon | 64b39f4 | 2021-03-30 14:25:35 +0900 | [diff] [blame] | 39 | struct ksmbd_rpc_command *ksmbd_rpc_read(struct ksmbd_session *sess, int handle); |
| 40 | struct ksmbd_rpc_command *ksmbd_rpc_ioctl(struct ksmbd_session *sess, int handle, |
Namjae Jeon | 070fb21 | 2021-05-26 17:57:12 +0900 | [diff] [blame] | 41 | void *payload, size_t payload_sz); |
Namjae Jeon | 64b39f4 | 2021-03-30 14:25:35 +0900 | [diff] [blame] | 42 | struct ksmbd_rpc_command *ksmbd_rpc_rap(struct ksmbd_session *sess, void *payload, |
Namjae Jeon | 070fb21 | 2021-05-26 17:57:12 +0900 | [diff] [blame] | 43 | size_t payload_sz); |
Namjae Jeon | 0626e66 | 2021-03-16 13:07:11 +0900 | [diff] [blame] | 44 | void ksmbd_ipc_release(void); |
| 45 | void ksmbd_ipc_soft_reset(void); |
| 46 | int ksmbd_ipc_init(void); |
| 47 | #endif /* __KSMBD_TRANSPORT_IPC_H__ */ |