1 | #ifndef HEADER_CURL_SMB_H
|
---|
2 | #define HEADER_CURL_SMB_H
|
---|
3 | /***************************************************************************
|
---|
4 | * _ _ ____ _
|
---|
5 | * Project ___| | | | _ \| |
|
---|
6 | * / __| | | | |_) | |
|
---|
7 | * | (__| |_| | _ <| |___
|
---|
8 | * \___|\___/|_| \_\_____|
|
---|
9 | *
|
---|
10 | * Copyright (C) Bill Nagel <[email protected]>, Exacq Technologies
|
---|
11 | * Copyright (C) Daniel Stenberg, <[email protected]>, et al.
|
---|
12 | *
|
---|
13 | * This software is licensed as described in the file COPYING, which
|
---|
14 | * you should have received as part of this distribution. The terms
|
---|
15 | * are also available at https://curl.se/docs/copyright.html.
|
---|
16 | *
|
---|
17 | * You may opt to use, copy, modify, merge, publish, distribute and/or sell
|
---|
18 | * copies of the Software, and permit persons to whom the Software is
|
---|
19 | * furnished to do so, under the terms of the COPYING file.
|
---|
20 | *
|
---|
21 | * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
|
---|
22 | * KIND, either express or implied.
|
---|
23 | *
|
---|
24 | * SPDX-License-Identifier: curl
|
---|
25 | *
|
---|
26 | ***************************************************************************/
|
---|
27 |
|
---|
28 | enum smb_conn_state {
|
---|
29 | SMB_NOT_CONNECTED = 0,
|
---|
30 | SMB_CONNECTING,
|
---|
31 | SMB_NEGOTIATE,
|
---|
32 | SMB_SETUP,
|
---|
33 | SMB_CONNECTED
|
---|
34 | };
|
---|
35 |
|
---|
36 | struct smb_conn {
|
---|
37 | enum smb_conn_state state;
|
---|
38 | char *user;
|
---|
39 | char *domain;
|
---|
40 | char *share;
|
---|
41 | unsigned char challenge[8];
|
---|
42 | unsigned int session_key;
|
---|
43 | unsigned short uid;
|
---|
44 | char *recv_buf;
|
---|
45 | char *send_buf;
|
---|
46 | size_t upload_size;
|
---|
47 | size_t send_size;
|
---|
48 | size_t sent;
|
---|
49 | size_t got;
|
---|
50 | };
|
---|
51 |
|
---|
52 | #if !defined(CURL_DISABLE_SMB) && defined(USE_CURL_NTLM_CORE) && \
|
---|
53 | (SIZEOF_CURL_OFF_T > 4)
|
---|
54 |
|
---|
55 | extern const struct Curl_handler Curl_handler_smb;
|
---|
56 | extern const struct Curl_handler Curl_handler_smbs;
|
---|
57 |
|
---|
58 | #endif /* CURL_DISABLE_SMB && USE_CURL_NTLM_CORE &&
|
---|
59 | SIZEOF_CURL_OFF_T > 4 */
|
---|
60 |
|
---|
61 | #endif /* HEADER_CURL_SMB_H */
|
---|