2014-11-30 02:12:44 +08:00
|
|
|
#ifndef HEADER_CURL_SMB_H
|
|
|
|
#define HEADER_CURL_SMB_H
|
|
|
|
/***************************************************************************
|
|
|
|
* _ _ ____ _
|
|
|
|
* Project ___| | | | _ \| |
|
|
|
|
* / __| | | | |_) | |
|
|
|
|
* | (__| |_| | _ <| |___
|
|
|
|
* \___|\___/|_| \_\_____|
|
|
|
|
*
|
2023-01-02 20:51:48 +08:00
|
|
|
* Copyright (C) Bill Nagel <wnagel@tycoint.com>, Exacq Technologies
|
|
|
|
* Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
|
2014-11-30 02:12:44 +08:00
|
|
|
*
|
|
|
|
* This software is licensed as described in the file COPYING, which
|
|
|
|
* you should have received as part of this distribution. The terms
|
2020-11-04 21:02:01 +08:00
|
|
|
* are also available at https://curl.se/docs/copyright.html.
|
2014-11-30 02:12:44 +08:00
|
|
|
*
|
|
|
|
* You may opt to use, copy, modify, merge, publish, distribute and/or sell
|
|
|
|
* copies of the Software, and permit persons to whom the Software is
|
|
|
|
* furnished to do so, under the terms of the COPYING file.
|
|
|
|
*
|
|
|
|
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
|
|
|
|
* KIND, either express or implied.
|
|
|
|
*
|
|
|
|
* SPDX-License-Identifier: curl
|
2022-05-17 17:16:50 +08:00
|
|
|
*
|
2014-11-30 02:12:44 +08:00
|
|
|
***************************************************************************/
|
|
|
|
|
2014-11-30 02:33:52 +08:00
|
|
|
enum smb_conn_state {
|
|
|
|
SMB_NOT_CONNECTED = 0,
|
|
|
|
SMB_CONNECTING,
|
|
|
|
SMB_NEGOTIATE,
|
|
|
|
SMB_SETUP,
|
2014-11-30 06:06:04 +08:00
|
|
|
SMB_CONNECTED
|
2014-11-30 02:33:52 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
struct smb_conn {
|
|
|
|
enum smb_conn_state state;
|
|
|
|
char *user;
|
|
|
|
char *domain;
|
2018-07-29 23:58:10 +08:00
|
|
|
char *share;
|
2014-11-30 02:33:52 +08:00
|
|
|
unsigned char challenge[8];
|
|
|
|
unsigned int session_key;
|
|
|
|
unsigned short uid;
|
|
|
|
char *recv_buf;
|
2024-02-28 21:51:53 +08:00
|
|
|
char *send_buf;
|
2014-12-30 21:09:31 +08:00
|
|
|
size_t upload_size;
|
2014-11-30 02:33:52 +08:00
|
|
|
size_t send_size;
|
|
|
|
size_t sent;
|
|
|
|
size_t got;
|
|
|
|
};
|
|
|
|
|
2020-08-03 16:33:17 +08:00
|
|
|
#if !defined(CURL_DISABLE_SMB) && defined(USE_CURL_NTLM_CORE) && \
|
2021-03-08 19:30:56 +08:00
|
|
|
(SIZEOF_CURL_OFF_T > 4)
|
2014-11-30 23:39:14 +08:00
|
|
|
|
|
|
|
extern const struct Curl_handler Curl_handler_smb;
|
|
|
|
extern const struct Curl_handler Curl_handler_smbs;
|
|
|
|
|
2020-08-03 16:33:17 +08:00
|
|
|
#endif /* CURL_DISABLE_SMB && USE_CURL_NTLM_CORE &&
|
2021-03-08 19:30:56 +08:00
|
|
|
SIZEOF_CURL_OFF_T > 4 */
|
2014-11-30 23:39:14 +08:00
|
|
|
|
2014-11-30 02:12:44 +08:00
|
|
|
#endif /* HEADER_CURL_SMB_H */
|