xref: /third_party/curl/lib/smb.h (revision 13498266)
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 <wnagel@tycoint.com>, Exacq Technologies
11 * Copyright (C) Daniel Stenberg, <daniel@haxx.se>, 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
28enum smb_conn_state {
29  SMB_NOT_CONNECTED = 0,
30  SMB_CONNECTING,
31  SMB_NEGOTIATE,
32  SMB_SETUP,
33  SMB_CONNECTED
34};
35
36struct 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  size_t upload_size;
46  size_t send_size;
47  size_t sent;
48  size_t got;
49};
50
51#if !defined(CURL_DISABLE_SMB) && defined(USE_CURL_NTLM_CORE) && \
52    (SIZEOF_CURL_OFF_T > 4)
53
54extern const struct Curl_handler Curl_handler_smb;
55extern const struct Curl_handler Curl_handler_smbs;
56
57#endif /* CURL_DISABLE_SMB && USE_CURL_NTLM_CORE &&
58          SIZEOF_CURL_OFF_T > 4 */
59
60#endif /* HEADER_CURL_SMB_H */
61