2
0

smb.h 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  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. enum smb_conn_state {
  28. SMB_NOT_CONNECTED = 0,
  29. SMB_CONNECTING,
  30. SMB_NEGOTIATE,
  31. SMB_SETUP,
  32. SMB_CONNECTED
  33. };
  34. struct smb_conn {
  35. enum smb_conn_state state;
  36. char *user;
  37. char *domain;
  38. char *share;
  39. unsigned char challenge[8];
  40. unsigned int session_key;
  41. unsigned short uid;
  42. char *recv_buf;
  43. size_t upload_size;
  44. size_t send_size;
  45. size_t sent;
  46. size_t got;
  47. };
  48. #if !defined(CURL_DISABLE_SMB) && defined(USE_CURL_NTLM_CORE) && \
  49. (SIZEOF_CURL_OFF_T > 4)
  50. extern const struct Curl_handler Curl_handler_smb;
  51. extern const struct Curl_handler Curl_handler_smbs;
  52. #endif /* CURL_DISABLE_SMB && USE_CURL_NTLM_CORE &&
  53. SIZEOF_CURL_OFF_T > 4 */
  54. #endif /* HEADER_CURL_SMB_H */