2
0

smb.h 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  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. char *send_buf;
  44. size_t upload_size;
  45. size_t send_size;
  46. size_t sent;
  47. size_t got;
  48. };
  49. #if !defined(CURL_DISABLE_SMB) && defined(USE_CURL_NTLM_CORE) && \
  50. (SIZEOF_CURL_OFF_T > 4)
  51. extern const struct Curl_handler Curl_handler_smb;
  52. extern const struct Curl_handler Curl_handler_smbs;
  53. #endif /* CURL_DISABLE_SMB && USE_CURL_NTLM_CORE &&
  54. SIZEOF_CURL_OFF_T > 4 */
  55. #endif /* HEADER_CURL_SMB_H */