@zerodensity/smb-cpp 0.0.0-bootstrap.0 → 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (640) hide show
  1. package/README.md +54 -3
  2. package/darwin_arm64/libsmb2.1.dylib +0 -0
  3. package/darwin_arm64/libsmb2.6.1.0.dylib +0 -0
  4. package/darwin_arm64/libsmb2.dylib +0 -0
  5. package/darwin_arm64/smb_server_cpp_darwin_arm64 +0 -0
  6. package/darwin_arm64/third-party/libsmb2/COPYING +24 -0
  7. package/darwin_arm64/third-party/libsmb2/LICENCE-LGPL-2.1.txt +502 -0
  8. package/darwin_arm64/third-party/libsmb2/NOTICE.txt +13 -0
  9. package/darwin_arm64/third-party/libsmb2/README +413 -0
  10. package/darwin_arm64/third-party/libsmb2/source/CMakeLists.txt +205 -0
  11. package/darwin_arm64/third-party/libsmb2/source/COPYING +24 -0
  12. package/darwin_arm64/third-party/libsmb2/source/LICENCE-LGPL-2.1.txt +502 -0
  13. package/darwin_arm64/third-party/libsmb2/source/Makefile.am +15 -0
  14. package/darwin_arm64/third-party/libsmb2/source/Makefile.platform +112 -0
  15. package/darwin_arm64/third-party/libsmb2/source/README +413 -0
  16. package/darwin_arm64/third-party/libsmb2/source/Xbox/libsmb2.sln +25 -0
  17. package/darwin_arm64/third-party/libsmb2/source/Xbox/libsmb2.vcxproj +248 -0
  18. package/darwin_arm64/third-party/libsmb2/source/Xbox/libsmb2.vcxproj.filters +304 -0
  19. package/darwin_arm64/third-party/libsmb2/source/Xbox 360/libsmb2.sln +32 -0
  20. package/darwin_arm64/third-party/libsmb2/source/Xbox 360/libsmb2.vcxproj +327 -0
  21. package/darwin_arm64/third-party/libsmb2/source/Xbox 360/libsmb2.vcxproj.filters +268 -0
  22. package/darwin_arm64/third-party/libsmb2/source/bootstrap +2 -0
  23. package/darwin_arm64/third-party/libsmb2/source/cmake/ConfigureChecks.cmake +63 -0
  24. package/darwin_arm64/third-party/libsmb2/source/cmake/FindSMB2.cmake +37 -0
  25. package/darwin_arm64/third-party/libsmb2/source/cmake/Modules/FindGSSAPI.cmake +30 -0
  26. package/darwin_arm64/third-party/libsmb2/source/cmake/Modules/FindLibKrb5.cmake +44 -0
  27. package/darwin_arm64/third-party/libsmb2/source/cmake/config.h.cmake +126 -0
  28. package/darwin_arm64/third-party/libsmb2/source/cmake/libsmb2.pc.cmake +14 -0
  29. package/darwin_arm64/third-party/libsmb2/source/component.mk +5 -0
  30. package/darwin_arm64/third-party/libsmb2/source/configure.ac +184 -0
  31. package/darwin_arm64/third-party/libsmb2/source/dcerpc-examples/srvsvc-NetrShareAdd.yaml +9 -0
  32. package/darwin_arm64/third-party/libsmb2/source/dcerpc-examples/srvsvc-NetrShareCheck.yaml +4 -0
  33. package/darwin_arm64/third-party/libsmb2/source/dcerpc-examples/srvsvc-NetrShareDel.yaml +5 -0
  34. package/darwin_arm64/third-party/libsmb2/source/dcerpc-examples/srvsvc-NetrShareDelSticky.yaml +5 -0
  35. package/darwin_arm64/third-party/libsmb2/source/dcerpc-examples/srvsvc-NetrShareEnum.yaml +7 -0
  36. package/darwin_arm64/third-party/libsmb2/source/dcerpc-examples/srvsvc-NetrShareGetInfo.yaml +6 -0
  37. package/darwin_arm64/third-party/libsmb2/source/dcerpc-examples/srvsvc-NetrShareSetInfo.yaml +11 -0
  38. package/darwin_arm64/third-party/libsmb2/source/examples/CMakeLists.txt +28 -0
  39. package/darwin_arm64/third-party/libsmb2/source/examples/Makefile.am +54 -0
  40. package/darwin_arm64/third-party/libsmb2/source/examples/dcerpc.c +254 -0
  41. package/darwin_arm64/third-party/libsmb2/source/examples/picow/CMakeLists.txt +72 -0
  42. package/darwin_arm64/third-party/libsmb2/source/examples/picow/README.md +2 -0
  43. package/darwin_arm64/third-party/libsmb2/source/examples/picow/main.cpp +119 -0
  44. package/darwin_arm64/third-party/libsmb2/source/examples/picow/smb-ls-sync.c +0 -0
  45. package/darwin_arm64/third-party/libsmb2/source/examples/smb2-CMD-FIND.c +335 -0
  46. package/darwin_arm64/third-party/libsmb2/source/examples/smb2-cat-async.c +183 -0
  47. package/darwin_arm64/third-party/libsmb2/source/examples/smb2-cat-sync.c +105 -0
  48. package/darwin_arm64/third-party/libsmb2/source/examples/smb2-ftruncate-sync.c +87 -0
  49. package/darwin_arm64/third-party/libsmb2/source/examples/smb2-ls-async.c +185 -0
  50. package/darwin_arm64/third-party/libsmb2/source/examples/smb2-ls-epoll.c +234 -0
  51. package/darwin_arm64/third-party/libsmb2/source/examples/smb2-lsa-lookupsids.c +292 -0
  52. package/darwin_arm64/third-party/libsmb2/source/examples/smb2-lseek-sync.c +101 -0
  53. package/darwin_arm64/third-party/libsmb2/source/examples/smb2-notify.c +183 -0
  54. package/darwin_arm64/third-party/libsmb2/source/examples/smb2-put-async.c +175 -0
  55. package/darwin_arm64/third-party/libsmb2/source/examples/smb2-put-sync.c +100 -0
  56. package/darwin_arm64/third-party/libsmb2/source/examples/smb2-raw-fsstat-async.c +353 -0
  57. package/darwin_arm64/third-party/libsmb2/source/examples/smb2-raw-getsd-async.c +401 -0
  58. package/darwin_arm64/third-party/libsmb2/source/examples/smb2-raw-stat-async.c +448 -0
  59. package/darwin_arm64/third-party/libsmb2/source/examples/smb2-readlink.c +80 -0
  60. package/darwin_arm64/third-party/libsmb2/source/examples/smb2-rename-sync.c +80 -0
  61. package/darwin_arm64/third-party/libsmb2/source/examples/smb2-server-sync.c +497 -0
  62. package/darwin_arm64/third-party/libsmb2/source/examples/smb2-share-enum-sync.c +146 -0
  63. package/darwin_arm64/third-party/libsmb2/source/examples/smb2-share-enum.c +208 -0
  64. package/darwin_arm64/third-party/libsmb2/source/examples/smb2-share-info.c +255 -0
  65. package/darwin_arm64/third-party/libsmb2/source/examples/smb2-stat-sync.c +103 -0
  66. package/darwin_arm64/third-party/libsmb2/source/examples/smb2-statvfs-sync.c +85 -0
  67. package/darwin_arm64/third-party/libsmb2/source/examples/smb2-truncate-sync.c +78 -0
  68. package/darwin_arm64/third-party/libsmb2/source/idf_component.yml +5 -0
  69. package/darwin_arm64/third-party/libsmb2/source/include/Makefile.am +15 -0
  70. package/darwin_arm64/third-party/libsmb2/source/include/amiga_os/config.h +139 -0
  71. package/darwin_arm64/third-party/libsmb2/source/include/apple/config.h +139 -0
  72. package/darwin_arm64/third-party/libsmb2/source/include/asprintf.h +65 -0
  73. package/darwin_arm64/third-party/libsmb2/source/include/esp/config.h +139 -0
  74. package/darwin_arm64/third-party/libsmb2/source/include/libsmb2-private.h +670 -0
  75. package/darwin_arm64/third-party/libsmb2/source/include/module.modulemap +21 -0
  76. package/darwin_arm64/third-party/libsmb2/source/include/picow/FreeRTOSConfig.h +143 -0
  77. package/darwin_arm64/third-party/libsmb2/source/include/picow/README.md +2 -0
  78. package/darwin_arm64/third-party/libsmb2/source/include/picow/config.h +139 -0
  79. package/darwin_arm64/third-party/libsmb2/source/include/picow/lwipopts.h +27 -0
  80. package/darwin_arm64/third-party/libsmb2/source/include/picow/lwipopts_examples_common.h +90 -0
  81. package/darwin_arm64/third-party/libsmb2/source/include/portable-endian.h +377 -0
  82. package/darwin_arm64/third-party/libsmb2/source/include/ps3/config.h +139 -0
  83. package/darwin_arm64/third-party/libsmb2/source/include/slist.h +63 -0
  84. package/darwin_arm64/third-party/libsmb2/source/include/smb2/libsmb2-dcerpc-lsa.h +172 -0
  85. package/darwin_arm64/third-party/libsmb2/source/include/smb2/libsmb2-dcerpc-srvsvc.h +276 -0
  86. package/darwin_arm64/third-party/libsmb2/source/include/smb2/libsmb2-dcerpc.h +203 -0
  87. package/darwin_arm64/third-party/libsmb2/source/include/smb2/libsmb2-raw.h +497 -0
  88. package/darwin_arm64/third-party/libsmb2/source/include/smb2/libsmb2.h +1409 -0
  89. package/darwin_arm64/third-party/libsmb2/source/include/smb2/smb2-errors.h +549 -0
  90. package/darwin_arm64/third-party/libsmb2/source/include/smb2/smb2-ioctl.h +83 -0
  91. package/darwin_arm64/third-party/libsmb2/source/include/smb2/smb2.h +1251 -0
  92. package/darwin_arm64/third-party/libsmb2/source/include/xbox/config.h +139 -0
  93. package/darwin_arm64/third-party/libsmb2/source/include/xbox 360/config.h +139 -0
  94. package/darwin_arm64/third-party/libsmb2/source/lib/CMakeLists.txt +260 -0
  95. package/darwin_arm64/third-party/libsmb2/source/lib/Makefile.AMIGA +46 -0
  96. package/darwin_arm64/third-party/libsmb2/source/lib/Makefile.AMIGA_AROS +59 -0
  97. package/darwin_arm64/third-party/libsmb2/source/lib/Makefile.AMIGA_OS3 +59 -0
  98. package/darwin_arm64/third-party/libsmb2/source/lib/Makefile.PS3_PPU +100 -0
  99. package/darwin_arm64/third-party/libsmb2/source/lib/Makefile.am +85 -0
  100. package/darwin_arm64/third-party/libsmb2/source/lib/aes.c +33 -0
  101. package/darwin_arm64/third-party/libsmb2/source/lib/aes.h +29 -0
  102. package/darwin_arm64/third-party/libsmb2/source/lib/aes128ccm.c +185 -0
  103. package/darwin_arm64/third-party/libsmb2/source/lib/aes128ccm.h +28 -0
  104. package/darwin_arm64/third-party/libsmb2/source/lib/aes_apple.c +70 -0
  105. package/darwin_arm64/third-party/libsmb2/source/lib/aes_apple.h +34 -0
  106. package/darwin_arm64/third-party/libsmb2/source/lib/aes_reference.c +560 -0
  107. package/darwin_arm64/third-party/libsmb2/source/lib/aes_reference.h +49 -0
  108. package/darwin_arm64/third-party/libsmb2/source/lib/alloc.c +154 -0
  109. package/darwin_arm64/third-party/libsmb2/source/lib/asn1-ber.c +1078 -0
  110. package/darwin_arm64/third-party/libsmb2/source/lib/asn1-ber.h +161 -0
  111. package/darwin_arm64/third-party/libsmb2/source/lib/compat.c +599 -0
  112. package/darwin_arm64/third-party/libsmb2/source/lib/compat.h +829 -0
  113. package/darwin_arm64/third-party/libsmb2/source/lib/dcerpc-lsa.c +641 -0
  114. package/darwin_arm64/third-party/libsmb2/source/lib/dcerpc-srvsvc.c +885 -0
  115. package/darwin_arm64/third-party/libsmb2/source/lib/dcerpc.c +2513 -0
  116. package/darwin_arm64/third-party/libsmb2/source/lib/dreamcast/vfs.c +328 -0
  117. package/darwin_arm64/third-party/libsmb2/source/lib/dreamcast/vfs.h +15 -0
  118. package/darwin_arm64/third-party/libsmb2/source/lib/errors.c +1192 -0
  119. package/darwin_arm64/third-party/libsmb2/source/lib/hmac-md5.c +84 -0
  120. package/darwin_arm64/third-party/libsmb2/source/lib/hmac-md5.h +42 -0
  121. package/darwin_arm64/third-party/libsmb2/source/lib/hmac.c +245 -0
  122. package/darwin_arm64/third-party/libsmb2/source/lib/init.c +778 -0
  123. package/darwin_arm64/third-party/libsmb2/source/lib/krb5-wrapper.c +1072 -0
  124. package/darwin_arm64/third-party/libsmb2/source/lib/krb5-wrapper.h +134 -0
  125. package/darwin_arm64/third-party/libsmb2/source/lib/libsmb2.c +4292 -0
  126. package/darwin_arm64/third-party/libsmb2/source/lib/libsmb2.syms +168 -0
  127. package/darwin_arm64/third-party/libsmb2/source/lib/md4.h +43 -0
  128. package/darwin_arm64/third-party/libsmb2/source/lib/md4c.c +289 -0
  129. package/darwin_arm64/third-party/libsmb2/source/lib/md5.c +249 -0
  130. package/darwin_arm64/third-party/libsmb2/source/lib/md5.h +76 -0
  131. package/darwin_arm64/third-party/libsmb2/source/lib/ntlmssp.c +1380 -0
  132. package/darwin_arm64/third-party/libsmb2/source/lib/ntlmssp.h +84 -0
  133. package/darwin_arm64/third-party/libsmb2/source/lib/pdu.c +1159 -0
  134. package/darwin_arm64/third-party/libsmb2/source/lib/ps2/TODO +6 -0
  135. package/darwin_arm64/third-party/libsmb2/source/lib/ps2/imports.lst +84 -0
  136. package/darwin_arm64/third-party/libsmb2/source/lib/ps2/irx_imports.h +28 -0
  137. package/darwin_arm64/third-party/libsmb2/source/lib/ps2/ps2smb2.h +35 -0
  138. package/darwin_arm64/third-party/libsmb2/source/lib/ps2/smb2_fio.c +816 -0
  139. package/darwin_arm64/third-party/libsmb2/source/lib/ps2/smb2_fio.h +15 -0
  140. package/darwin_arm64/third-party/libsmb2/source/lib/ps2/smb2man.c +69 -0
  141. package/darwin_arm64/third-party/libsmb2/source/lib/sha-private.h +28 -0
  142. package/darwin_arm64/third-party/libsmb2/source/lib/sha.h +334 -0
  143. package/darwin_arm64/third-party/libsmb2/source/lib/sha1.c +450 -0
  144. package/darwin_arm64/third-party/libsmb2/source/lib/sha224-256.c +611 -0
  145. package/darwin_arm64/third-party/libsmb2/source/lib/sha384-512.c +1059 -0
  146. package/darwin_arm64/third-party/libsmb2/source/lib/smb2-cmd-close.c +240 -0
  147. package/darwin_arm64/third-party/libsmb2/source/lib/smb2-cmd-create.c +508 -0
  148. package/darwin_arm64/third-party/libsmb2/source/lib/smb2-cmd-echo.c +202 -0
  149. package/darwin_arm64/third-party/libsmb2/source/lib/smb2-cmd-error.c +157 -0
  150. package/darwin_arm64/third-party/libsmb2/source/lib/smb2-cmd-flush.c +207 -0
  151. package/darwin_arm64/third-party/libsmb2/source/lib/smb2-cmd-ioctl.c +445 -0
  152. package/darwin_arm64/third-party/libsmb2/source/lib/smb2-cmd-lock.c +312 -0
  153. package/darwin_arm64/third-party/libsmb2/source/lib/smb2-cmd-logoff.c +190 -0
  154. package/darwin_arm64/third-party/libsmb2/source/lib/smb2-cmd-negotiate.c +646 -0
  155. package/darwin_arm64/third-party/libsmb2/source/lib/smb2-cmd-notify-change.c +278 -0
  156. package/darwin_arm64/third-party/libsmb2/source/lib/smb2-cmd-oplock-break.c +543 -0
  157. package/darwin_arm64/third-party/libsmb2/source/lib/smb2-cmd-query-directory.c +580 -0
  158. package/darwin_arm64/third-party/libsmb2/source/lib/smb2-cmd-query-info.c +753 -0
  159. package/darwin_arm64/third-party/libsmb2/source/lib/smb2-cmd-read.c +391 -0
  160. package/darwin_arm64/third-party/libsmb2/source/lib/smb2-cmd-session-setup.c +331 -0
  161. package/darwin_arm64/third-party/libsmb2/source/lib/smb2-cmd-set-info.c +361 -0
  162. package/darwin_arm64/third-party/libsmb2/source/lib/smb2-cmd-tree-connect.c +278 -0
  163. package/darwin_arm64/third-party/libsmb2/source/lib/smb2-cmd-tree-disconnect.c +171 -0
  164. package/darwin_arm64/third-party/libsmb2/source/lib/smb2-cmd-write.c +319 -0
  165. package/darwin_arm64/third-party/libsmb2/source/lib/smb2-data-file-info.c +537 -0
  166. package/darwin_arm64/third-party/libsmb2/source/lib/smb2-data-filesystem-info.c +384 -0
  167. package/darwin_arm64/third-party/libsmb2/source/lib/smb2-data-reparse-point.c +117 -0
  168. package/darwin_arm64/third-party/libsmb2/source/lib/smb2-data-security-descriptor.c +361 -0
  169. package/darwin_arm64/third-party/libsmb2/source/lib/smb2-share-enum.c +181 -0
  170. package/darwin_arm64/third-party/libsmb2/source/lib/smb2-signing.c +279 -0
  171. package/darwin_arm64/third-party/libsmb2/source/lib/smb2-signing.h +51 -0
  172. package/darwin_arm64/third-party/libsmb2/source/lib/smb3-seal.c +165 -0
  173. package/darwin_arm64/third-party/libsmb2/source/lib/smb3-seal.h +43 -0
  174. package/darwin_arm64/third-party/libsmb2/source/lib/socket.c +1502 -0
  175. package/darwin_arm64/third-party/libsmb2/source/lib/spnego-wrapper.c +634 -0
  176. package/darwin_arm64/third-party/libsmb2/source/lib/spnego-wrapper.h +74 -0
  177. package/darwin_arm64/third-party/libsmb2/source/lib/sync.c +988 -0
  178. package/darwin_arm64/third-party/libsmb2/source/lib/timestamps.c +70 -0
  179. package/darwin_arm64/third-party/libsmb2/source/lib/unicode.c +307 -0
  180. package/darwin_arm64/third-party/libsmb2/source/lib/usha.c +345 -0
  181. package/darwin_arm64/third-party/libsmb2/source/libsmb2.pc.in +14 -0
  182. package/darwin_arm64/third-party/libsmb2/source/packaging/RPM/libsmb2.spec.in +135 -0
  183. package/darwin_arm64/third-party/libsmb2/source/packaging/RPM/makerpms.sh +114 -0
  184. package/darwin_arm64/third-party/libsmb2/source/tests/Makefile.am +34 -0
  185. package/darwin_arm64/third-party/libsmb2/source/tests/README +28 -0
  186. package/darwin_arm64/third-party/libsmb2/source/tests/aes128ccm-test.c +119 -0
  187. package/darwin_arm64/third-party/libsmb2/source/tests/functions.sh +11 -0
  188. package/darwin_arm64/third-party/libsmb2/source/tests/ld_sockerr.c +58 -0
  189. package/darwin_arm64/third-party/libsmb2/source/tests/metastat-0202-censored.c +136 -0
  190. package/darwin_arm64/third-party/libsmb2/source/tests/ntlmssp_generate_blob.c +123 -0
  191. package/darwin_arm64/third-party/libsmb2/source/tests/prog_cat.c +188 -0
  192. package/darwin_arm64/third-party/libsmb2/source/tests/prog_cat_cancel.c +203 -0
  193. package/darwin_arm64/third-party/libsmb2/source/tests/prog_ls.c +189 -0
  194. package/darwin_arm64/third-party/libsmb2/source/tests/prog_mkdir.c +85 -0
  195. package/darwin_arm64/third-party/libsmb2/source/tests/prog_rmdir.c +84 -0
  196. package/darwin_arm64/third-party/libsmb2/source/tests/smb2-dcerpc-coder-test.c +635 -0
  197. package/darwin_arm64/third-party/libsmb2/source/tests/test_0100_ls_basic.sh +22 -0
  198. package/darwin_arm64/third-party/libsmb2/source/tests/test_0101_ls_basic_valgrind.sh +23 -0
  199. package/darwin_arm64/third-party/libsmb2/source/tests/test_0102_ls_basic_socket_error.sh +16 -0
  200. package/darwin_arm64/third-party/libsmb2/source/tests/test_0103_ls_basic_valgrind_malloc_error.sh +25 -0
  201. package/darwin_arm64/third-party/libsmb2/source/tests/test_0200_mkdir.sh +15 -0
  202. package/darwin_arm64/third-party/libsmb2/source/tests/test_0201_mkdir_valgrind.sh +15 -0
  203. package/darwin_arm64/third-party/libsmb2/source/tests/test_0210_cp_basic.sh +25 -0
  204. package/darwin_arm64/third-party/libsmb2/source/tests/test_0211_cp_valgrind.sh +26 -0
  205. package/darwin_arm64/third-party/libsmb2/source/tests/test_0212_cp_valgrind_socket_error.sh +29 -0
  206. package/darwin_arm64/third-party/libsmb2/source/tests/test_0300_cat_basic.sh +13 -0
  207. package/darwin_arm64/third-party/libsmb2/source/tests/test_0301_cat_valgrind.sh +13 -0
  208. package/darwin_arm64/third-party/libsmb2/source/tests/test_0302_cat_valgrind_socket_error.sh +18 -0
  209. package/darwin_arm64/third-party/libsmb2/source/tests/test_0310_cancel_pdu.sh +13 -0
  210. package/darwin_arm64/third-party/libsmb2/source/tests/test_0400_overdrawn_0202.sh +25 -0
  211. package/darwin_arm64/third-party/libsmb2/source/tests/test_900_dcerpc.sh +10 -0
  212. package/darwin_arm64/third-party/libsmb2/source/utils/Makefile.am +11 -0
  213. package/darwin_arm64/third-party/libsmb2/source/utils/smb2-cp.c +265 -0
  214. package/darwin_arm64/third-party/libsmb2/source/utils/smb2-ls.c +135 -0
  215. package/linux_x64/libsmb2.so +0 -0
  216. package/linux_x64/libsmb2.so.1 +0 -0
  217. package/linux_x64/libsmb2.so.6.1.0 +0 -0
  218. package/linux_x64/smb_server_cpp_linux_x64 +0 -0
  219. package/linux_x64/third-party/libsmb2/COPYING +24 -0
  220. package/linux_x64/third-party/libsmb2/LICENCE-LGPL-2.1.txt +502 -0
  221. package/linux_x64/third-party/libsmb2/NOTICE.txt +13 -0
  222. package/linux_x64/third-party/libsmb2/README +413 -0
  223. package/linux_x64/third-party/libsmb2/source/CMakeLists.txt +205 -0
  224. package/linux_x64/third-party/libsmb2/source/COPYING +24 -0
  225. package/linux_x64/third-party/libsmb2/source/LICENCE-LGPL-2.1.txt +502 -0
  226. package/linux_x64/third-party/libsmb2/source/Makefile.am +15 -0
  227. package/linux_x64/third-party/libsmb2/source/Makefile.platform +112 -0
  228. package/linux_x64/third-party/libsmb2/source/README +413 -0
  229. package/linux_x64/third-party/libsmb2/source/Xbox/libsmb2.sln +25 -0
  230. package/linux_x64/third-party/libsmb2/source/Xbox/libsmb2.vcxproj +248 -0
  231. package/linux_x64/third-party/libsmb2/source/Xbox/libsmb2.vcxproj.filters +304 -0
  232. package/linux_x64/third-party/libsmb2/source/Xbox 360/libsmb2.sln +32 -0
  233. package/linux_x64/third-party/libsmb2/source/Xbox 360/libsmb2.vcxproj +327 -0
  234. package/linux_x64/third-party/libsmb2/source/Xbox 360/libsmb2.vcxproj.filters +268 -0
  235. package/linux_x64/third-party/libsmb2/source/bootstrap +2 -0
  236. package/linux_x64/third-party/libsmb2/source/cmake/ConfigureChecks.cmake +63 -0
  237. package/linux_x64/third-party/libsmb2/source/cmake/FindSMB2.cmake +37 -0
  238. package/linux_x64/third-party/libsmb2/source/cmake/Modules/FindGSSAPI.cmake +30 -0
  239. package/linux_x64/third-party/libsmb2/source/cmake/Modules/FindLibKrb5.cmake +44 -0
  240. package/linux_x64/third-party/libsmb2/source/cmake/config.h.cmake +126 -0
  241. package/linux_x64/third-party/libsmb2/source/cmake/libsmb2.pc.cmake +14 -0
  242. package/linux_x64/third-party/libsmb2/source/component.mk +5 -0
  243. package/linux_x64/third-party/libsmb2/source/configure.ac +184 -0
  244. package/linux_x64/third-party/libsmb2/source/dcerpc-examples/srvsvc-NetrShareAdd.yaml +9 -0
  245. package/linux_x64/third-party/libsmb2/source/dcerpc-examples/srvsvc-NetrShareCheck.yaml +4 -0
  246. package/linux_x64/third-party/libsmb2/source/dcerpc-examples/srvsvc-NetrShareDel.yaml +5 -0
  247. package/linux_x64/third-party/libsmb2/source/dcerpc-examples/srvsvc-NetrShareDelSticky.yaml +5 -0
  248. package/linux_x64/third-party/libsmb2/source/dcerpc-examples/srvsvc-NetrShareEnum.yaml +7 -0
  249. package/linux_x64/third-party/libsmb2/source/dcerpc-examples/srvsvc-NetrShareGetInfo.yaml +6 -0
  250. package/linux_x64/third-party/libsmb2/source/dcerpc-examples/srvsvc-NetrShareSetInfo.yaml +11 -0
  251. package/linux_x64/third-party/libsmb2/source/examples/CMakeLists.txt +28 -0
  252. package/linux_x64/third-party/libsmb2/source/examples/Makefile.am +54 -0
  253. package/linux_x64/third-party/libsmb2/source/examples/dcerpc.c +254 -0
  254. package/linux_x64/third-party/libsmb2/source/examples/picow/CMakeLists.txt +72 -0
  255. package/linux_x64/third-party/libsmb2/source/examples/picow/README.md +2 -0
  256. package/linux_x64/third-party/libsmb2/source/examples/picow/main.cpp +119 -0
  257. package/linux_x64/third-party/libsmb2/source/examples/picow/smb-ls-sync.c +0 -0
  258. package/linux_x64/third-party/libsmb2/source/examples/smb2-CMD-FIND.c +335 -0
  259. package/linux_x64/third-party/libsmb2/source/examples/smb2-cat-async.c +183 -0
  260. package/linux_x64/third-party/libsmb2/source/examples/smb2-cat-sync.c +105 -0
  261. package/linux_x64/third-party/libsmb2/source/examples/smb2-ftruncate-sync.c +87 -0
  262. package/linux_x64/third-party/libsmb2/source/examples/smb2-ls-async.c +185 -0
  263. package/linux_x64/third-party/libsmb2/source/examples/smb2-ls-epoll.c +234 -0
  264. package/linux_x64/third-party/libsmb2/source/examples/smb2-lsa-lookupsids.c +292 -0
  265. package/linux_x64/third-party/libsmb2/source/examples/smb2-lseek-sync.c +101 -0
  266. package/linux_x64/third-party/libsmb2/source/examples/smb2-notify.c +183 -0
  267. package/linux_x64/third-party/libsmb2/source/examples/smb2-put-async.c +175 -0
  268. package/linux_x64/third-party/libsmb2/source/examples/smb2-put-sync.c +100 -0
  269. package/linux_x64/third-party/libsmb2/source/examples/smb2-raw-fsstat-async.c +353 -0
  270. package/linux_x64/third-party/libsmb2/source/examples/smb2-raw-getsd-async.c +401 -0
  271. package/linux_x64/third-party/libsmb2/source/examples/smb2-raw-stat-async.c +448 -0
  272. package/linux_x64/third-party/libsmb2/source/examples/smb2-readlink.c +80 -0
  273. package/linux_x64/third-party/libsmb2/source/examples/smb2-rename-sync.c +80 -0
  274. package/linux_x64/third-party/libsmb2/source/examples/smb2-server-sync.c +497 -0
  275. package/linux_x64/third-party/libsmb2/source/examples/smb2-share-enum-sync.c +146 -0
  276. package/linux_x64/third-party/libsmb2/source/examples/smb2-share-enum.c +208 -0
  277. package/linux_x64/third-party/libsmb2/source/examples/smb2-share-info.c +255 -0
  278. package/linux_x64/third-party/libsmb2/source/examples/smb2-stat-sync.c +103 -0
  279. package/linux_x64/third-party/libsmb2/source/examples/smb2-statvfs-sync.c +85 -0
  280. package/linux_x64/third-party/libsmb2/source/examples/smb2-truncate-sync.c +78 -0
  281. package/linux_x64/third-party/libsmb2/source/idf_component.yml +5 -0
  282. package/linux_x64/third-party/libsmb2/source/include/Makefile.am +15 -0
  283. package/linux_x64/third-party/libsmb2/source/include/amiga_os/config.h +139 -0
  284. package/linux_x64/third-party/libsmb2/source/include/apple/config.h +139 -0
  285. package/linux_x64/third-party/libsmb2/source/include/asprintf.h +65 -0
  286. package/linux_x64/third-party/libsmb2/source/include/esp/config.h +139 -0
  287. package/linux_x64/third-party/libsmb2/source/include/libsmb2-private.h +670 -0
  288. package/linux_x64/third-party/libsmb2/source/include/module.modulemap +21 -0
  289. package/linux_x64/third-party/libsmb2/source/include/picow/FreeRTOSConfig.h +143 -0
  290. package/linux_x64/third-party/libsmb2/source/include/picow/README.md +2 -0
  291. package/linux_x64/third-party/libsmb2/source/include/picow/config.h +139 -0
  292. package/linux_x64/third-party/libsmb2/source/include/picow/lwipopts.h +27 -0
  293. package/linux_x64/third-party/libsmb2/source/include/picow/lwipopts_examples_common.h +90 -0
  294. package/linux_x64/third-party/libsmb2/source/include/portable-endian.h +377 -0
  295. package/linux_x64/third-party/libsmb2/source/include/ps3/config.h +139 -0
  296. package/linux_x64/third-party/libsmb2/source/include/slist.h +63 -0
  297. package/linux_x64/third-party/libsmb2/source/include/smb2/libsmb2-dcerpc-lsa.h +172 -0
  298. package/linux_x64/third-party/libsmb2/source/include/smb2/libsmb2-dcerpc-srvsvc.h +276 -0
  299. package/linux_x64/third-party/libsmb2/source/include/smb2/libsmb2-dcerpc.h +203 -0
  300. package/linux_x64/third-party/libsmb2/source/include/smb2/libsmb2-raw.h +497 -0
  301. package/linux_x64/third-party/libsmb2/source/include/smb2/libsmb2.h +1409 -0
  302. package/linux_x64/third-party/libsmb2/source/include/smb2/smb2-errors.h +549 -0
  303. package/linux_x64/third-party/libsmb2/source/include/smb2/smb2-ioctl.h +83 -0
  304. package/linux_x64/third-party/libsmb2/source/include/smb2/smb2.h +1251 -0
  305. package/linux_x64/third-party/libsmb2/source/include/xbox/config.h +139 -0
  306. package/linux_x64/third-party/libsmb2/source/include/xbox 360/config.h +139 -0
  307. package/linux_x64/third-party/libsmb2/source/lib/CMakeLists.txt +260 -0
  308. package/linux_x64/third-party/libsmb2/source/lib/Makefile.AMIGA +46 -0
  309. package/linux_x64/third-party/libsmb2/source/lib/Makefile.AMIGA_AROS +59 -0
  310. package/linux_x64/third-party/libsmb2/source/lib/Makefile.AMIGA_OS3 +59 -0
  311. package/linux_x64/third-party/libsmb2/source/lib/Makefile.PS3_PPU +100 -0
  312. package/linux_x64/third-party/libsmb2/source/lib/Makefile.am +85 -0
  313. package/linux_x64/third-party/libsmb2/source/lib/aes.c +33 -0
  314. package/linux_x64/third-party/libsmb2/source/lib/aes.h +29 -0
  315. package/linux_x64/third-party/libsmb2/source/lib/aes128ccm.c +185 -0
  316. package/linux_x64/third-party/libsmb2/source/lib/aes128ccm.h +28 -0
  317. package/linux_x64/third-party/libsmb2/source/lib/aes_apple.c +70 -0
  318. package/linux_x64/third-party/libsmb2/source/lib/aes_apple.h +34 -0
  319. package/linux_x64/third-party/libsmb2/source/lib/aes_reference.c +560 -0
  320. package/linux_x64/third-party/libsmb2/source/lib/aes_reference.h +49 -0
  321. package/linux_x64/third-party/libsmb2/source/lib/alloc.c +154 -0
  322. package/linux_x64/third-party/libsmb2/source/lib/asn1-ber.c +1078 -0
  323. package/linux_x64/third-party/libsmb2/source/lib/asn1-ber.h +161 -0
  324. package/linux_x64/third-party/libsmb2/source/lib/compat.c +599 -0
  325. package/linux_x64/third-party/libsmb2/source/lib/compat.h +829 -0
  326. package/linux_x64/third-party/libsmb2/source/lib/dcerpc-lsa.c +641 -0
  327. package/linux_x64/third-party/libsmb2/source/lib/dcerpc-srvsvc.c +885 -0
  328. package/linux_x64/third-party/libsmb2/source/lib/dcerpc.c +2513 -0
  329. package/linux_x64/third-party/libsmb2/source/lib/dreamcast/vfs.c +328 -0
  330. package/linux_x64/third-party/libsmb2/source/lib/dreamcast/vfs.h +15 -0
  331. package/linux_x64/third-party/libsmb2/source/lib/errors.c +1192 -0
  332. package/linux_x64/third-party/libsmb2/source/lib/hmac-md5.c +84 -0
  333. package/linux_x64/third-party/libsmb2/source/lib/hmac-md5.h +42 -0
  334. package/linux_x64/third-party/libsmb2/source/lib/hmac.c +245 -0
  335. package/linux_x64/third-party/libsmb2/source/lib/init.c +778 -0
  336. package/linux_x64/third-party/libsmb2/source/lib/krb5-wrapper.c +1072 -0
  337. package/linux_x64/third-party/libsmb2/source/lib/krb5-wrapper.h +134 -0
  338. package/linux_x64/third-party/libsmb2/source/lib/libsmb2.c +4292 -0
  339. package/linux_x64/third-party/libsmb2/source/lib/libsmb2.syms +168 -0
  340. package/linux_x64/third-party/libsmb2/source/lib/md4.h +43 -0
  341. package/linux_x64/third-party/libsmb2/source/lib/md4c.c +289 -0
  342. package/linux_x64/third-party/libsmb2/source/lib/md5.c +249 -0
  343. package/linux_x64/third-party/libsmb2/source/lib/md5.h +76 -0
  344. package/linux_x64/third-party/libsmb2/source/lib/ntlmssp.c +1380 -0
  345. package/linux_x64/third-party/libsmb2/source/lib/ntlmssp.h +84 -0
  346. package/linux_x64/third-party/libsmb2/source/lib/pdu.c +1159 -0
  347. package/linux_x64/third-party/libsmb2/source/lib/ps2/TODO +6 -0
  348. package/linux_x64/third-party/libsmb2/source/lib/ps2/imports.lst +84 -0
  349. package/linux_x64/third-party/libsmb2/source/lib/ps2/irx_imports.h +28 -0
  350. package/linux_x64/third-party/libsmb2/source/lib/ps2/ps2smb2.h +35 -0
  351. package/linux_x64/third-party/libsmb2/source/lib/ps2/smb2_fio.c +816 -0
  352. package/linux_x64/third-party/libsmb2/source/lib/ps2/smb2_fio.h +15 -0
  353. package/linux_x64/third-party/libsmb2/source/lib/ps2/smb2man.c +69 -0
  354. package/linux_x64/third-party/libsmb2/source/lib/sha-private.h +28 -0
  355. package/linux_x64/third-party/libsmb2/source/lib/sha.h +334 -0
  356. package/linux_x64/third-party/libsmb2/source/lib/sha1.c +450 -0
  357. package/linux_x64/third-party/libsmb2/source/lib/sha224-256.c +611 -0
  358. package/linux_x64/third-party/libsmb2/source/lib/sha384-512.c +1059 -0
  359. package/linux_x64/third-party/libsmb2/source/lib/smb2-cmd-close.c +240 -0
  360. package/linux_x64/third-party/libsmb2/source/lib/smb2-cmd-create.c +508 -0
  361. package/linux_x64/third-party/libsmb2/source/lib/smb2-cmd-echo.c +202 -0
  362. package/linux_x64/third-party/libsmb2/source/lib/smb2-cmd-error.c +157 -0
  363. package/linux_x64/third-party/libsmb2/source/lib/smb2-cmd-flush.c +207 -0
  364. package/linux_x64/third-party/libsmb2/source/lib/smb2-cmd-ioctl.c +445 -0
  365. package/linux_x64/third-party/libsmb2/source/lib/smb2-cmd-lock.c +312 -0
  366. package/linux_x64/third-party/libsmb2/source/lib/smb2-cmd-logoff.c +190 -0
  367. package/linux_x64/third-party/libsmb2/source/lib/smb2-cmd-negotiate.c +646 -0
  368. package/linux_x64/third-party/libsmb2/source/lib/smb2-cmd-notify-change.c +278 -0
  369. package/linux_x64/third-party/libsmb2/source/lib/smb2-cmd-oplock-break.c +543 -0
  370. package/linux_x64/third-party/libsmb2/source/lib/smb2-cmd-query-directory.c +580 -0
  371. package/linux_x64/third-party/libsmb2/source/lib/smb2-cmd-query-info.c +753 -0
  372. package/linux_x64/third-party/libsmb2/source/lib/smb2-cmd-read.c +391 -0
  373. package/linux_x64/third-party/libsmb2/source/lib/smb2-cmd-session-setup.c +331 -0
  374. package/linux_x64/third-party/libsmb2/source/lib/smb2-cmd-set-info.c +361 -0
  375. package/linux_x64/third-party/libsmb2/source/lib/smb2-cmd-tree-connect.c +278 -0
  376. package/linux_x64/third-party/libsmb2/source/lib/smb2-cmd-tree-disconnect.c +171 -0
  377. package/linux_x64/third-party/libsmb2/source/lib/smb2-cmd-write.c +319 -0
  378. package/linux_x64/third-party/libsmb2/source/lib/smb2-data-file-info.c +537 -0
  379. package/linux_x64/third-party/libsmb2/source/lib/smb2-data-filesystem-info.c +384 -0
  380. package/linux_x64/third-party/libsmb2/source/lib/smb2-data-reparse-point.c +117 -0
  381. package/linux_x64/third-party/libsmb2/source/lib/smb2-data-security-descriptor.c +361 -0
  382. package/linux_x64/third-party/libsmb2/source/lib/smb2-share-enum.c +181 -0
  383. package/linux_x64/third-party/libsmb2/source/lib/smb2-signing.c +279 -0
  384. package/linux_x64/third-party/libsmb2/source/lib/smb2-signing.h +51 -0
  385. package/linux_x64/third-party/libsmb2/source/lib/smb3-seal.c +165 -0
  386. package/linux_x64/third-party/libsmb2/source/lib/smb3-seal.h +43 -0
  387. package/linux_x64/third-party/libsmb2/source/lib/socket.c +1502 -0
  388. package/linux_x64/third-party/libsmb2/source/lib/spnego-wrapper.c +634 -0
  389. package/linux_x64/third-party/libsmb2/source/lib/spnego-wrapper.h +74 -0
  390. package/linux_x64/third-party/libsmb2/source/lib/sync.c +988 -0
  391. package/linux_x64/third-party/libsmb2/source/lib/timestamps.c +70 -0
  392. package/linux_x64/third-party/libsmb2/source/lib/unicode.c +307 -0
  393. package/linux_x64/third-party/libsmb2/source/lib/usha.c +345 -0
  394. package/linux_x64/third-party/libsmb2/source/libsmb2.pc.in +14 -0
  395. package/linux_x64/third-party/libsmb2/source/packaging/RPM/libsmb2.spec.in +135 -0
  396. package/linux_x64/third-party/libsmb2/source/packaging/RPM/makerpms.sh +114 -0
  397. package/linux_x64/third-party/libsmb2/source/tests/Makefile.am +34 -0
  398. package/linux_x64/third-party/libsmb2/source/tests/README +28 -0
  399. package/linux_x64/third-party/libsmb2/source/tests/aes128ccm-test.c +119 -0
  400. package/linux_x64/third-party/libsmb2/source/tests/functions.sh +11 -0
  401. package/linux_x64/third-party/libsmb2/source/tests/ld_sockerr.c +58 -0
  402. package/linux_x64/third-party/libsmb2/source/tests/metastat-0202-censored.c +136 -0
  403. package/linux_x64/third-party/libsmb2/source/tests/ntlmssp_generate_blob.c +123 -0
  404. package/linux_x64/third-party/libsmb2/source/tests/prog_cat.c +188 -0
  405. package/linux_x64/third-party/libsmb2/source/tests/prog_cat_cancel.c +203 -0
  406. package/linux_x64/third-party/libsmb2/source/tests/prog_ls.c +189 -0
  407. package/linux_x64/third-party/libsmb2/source/tests/prog_mkdir.c +85 -0
  408. package/linux_x64/third-party/libsmb2/source/tests/prog_rmdir.c +84 -0
  409. package/linux_x64/third-party/libsmb2/source/tests/smb2-dcerpc-coder-test.c +635 -0
  410. package/linux_x64/third-party/libsmb2/source/tests/test_0100_ls_basic.sh +22 -0
  411. package/linux_x64/third-party/libsmb2/source/tests/test_0101_ls_basic_valgrind.sh +23 -0
  412. package/linux_x64/third-party/libsmb2/source/tests/test_0102_ls_basic_socket_error.sh +16 -0
  413. package/linux_x64/third-party/libsmb2/source/tests/test_0103_ls_basic_valgrind_malloc_error.sh +25 -0
  414. package/linux_x64/third-party/libsmb2/source/tests/test_0200_mkdir.sh +15 -0
  415. package/linux_x64/third-party/libsmb2/source/tests/test_0201_mkdir_valgrind.sh +15 -0
  416. package/linux_x64/third-party/libsmb2/source/tests/test_0210_cp_basic.sh +25 -0
  417. package/linux_x64/third-party/libsmb2/source/tests/test_0211_cp_valgrind.sh +26 -0
  418. package/linux_x64/third-party/libsmb2/source/tests/test_0212_cp_valgrind_socket_error.sh +29 -0
  419. package/linux_x64/third-party/libsmb2/source/tests/test_0300_cat_basic.sh +13 -0
  420. package/linux_x64/third-party/libsmb2/source/tests/test_0301_cat_valgrind.sh +13 -0
  421. package/linux_x64/third-party/libsmb2/source/tests/test_0302_cat_valgrind_socket_error.sh +18 -0
  422. package/linux_x64/third-party/libsmb2/source/tests/test_0310_cancel_pdu.sh +13 -0
  423. package/linux_x64/third-party/libsmb2/source/tests/test_0400_overdrawn_0202.sh +25 -0
  424. package/linux_x64/third-party/libsmb2/source/tests/test_900_dcerpc.sh +10 -0
  425. package/linux_x64/third-party/libsmb2/source/utils/Makefile.am +11 -0
  426. package/linux_x64/third-party/libsmb2/source/utils/smb2-cp.c +265 -0
  427. package/linux_x64/third-party/libsmb2/source/utils/smb2-ls.c +135 -0
  428. package/package.json +10 -4
  429. package/smb2.proto +164 -0
  430. package/win32_x64/smb2.dll +0 -0
  431. package/win32_x64/smb_server_cpp_win32_x64.exe +0 -0
  432. package/win32_x64/third-party/libsmb2/COPYING +24 -0
  433. package/win32_x64/third-party/libsmb2/LICENCE-LGPL-2.1.txt +502 -0
  434. package/win32_x64/third-party/libsmb2/NOTICE.txt +13 -0
  435. package/win32_x64/third-party/libsmb2/README +413 -0
  436. package/win32_x64/third-party/libsmb2/source/CMakeLists.txt +205 -0
  437. package/win32_x64/third-party/libsmb2/source/COPYING +24 -0
  438. package/win32_x64/third-party/libsmb2/source/LICENCE-LGPL-2.1.txt +502 -0
  439. package/win32_x64/third-party/libsmb2/source/Makefile.am +15 -0
  440. package/win32_x64/third-party/libsmb2/source/Makefile.platform +112 -0
  441. package/win32_x64/third-party/libsmb2/source/README +413 -0
  442. package/win32_x64/third-party/libsmb2/source/Xbox/libsmb2.sln +25 -0
  443. package/win32_x64/third-party/libsmb2/source/Xbox/libsmb2.vcxproj +248 -0
  444. package/win32_x64/third-party/libsmb2/source/Xbox/libsmb2.vcxproj.filters +304 -0
  445. package/win32_x64/third-party/libsmb2/source/Xbox 360/libsmb2.sln +32 -0
  446. package/win32_x64/third-party/libsmb2/source/Xbox 360/libsmb2.vcxproj +327 -0
  447. package/win32_x64/third-party/libsmb2/source/Xbox 360/libsmb2.vcxproj.filters +268 -0
  448. package/win32_x64/third-party/libsmb2/source/bootstrap +2 -0
  449. package/win32_x64/third-party/libsmb2/source/cmake/ConfigureChecks.cmake +63 -0
  450. package/win32_x64/third-party/libsmb2/source/cmake/FindSMB2.cmake +37 -0
  451. package/win32_x64/third-party/libsmb2/source/cmake/Modules/FindGSSAPI.cmake +30 -0
  452. package/win32_x64/third-party/libsmb2/source/cmake/Modules/FindLibKrb5.cmake +44 -0
  453. package/win32_x64/third-party/libsmb2/source/cmake/config.h.cmake +126 -0
  454. package/win32_x64/third-party/libsmb2/source/cmake/libsmb2.pc.cmake +14 -0
  455. package/win32_x64/third-party/libsmb2/source/component.mk +5 -0
  456. package/win32_x64/third-party/libsmb2/source/configure.ac +184 -0
  457. package/win32_x64/third-party/libsmb2/source/dcerpc-examples/srvsvc-NetrShareAdd.yaml +9 -0
  458. package/win32_x64/third-party/libsmb2/source/dcerpc-examples/srvsvc-NetrShareCheck.yaml +4 -0
  459. package/win32_x64/third-party/libsmb2/source/dcerpc-examples/srvsvc-NetrShareDel.yaml +5 -0
  460. package/win32_x64/third-party/libsmb2/source/dcerpc-examples/srvsvc-NetrShareDelSticky.yaml +5 -0
  461. package/win32_x64/third-party/libsmb2/source/dcerpc-examples/srvsvc-NetrShareEnum.yaml +7 -0
  462. package/win32_x64/third-party/libsmb2/source/dcerpc-examples/srvsvc-NetrShareGetInfo.yaml +6 -0
  463. package/win32_x64/third-party/libsmb2/source/dcerpc-examples/srvsvc-NetrShareSetInfo.yaml +11 -0
  464. package/win32_x64/third-party/libsmb2/source/examples/CMakeLists.txt +28 -0
  465. package/win32_x64/third-party/libsmb2/source/examples/Makefile.am +54 -0
  466. package/win32_x64/third-party/libsmb2/source/examples/dcerpc.c +254 -0
  467. package/win32_x64/third-party/libsmb2/source/examples/picow/CMakeLists.txt +72 -0
  468. package/win32_x64/third-party/libsmb2/source/examples/picow/README.md +2 -0
  469. package/win32_x64/third-party/libsmb2/source/examples/picow/main.cpp +119 -0
  470. package/win32_x64/third-party/libsmb2/source/examples/picow/smb-ls-sync.c +0 -0
  471. package/win32_x64/third-party/libsmb2/source/examples/smb2-CMD-FIND.c +335 -0
  472. package/win32_x64/third-party/libsmb2/source/examples/smb2-cat-async.c +183 -0
  473. package/win32_x64/third-party/libsmb2/source/examples/smb2-cat-sync.c +105 -0
  474. package/win32_x64/third-party/libsmb2/source/examples/smb2-ftruncate-sync.c +87 -0
  475. package/win32_x64/third-party/libsmb2/source/examples/smb2-ls-async.c +185 -0
  476. package/win32_x64/third-party/libsmb2/source/examples/smb2-ls-epoll.c +234 -0
  477. package/win32_x64/third-party/libsmb2/source/examples/smb2-lsa-lookupsids.c +292 -0
  478. package/win32_x64/third-party/libsmb2/source/examples/smb2-lseek-sync.c +101 -0
  479. package/win32_x64/third-party/libsmb2/source/examples/smb2-notify.c +183 -0
  480. package/win32_x64/third-party/libsmb2/source/examples/smb2-put-async.c +175 -0
  481. package/win32_x64/third-party/libsmb2/source/examples/smb2-put-sync.c +100 -0
  482. package/win32_x64/third-party/libsmb2/source/examples/smb2-raw-fsstat-async.c +353 -0
  483. package/win32_x64/third-party/libsmb2/source/examples/smb2-raw-getsd-async.c +401 -0
  484. package/win32_x64/third-party/libsmb2/source/examples/smb2-raw-stat-async.c +448 -0
  485. package/win32_x64/third-party/libsmb2/source/examples/smb2-readlink.c +80 -0
  486. package/win32_x64/third-party/libsmb2/source/examples/smb2-rename-sync.c +80 -0
  487. package/win32_x64/third-party/libsmb2/source/examples/smb2-server-sync.c +497 -0
  488. package/win32_x64/third-party/libsmb2/source/examples/smb2-share-enum-sync.c +146 -0
  489. package/win32_x64/third-party/libsmb2/source/examples/smb2-share-enum.c +208 -0
  490. package/win32_x64/third-party/libsmb2/source/examples/smb2-share-info.c +255 -0
  491. package/win32_x64/third-party/libsmb2/source/examples/smb2-stat-sync.c +103 -0
  492. package/win32_x64/third-party/libsmb2/source/examples/smb2-statvfs-sync.c +85 -0
  493. package/win32_x64/third-party/libsmb2/source/examples/smb2-truncate-sync.c +78 -0
  494. package/win32_x64/third-party/libsmb2/source/idf_component.yml +5 -0
  495. package/win32_x64/third-party/libsmb2/source/include/Makefile.am +15 -0
  496. package/win32_x64/third-party/libsmb2/source/include/amiga_os/config.h +139 -0
  497. package/win32_x64/third-party/libsmb2/source/include/apple/config.h +139 -0
  498. package/win32_x64/third-party/libsmb2/source/include/asprintf.h +65 -0
  499. package/win32_x64/third-party/libsmb2/source/include/esp/config.h +139 -0
  500. package/win32_x64/third-party/libsmb2/source/include/libsmb2-private.h +670 -0
  501. package/win32_x64/third-party/libsmb2/source/include/module.modulemap +21 -0
  502. package/win32_x64/third-party/libsmb2/source/include/picow/FreeRTOSConfig.h +143 -0
  503. package/win32_x64/third-party/libsmb2/source/include/picow/README.md +2 -0
  504. package/win32_x64/third-party/libsmb2/source/include/picow/config.h +139 -0
  505. package/win32_x64/third-party/libsmb2/source/include/picow/lwipopts.h +27 -0
  506. package/win32_x64/third-party/libsmb2/source/include/picow/lwipopts_examples_common.h +90 -0
  507. package/win32_x64/third-party/libsmb2/source/include/portable-endian.h +377 -0
  508. package/win32_x64/third-party/libsmb2/source/include/ps3/config.h +139 -0
  509. package/win32_x64/third-party/libsmb2/source/include/slist.h +63 -0
  510. package/win32_x64/third-party/libsmb2/source/include/smb2/libsmb2-dcerpc-lsa.h +172 -0
  511. package/win32_x64/third-party/libsmb2/source/include/smb2/libsmb2-dcerpc-srvsvc.h +276 -0
  512. package/win32_x64/third-party/libsmb2/source/include/smb2/libsmb2-dcerpc.h +203 -0
  513. package/win32_x64/third-party/libsmb2/source/include/smb2/libsmb2-raw.h +497 -0
  514. package/win32_x64/third-party/libsmb2/source/include/smb2/libsmb2.h +1409 -0
  515. package/win32_x64/third-party/libsmb2/source/include/smb2/smb2-errors.h +549 -0
  516. package/win32_x64/third-party/libsmb2/source/include/smb2/smb2-ioctl.h +83 -0
  517. package/win32_x64/third-party/libsmb2/source/include/smb2/smb2.h +1251 -0
  518. package/win32_x64/third-party/libsmb2/source/include/xbox/config.h +139 -0
  519. package/win32_x64/third-party/libsmb2/source/include/xbox 360/config.h +139 -0
  520. package/win32_x64/third-party/libsmb2/source/lib/CMakeLists.txt +260 -0
  521. package/win32_x64/third-party/libsmb2/source/lib/Makefile.AMIGA +46 -0
  522. package/win32_x64/third-party/libsmb2/source/lib/Makefile.AMIGA_AROS +59 -0
  523. package/win32_x64/third-party/libsmb2/source/lib/Makefile.AMIGA_OS3 +59 -0
  524. package/win32_x64/third-party/libsmb2/source/lib/Makefile.PS3_PPU +100 -0
  525. package/win32_x64/third-party/libsmb2/source/lib/Makefile.am +85 -0
  526. package/win32_x64/third-party/libsmb2/source/lib/aes.c +33 -0
  527. package/win32_x64/third-party/libsmb2/source/lib/aes.h +29 -0
  528. package/win32_x64/third-party/libsmb2/source/lib/aes128ccm.c +185 -0
  529. package/win32_x64/third-party/libsmb2/source/lib/aes128ccm.h +28 -0
  530. package/win32_x64/third-party/libsmb2/source/lib/aes_apple.c +70 -0
  531. package/win32_x64/third-party/libsmb2/source/lib/aes_apple.h +34 -0
  532. package/win32_x64/third-party/libsmb2/source/lib/aes_reference.c +560 -0
  533. package/win32_x64/third-party/libsmb2/source/lib/aes_reference.h +49 -0
  534. package/win32_x64/third-party/libsmb2/source/lib/alloc.c +154 -0
  535. package/win32_x64/third-party/libsmb2/source/lib/asn1-ber.c +1078 -0
  536. package/win32_x64/third-party/libsmb2/source/lib/asn1-ber.h +161 -0
  537. package/win32_x64/third-party/libsmb2/source/lib/compat.c +599 -0
  538. package/win32_x64/third-party/libsmb2/source/lib/compat.h +829 -0
  539. package/win32_x64/third-party/libsmb2/source/lib/dcerpc-lsa.c +641 -0
  540. package/win32_x64/third-party/libsmb2/source/lib/dcerpc-srvsvc.c +885 -0
  541. package/win32_x64/third-party/libsmb2/source/lib/dcerpc.c +2513 -0
  542. package/win32_x64/third-party/libsmb2/source/lib/dreamcast/vfs.c +328 -0
  543. package/win32_x64/third-party/libsmb2/source/lib/dreamcast/vfs.h +15 -0
  544. package/win32_x64/third-party/libsmb2/source/lib/errors.c +1192 -0
  545. package/win32_x64/third-party/libsmb2/source/lib/hmac-md5.c +84 -0
  546. package/win32_x64/third-party/libsmb2/source/lib/hmac-md5.h +42 -0
  547. package/win32_x64/third-party/libsmb2/source/lib/hmac.c +245 -0
  548. package/win32_x64/third-party/libsmb2/source/lib/init.c +778 -0
  549. package/win32_x64/third-party/libsmb2/source/lib/krb5-wrapper.c +1072 -0
  550. package/win32_x64/third-party/libsmb2/source/lib/krb5-wrapper.h +134 -0
  551. package/win32_x64/third-party/libsmb2/source/lib/libsmb2.c +4292 -0
  552. package/win32_x64/third-party/libsmb2/source/lib/libsmb2.syms +168 -0
  553. package/win32_x64/third-party/libsmb2/source/lib/md4.h +43 -0
  554. package/win32_x64/third-party/libsmb2/source/lib/md4c.c +289 -0
  555. package/win32_x64/third-party/libsmb2/source/lib/md5.c +249 -0
  556. package/win32_x64/third-party/libsmb2/source/lib/md5.h +76 -0
  557. package/win32_x64/third-party/libsmb2/source/lib/ntlmssp.c +1380 -0
  558. package/win32_x64/third-party/libsmb2/source/lib/ntlmssp.h +84 -0
  559. package/win32_x64/third-party/libsmb2/source/lib/pdu.c +1159 -0
  560. package/win32_x64/third-party/libsmb2/source/lib/ps2/TODO +6 -0
  561. package/win32_x64/third-party/libsmb2/source/lib/ps2/imports.lst +84 -0
  562. package/win32_x64/third-party/libsmb2/source/lib/ps2/irx_imports.h +28 -0
  563. package/win32_x64/third-party/libsmb2/source/lib/ps2/ps2smb2.h +35 -0
  564. package/win32_x64/third-party/libsmb2/source/lib/ps2/smb2_fio.c +816 -0
  565. package/win32_x64/third-party/libsmb2/source/lib/ps2/smb2_fio.h +15 -0
  566. package/win32_x64/third-party/libsmb2/source/lib/ps2/smb2man.c +69 -0
  567. package/win32_x64/third-party/libsmb2/source/lib/sha-private.h +28 -0
  568. package/win32_x64/third-party/libsmb2/source/lib/sha.h +334 -0
  569. package/win32_x64/third-party/libsmb2/source/lib/sha1.c +450 -0
  570. package/win32_x64/third-party/libsmb2/source/lib/sha224-256.c +611 -0
  571. package/win32_x64/third-party/libsmb2/source/lib/sha384-512.c +1059 -0
  572. package/win32_x64/third-party/libsmb2/source/lib/smb2-cmd-close.c +240 -0
  573. package/win32_x64/third-party/libsmb2/source/lib/smb2-cmd-create.c +508 -0
  574. package/win32_x64/third-party/libsmb2/source/lib/smb2-cmd-echo.c +202 -0
  575. package/win32_x64/third-party/libsmb2/source/lib/smb2-cmd-error.c +157 -0
  576. package/win32_x64/third-party/libsmb2/source/lib/smb2-cmd-flush.c +207 -0
  577. package/win32_x64/third-party/libsmb2/source/lib/smb2-cmd-ioctl.c +445 -0
  578. package/win32_x64/third-party/libsmb2/source/lib/smb2-cmd-lock.c +312 -0
  579. package/win32_x64/third-party/libsmb2/source/lib/smb2-cmd-logoff.c +190 -0
  580. package/win32_x64/third-party/libsmb2/source/lib/smb2-cmd-negotiate.c +646 -0
  581. package/win32_x64/third-party/libsmb2/source/lib/smb2-cmd-notify-change.c +278 -0
  582. package/win32_x64/third-party/libsmb2/source/lib/smb2-cmd-oplock-break.c +543 -0
  583. package/win32_x64/third-party/libsmb2/source/lib/smb2-cmd-query-directory.c +580 -0
  584. package/win32_x64/third-party/libsmb2/source/lib/smb2-cmd-query-info.c +753 -0
  585. package/win32_x64/third-party/libsmb2/source/lib/smb2-cmd-read.c +391 -0
  586. package/win32_x64/third-party/libsmb2/source/lib/smb2-cmd-session-setup.c +331 -0
  587. package/win32_x64/third-party/libsmb2/source/lib/smb2-cmd-set-info.c +361 -0
  588. package/win32_x64/third-party/libsmb2/source/lib/smb2-cmd-tree-connect.c +278 -0
  589. package/win32_x64/third-party/libsmb2/source/lib/smb2-cmd-tree-disconnect.c +171 -0
  590. package/win32_x64/third-party/libsmb2/source/lib/smb2-cmd-write.c +319 -0
  591. package/win32_x64/third-party/libsmb2/source/lib/smb2-data-file-info.c +537 -0
  592. package/win32_x64/third-party/libsmb2/source/lib/smb2-data-filesystem-info.c +384 -0
  593. package/win32_x64/third-party/libsmb2/source/lib/smb2-data-reparse-point.c +117 -0
  594. package/win32_x64/third-party/libsmb2/source/lib/smb2-data-security-descriptor.c +361 -0
  595. package/win32_x64/third-party/libsmb2/source/lib/smb2-share-enum.c +181 -0
  596. package/win32_x64/third-party/libsmb2/source/lib/smb2-signing.c +279 -0
  597. package/win32_x64/third-party/libsmb2/source/lib/smb2-signing.h +51 -0
  598. package/win32_x64/third-party/libsmb2/source/lib/smb3-seal.c +165 -0
  599. package/win32_x64/third-party/libsmb2/source/lib/smb3-seal.h +43 -0
  600. package/win32_x64/third-party/libsmb2/source/lib/socket.c +1502 -0
  601. package/win32_x64/third-party/libsmb2/source/lib/spnego-wrapper.c +634 -0
  602. package/win32_x64/third-party/libsmb2/source/lib/spnego-wrapper.h +74 -0
  603. package/win32_x64/third-party/libsmb2/source/lib/sync.c +988 -0
  604. package/win32_x64/third-party/libsmb2/source/lib/timestamps.c +70 -0
  605. package/win32_x64/third-party/libsmb2/source/lib/unicode.c +307 -0
  606. package/win32_x64/third-party/libsmb2/source/lib/usha.c +345 -0
  607. package/win32_x64/third-party/libsmb2/source/libsmb2.pc.in +14 -0
  608. package/win32_x64/third-party/libsmb2/source/packaging/RPM/libsmb2.spec.in +135 -0
  609. package/win32_x64/third-party/libsmb2/source/packaging/RPM/makerpms.sh +114 -0
  610. package/win32_x64/third-party/libsmb2/source/tests/Makefile.am +34 -0
  611. package/win32_x64/third-party/libsmb2/source/tests/README +28 -0
  612. package/win32_x64/third-party/libsmb2/source/tests/aes128ccm-test.c +119 -0
  613. package/win32_x64/third-party/libsmb2/source/tests/functions.sh +11 -0
  614. package/win32_x64/third-party/libsmb2/source/tests/ld_sockerr.c +58 -0
  615. package/win32_x64/third-party/libsmb2/source/tests/metastat-0202-censored.c +136 -0
  616. package/win32_x64/third-party/libsmb2/source/tests/ntlmssp_generate_blob.c +123 -0
  617. package/win32_x64/third-party/libsmb2/source/tests/prog_cat.c +188 -0
  618. package/win32_x64/third-party/libsmb2/source/tests/prog_cat_cancel.c +203 -0
  619. package/win32_x64/third-party/libsmb2/source/tests/prog_ls.c +189 -0
  620. package/win32_x64/third-party/libsmb2/source/tests/prog_mkdir.c +85 -0
  621. package/win32_x64/third-party/libsmb2/source/tests/prog_rmdir.c +84 -0
  622. package/win32_x64/third-party/libsmb2/source/tests/smb2-dcerpc-coder-test.c +635 -0
  623. package/win32_x64/third-party/libsmb2/source/tests/test_0100_ls_basic.sh +22 -0
  624. package/win32_x64/third-party/libsmb2/source/tests/test_0101_ls_basic_valgrind.sh +23 -0
  625. package/win32_x64/third-party/libsmb2/source/tests/test_0102_ls_basic_socket_error.sh +16 -0
  626. package/win32_x64/third-party/libsmb2/source/tests/test_0103_ls_basic_valgrind_malloc_error.sh +25 -0
  627. package/win32_x64/third-party/libsmb2/source/tests/test_0200_mkdir.sh +15 -0
  628. package/win32_x64/third-party/libsmb2/source/tests/test_0201_mkdir_valgrind.sh +15 -0
  629. package/win32_x64/third-party/libsmb2/source/tests/test_0210_cp_basic.sh +25 -0
  630. package/win32_x64/third-party/libsmb2/source/tests/test_0211_cp_valgrind.sh +26 -0
  631. package/win32_x64/third-party/libsmb2/source/tests/test_0212_cp_valgrind_socket_error.sh +29 -0
  632. package/win32_x64/third-party/libsmb2/source/tests/test_0300_cat_basic.sh +13 -0
  633. package/win32_x64/third-party/libsmb2/source/tests/test_0301_cat_valgrind.sh +13 -0
  634. package/win32_x64/third-party/libsmb2/source/tests/test_0302_cat_valgrind_socket_error.sh +18 -0
  635. package/win32_x64/third-party/libsmb2/source/tests/test_0310_cancel_pdu.sh +13 -0
  636. package/win32_x64/third-party/libsmb2/source/tests/test_0400_overdrawn_0202.sh +25 -0
  637. package/win32_x64/third-party/libsmb2/source/tests/test_900_dcerpc.sh +10 -0
  638. package/win32_x64/third-party/libsmb2/source/utils/Makefile.am +11 -0
  639. package/win32_x64/third-party/libsmb2/source/utils/smb2-cp.c +265 -0
  640. package/win32_x64/third-party/libsmb2/source/utils/smb2-ls.c +135 -0
@@ -0,0 +1,1251 @@
1
+ /* -*- mode:c; tab-width:8; c-basic-offset:8; indent-tabs-mode:nil; -*- */
2
+ /*
3
+ Copyright (C) 2016 by Ronnie Sahlberg <ronniesahlberg@gmail.com>
4
+
5
+ This program is free software; you can redistribute it and/or modify
6
+ it under the terms of the GNU Lesser General Public License as published by
7
+ the Free Software Foundation; either version 2.1 of the License, or
8
+ (at your option) any later version.
9
+
10
+ This program is distributed in the hope that it will be useful,
11
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
12
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
+ GNU Lesser General Public License for more details.
14
+
15
+ You should have received a copy of the GNU Lesser General Public License
16
+ along with this program; if not, see <http://www.gnu.org/licenses/>.
17
+ */
18
+
19
+ #ifndef _SMB2_H_
20
+ #define _SMB2_H_
21
+
22
+ #include <smb2/smb2-errors.h>
23
+
24
+ #ifdef HAVE_STDINT_H
25
+ #include <stdint.h>
26
+ #endif
27
+
28
+ #ifdef HAVE_TIME_H
29
+ #include <time.h>
30
+ #endif
31
+
32
+ #ifdef __cplusplus
33
+ extern "C" {
34
+ #endif
35
+
36
+ struct smb2_timeval {
37
+ time_t tv_sec;
38
+ long tv_usec;
39
+ };
40
+ #define SMB2_ERROR_REPLY_SIZE 9
41
+
42
+ struct smb2_error_reply {
43
+ uint8_t error_context_count;
44
+ uint32_t byte_count;
45
+ uint8_t *error_data;
46
+ };
47
+
48
+
49
+ #define SMB2_FLAGS_SERVER_TO_REDIR 0x00000001
50
+ #define SMB2_FLAGS_ASYNC_COMMAND 0x00000002
51
+ #define SMB2_FLAGS_RELATED_OPERATIONS 0x00000004
52
+ #define SMB2_FLAGS_SIGNED 0x00000008
53
+ #define SMB2_FLAGS_PRIORITY_MASK 0x00000070
54
+ #define SMB2_FLAGS_DFS_OPERATIONS 0x10000000
55
+ #define SMB2_FLAGS_REPLAY_OPERATION 0x20000000
56
+
57
+ enum smb2_command {
58
+ SMB2_NEGOTIATE = 0,
59
+ SMB2_SESSION_SETUP = 1,
60
+ SMB2_LOGOFF = 2,
61
+ SMB2_TREE_CONNECT = 3,
62
+ SMB2_TREE_DISCONNECT = 4,
63
+ SMB2_CREATE = 5,
64
+ SMB2_CLOSE = 6,
65
+ SMB2_FLUSH = 7,
66
+ SMB2_READ = 8,
67
+ SMB2_WRITE = 9,
68
+ SMB2_LOCK = 10,
69
+ SMB2_IOCTL = 11,
70
+ SMB2_CANCEL = 12,
71
+ SMB2_ECHO = 13,
72
+ SMB2_QUERY_DIRECTORY = 14,
73
+ SMB2_CHANGE_NOTIFY = 15,
74
+ SMB2_QUERY_INFO = 16,
75
+ SMB2_SET_INFO = 17,
76
+ SMB2_OPLOCK_BREAK = 18,
77
+
78
+ SMB1_NEGOTIATE = 114,
79
+ };
80
+
81
+ /*
82
+ * SMB2 NEGOTIATE
83
+ */
84
+ #define SMB2_NEGOTIATE_SIGNING_ENABLED 0x0001
85
+ #define SMB2_NEGOTIATE_SIGNING_REQUIRED 0x0002
86
+
87
+ #define SMB2_GLOBAL_CAP_DFS 0x00000001
88
+ #define SMB2_GLOBAL_CAP_LEASING 0x00000002
89
+ #define SMB2_GLOBAL_CAP_LARGE_MTU 0x00000004
90
+ #define SMB2_GLOBAL_CAP_MULTI_CHANNEL 0x00000008
91
+ #define SMB2_GLOBAL_CAP_PERSISTENT_HANDLES 0x00000010
92
+ #define SMB2_GLOBAL_CAP_DIRECTORY_LEASING 0x00000020
93
+ #define SMB2_GLOBAL_CAP_ENCRYPTION 0x00000040
94
+
95
+ #define SMB2_PREAUTH_INTEGRITY_CAP 0x0001
96
+ #define SMB2_ENCRYPTION_CAP 0x0002
97
+ #define SMB2_COMPRESSION_CAP 0x0003
98
+ #define SMB2_NETNAME_NEGOTIATE_CONTEXT_ID 0x0005
99
+ #define SMB2_TRANSPORT_CAP 0x0006
100
+ #define SMB2_RDMA_TRANSFORM_CAP 0x0007
101
+ #define SMB2_SIGNING_CAP 0x0008
102
+ #define SMB2_CONTEXTTYPE_RESERVED 0x0100
103
+
104
+ #define SMB2_HASH_SHA_512 0x0001
105
+ #define SMB2_PREAUTH_HASH_SIZE 64
106
+
107
+ #define SMB2_ENCRYPTION_AES_128_CCM 0x0001
108
+ #define SMB2_ENCRYPTION_AES_128_GCM 0x0002
109
+
110
+ #define SMB2_NEGOTIATE_MAX_DIALECTS 10
111
+
112
+ #define SMB2_NEGOTIATE_REQUEST_SIZE 36
113
+
114
+ #define SMB2_GUID_SIZE 16
115
+ typedef uint8_t smb2_guid[SMB2_GUID_SIZE];
116
+
117
+ struct smb2_negotiate_request {
118
+ uint16_t dialect_count;
119
+ uint16_t security_mode;
120
+ uint32_t capabilities;
121
+ smb2_guid client_guid;
122
+ uint32_t negotiate_context_offset;
123
+ uint16_t negotiate_context_count;
124
+ uint16_t dialects[SMB2_NEGOTIATE_MAX_DIALECTS];
125
+ };
126
+
127
+ #define SMB2_NEGOTIATE_REPLY_SIZE 65
128
+
129
+ struct smb2_negotiate_reply {
130
+ uint16_t security_mode;
131
+ uint16_t dialect_revision;
132
+ uint16_t cypher;
133
+ smb2_guid server_guid;
134
+ uint32_t capabilities;
135
+ uint32_t max_transact_size;
136
+ uint32_t max_read_size;
137
+ uint32_t max_write_size;
138
+ uint64_t system_time;
139
+ uint64_t server_start_time;
140
+ uint32_t negotiate_context_offset;
141
+ uint16_t negotiate_context_count;
142
+ uint16_t security_buffer_length;
143
+ uint16_t security_buffer_offset;
144
+ uint8_t *security_buffer;
145
+ };
146
+
147
+ /* session setup flags */
148
+ #define SMB2_SESSION_FLAG_BINDING 0x01
149
+
150
+ /* session setup capabilities */
151
+ #define SMB2_GLOBAL_CAP_DFS 0x00000001
152
+ #define SMB2_GLOBAL_CAP_UNUSED1 0x00000002
153
+ #define SMB2_GLOBAL_CAP_UNUSED2 0x00000004
154
+ #define SMB2_GLOBAL_CAP_UNUSED4 0x00000008
155
+
156
+ #define SMB2_SESSION_SETUP_REQUEST_SIZE 25
157
+
158
+ struct smb2_session_setup_request {
159
+ uint8_t flags;
160
+ uint8_t security_mode;
161
+ uint32_t capabilities;
162
+ uint32_t channel;
163
+ uint64_t previous_session_id;
164
+ uint16_t security_buffer_length;
165
+ uint8_t *security_buffer;
166
+ };
167
+
168
+ #define SMB2_SESSION_FLAG_IS_GUEST 0x0001
169
+ #define SMB2_SESSION_FLAG_IS_NULL 0x0002
170
+ #define SMB2_SESSION_FLAG_IS_ENCRYPT_DATA 0x0004
171
+
172
+ #define SMB2_SESSION_SETUP_REPLY_SIZE 9
173
+
174
+ struct smb2_session_setup_reply {
175
+ uint16_t session_flags;
176
+ uint16_t security_buffer_length;
177
+ uint16_t security_buffer_offset;
178
+ uint8_t *security_buffer;
179
+ };
180
+
181
+ #define SMB2_TREE_CONNECT_REQUEST_SIZE 9
182
+
183
+ #define SMB2_SHAREFLAG_CLUSTER_RECONNECT 0x0001
184
+
185
+ struct smb2_tree_connect_request {
186
+ uint16_t flags;
187
+ uint16_t path_offset;
188
+ uint16_t path_length;
189
+ uint16_t *path;
190
+ };
191
+
192
+ #define SMB2_SHARE_TYPE_DISK 0x01
193
+ #define SMB2_SHARE_TYPE_PIPE 0x02
194
+ #define SMB2_SHARE_TYPE_PRINT 0x03
195
+
196
+ #define SMB2_SHAREFLAG_MANUAL_CACHING 0x00000000
197
+ #define SMB2_SHAREFLAG_DFS 0x00000001
198
+ #define SMB2_SHAREFLAG_DFS_ROOT 0x00000002
199
+ #define SMB2_SHAREFLAG_AUTO_CACHING 0x00000010
200
+ #define SMB2_SHAREFLAG_VDO_CACHING 0x00000020
201
+ #define SMB2_SHAREFLAG_NO_CACHING 0x00000030
202
+ #define SMB2_SHAREFLAG_RESTRICT_EXCLUSIVE_OPENS 0x00000100
203
+ #define SMB2_SHAREFLAG_FORCE_SHARED_DELETE 0x00000200
204
+ #define SMB2_SHAREFLAG_ALLOW_NAMESPACE_CACHING 0x00000400
205
+ #define SMB2_SHAREFLAG_ACCESS_BASED_DIRECTORY_ENUM 0x00000800
206
+ #define SMB2_SHAREFLAG_FORCE_LEVELII_OPLOCK 0x00001000
207
+ #define SMB2_SHAREFLAG_ENABLE_HASH_V1 0x00002000
208
+ #define SMB2_SHAREFLAG_ENABLE_HASH_V2 0x00004000
209
+ #define SMB2_SHAREFLAG_ENCRYPT_DATA 0x00008000
210
+
211
+ #define SMB2_SHARE_CAP_DFS 0x00000008
212
+ #define SMB2_SHARE_CAP_CONTINUOUS_AVAILABILITY 0x00000010
213
+ #define SMB2_SHARE_CAP_SCALEOUT 0x00000020
214
+ #define SMB2_SHARE_CAP_CLUSTER 0x00000040
215
+ #define SMB2_SHARE_CAP_ASYMMETRIC 0x00000080
216
+
217
+ #define SMB2_TREE_CONNECT_REPLY_SIZE 16
218
+
219
+ struct smb2_tree_connect_reply {
220
+ uint8_t share_type;
221
+ uint32_t share_flags;
222
+ uint32_t capabilities;
223
+ uint32_t maximal_access;
224
+ };
225
+
226
+ #define SMB2_CREATE_REQUEST_SIZE 57
227
+
228
+ #define SMB2_OPLOCK_LEVEL_NONE 0x00
229
+ #define SMB2_OPLOCK_LEVEL_II 0x01
230
+ #define SMB2_OPLOCK_LEVEL_EXCLUSIVE 0x08
231
+ #define SMB2_OPLOCK_LEVEL_BATCH 0x09
232
+ #define SMB2_OPLOCK_LEVEL_LEASE 0xff
233
+
234
+ #define SMB2_CREATE_REQUEST_LEASE_SIZE 32
235
+
236
+ #define SMB2_IMPERSONATION_ANONYMOUS 0x00000000
237
+ #define SMB2_IMPERSONATION_IDENTIFICATION 0x00000001
238
+ #define SMB2_IMPERSONATION_IMPERSONATION 0x00000002
239
+ #define SMB2_IMPERSONATION_DELEGATE 0x00000003
240
+
241
+ /* Access mask common to all objects */
242
+ #define SMB2_FILE_READ_EA 0x00000008
243
+ #define SMB2_FILE_WRITE_EA 0x00000010
244
+ #define SMB2_FILE_DELETE_CHILD 0x00000040
245
+ #define SMB2_FILE_READ_ATTRIBUTES 0x00000080
246
+ #define SMB2_FILE_WRITE_ATTRIBUTES 0x00000100
247
+ #define SMB2_DELETE 0x00010000
248
+ #define SMB2_READ_CONTROL 0x00020000
249
+ #define SMB2_WRITE_DACL 0x00040000
250
+ #define SMB2_WRITE_OWNER 0x00080000
251
+ #define SMB2_SYNCHRONIZE 0x00100000
252
+ #define SMB2_ACCESS_SYSTEM_SECURITY 0x01000000
253
+ #define SMB2_MAXIMUM_ALLOWED 0x02000000
254
+ #define SMB2_GENERIC_ALL 0x10000000
255
+ #define SMB2_GENERIC_EXECUTE 0x20000000
256
+ #define SMB2_GENERIC_WRITE 0x40000000
257
+ #define SMB2_GENERIC_READ 0x80000000
258
+
259
+ /* Access mask unique for file/pipe/printer */
260
+ #define SMB2_FILE_READ_DATA 0x00000001
261
+ #define SMB2_FILE_WRITE_DATA 0x00000002
262
+ #define SMB2_FILE_APPEND_DATA 0x00000004
263
+ #define SMB2_FILE_EXECUTE 0x00000020
264
+
265
+ /* Access mask unique for directories */
266
+ #define SMB2_FILE_LIST_DIRECTORY 0x00000001
267
+ #define SMB2_FILE_ADD_FILE 0x00000002
268
+ #define SMB2_FILE_ADD_SUBDIRECTORY 0x00000004
269
+ #define SMB2_FILE_TRAVERSE 0x00000020
270
+
271
+ /* File attributes */
272
+ #define SMB2_FILE_ATTRIBUTE_READONLY 0x00000001
273
+ #define SMB2_FILE_ATTRIBUTE_HIDDEN 0x00000002
274
+ #define SMB2_FILE_ATTRIBUTE_SYSTEM 0x00000004
275
+ #define SMB2_FILE_ATTRIBUTE_DIRECTORY 0x00000010
276
+ #define SMB2_FILE_ATTRIBUTE_ARCHIVE 0x00000020
277
+ #define SMB2_FILE_ATTRIBUTE_NORMAL 0x00000080
278
+ #define SMB2_FILE_ATTRIBUTE_TEMPORARY 0x00000100
279
+ #define SMB2_FILE_ATTRIBUTE_SPARSE_FILE 0x00000200
280
+ #define SMB2_FILE_ATTRIBUTE_REPARSE_POINT 0x00000400
281
+ #define SMB2_FILE_ATTRIBUTE_COMPRESSED 0x00000800
282
+ #define SMB2_FILE_ATTRIBUTE_OFFLINE 0x00001000
283
+ #define SMB2_FILE_ATTRIBUTE_NOT_CONTENT_INDEXED 0x00002000
284
+ #define SMB2_FILE_ATTRIBUTE_ENCRYPTED 0x00004000
285
+ #define SMB2_FILE_ATTRIBUTE_INTEGRITY_STREAM 0x00008000
286
+ #define SMB2_FILE_ATTRIBUTE_NO_SCRUB_DATA 0x00020000
287
+
288
+ /* Share access */
289
+ #define SMB2_FILE_SHARE_READ 0x00000001
290
+ #define SMB2_FILE_SHARE_WRITE 0x00000002
291
+ #define SMB2_FILE_SHARE_DELETE 0x00000004
292
+
293
+ /* Create disposition */
294
+ #define SMB2_FILE_SUPERSEDE 0x00000000
295
+ #define SMB2_FILE_OPEN 0x00000001
296
+ #define SMB2_FILE_CREATE 0x00000002
297
+ #define SMB2_FILE_OPEN_IF 0x00000003
298
+ #define SMB2_FILE_OVERWRITE 0x00000004
299
+ #define SMB2_FILE_OVERWRITE_IF 0x00000005
300
+
301
+ /* Create options */
302
+ #define SMB2_FILE_DIRECTORY_FILE 0x00000001
303
+ #define SMB2_FILE_WRITE_THROUGH 0x00000002
304
+ #define SMB2_FILE_SEQUENTIAL_ONLY 0x00000004
305
+ #define SMB2_FILE_NO_INTERMEDIATE_BUFFERING 0x00000008
306
+ #define SMB2_FILE_SYNCHRONOUS_IO_ALERT 0x00000010
307
+ #define SMB2_FILE_SYNCHRONOUS_IO_NONALERT 0x00000020
308
+ #define SMB2_FILE_NON_DIRECTORY_FILE 0x00000040
309
+ #define SMB2_FILE_COMPLETE_IF_OPLOCKED 0x00000100
310
+ #define SMB2_FILE_NO_EA_KNOWLEDGE 0x00000200
311
+ #define SMB2_FILE_RANDOM_ACCESS 0x00000800
312
+ #define SMB2_FILE_DELETE_ON_CLOSE 0x00001000
313
+ #define SMB2_FILE_OPEN_BY_FILE_ID 0x00002000
314
+ #define SMB2_FILE_OPEN_FOR_BACKUP_INTENT 0x00004000
315
+ #define SMB2_FILE_NO_COMPRESSION 0x00008000
316
+ #define SMB2_FILE_OPEN_REMOTE_INSTANCE 0x00000400
317
+ #define SMB2_FILE_OPEN_REQUIRING_OPLOCK 0x00010000
318
+ #define SMB2_FILE_DISALLOW_EXCLUSIVE 0x00020000
319
+ #define SMB2_FILE_RESERVE_OPFILTER 0x00100000
320
+ #define SMB2_FILE_OPEN_REPARSE_POINT 0x00200000
321
+ #define SMB2_FILE_OPEN_NO_RECALL 0x00400000
322
+ #define SMB2_FILE_OPEN_FOR_FREE_SPACE_QUERY 0x00800000
323
+
324
+ struct smb2_create_request {
325
+ uint8_t security_flags;
326
+ uint8_t requested_oplock_level;
327
+ uint32_t impersonation_level;
328
+ uint64_t smb_create_flags;
329
+ uint32_t desired_access;
330
+ uint32_t file_attributes;
331
+ uint32_t share_access;
332
+ uint32_t create_disposition;
333
+ uint32_t create_options;
334
+ uint16_t name_offset;
335
+ uint16_t name_length;
336
+ const char *name; /* name in UTF8 */
337
+ uint32_t create_context_offset;
338
+ uint32_t create_context_length;
339
+ uint8_t *create_context;
340
+ };
341
+
342
+ #define SMB2_CREATE_REPLY_SIZE 89
343
+
344
+ #define SMB2_FD_SIZE 16
345
+ typedef uint8_t smb2_file_id[SMB2_FD_SIZE];
346
+
347
+ #define SMB2_LEASE_KEY_SIZE 16
348
+ typedef uint8_t smb2_lease_key[SMB2_LEASE_KEY_SIZE];
349
+
350
+ struct smb2fh;
351
+ smb2_file_id *smb2_get_file_id(struct smb2fh *fh);
352
+
353
+ /*
354
+ * This creates a new smb2fh based on fileid.
355
+ * Free it with smb2_close_async()
356
+ */
357
+ struct smb2_context;
358
+ struct smb2fh *smb2_fh_from_file_id(struct smb2_context *smb2,
359
+ smb2_file_id *fileid);
360
+
361
+ struct smb2_create_reply {
362
+ uint8_t oplock_level;
363
+ uint8_t flags;
364
+ uint32_t create_action;
365
+ uint64_t creation_time;
366
+ uint64_t last_access_time;
367
+ uint64_t last_write_time;
368
+ uint64_t change_time;
369
+ uint64_t allocation_size;
370
+ uint64_t end_of_file;
371
+ uint32_t file_attributes;
372
+ smb2_file_id file_id;
373
+ uint32_t create_context_length;
374
+ uint32_t create_context_offset;
375
+ uint8_t *create_context;
376
+ };
377
+
378
+ #define SMB2_CLOSE_REQUEST_SIZE 24
379
+
380
+ #define SMB2_CLOSE_FLAG_POSTQUERY_ATTRIB 0x0001
381
+
382
+ struct smb2_close_request {
383
+ uint16_t flags;
384
+ smb2_file_id file_id;
385
+ };
386
+
387
+ #define SMB2_CLOSE_REPLY_SIZE 60
388
+
389
+ struct smb2_close_reply {
390
+ uint16_t flags;
391
+ uint64_t creation_time;
392
+ uint64_t last_access_time;
393
+ uint64_t last_write_time;
394
+ uint64_t change_time;
395
+ uint64_t allocation_size;
396
+ uint64_t end_of_file;
397
+ uint32_t file_attributes;
398
+ };
399
+
400
+ #define SMB2_FLUSH_REQUEST_SIZE 24
401
+
402
+ struct smb2_flush_request {
403
+ smb2_file_id file_id;
404
+ };
405
+
406
+ #define SMB2_LOGFF_REQUEST_SIZE 4
407
+
408
+ struct smb2_logoff_request {
409
+ uint16_t reserved;
410
+ };
411
+
412
+ #define SMB2_ECHO_REQUEST_SIZE 4
413
+
414
+ struct smb2_echo_request {
415
+ uint16_t reserved;
416
+ };
417
+
418
+ #define SMB2_FLUSH_REPLY_SIZE 4
419
+
420
+ #define SMB2_QUERY_DIRECTORY_REQUEST_SIZE 33
421
+
422
+ /* File information class */
423
+ #define SMB2_FILE_DIRECTORY_INFORMATION 0x01
424
+ #define SMB2_FILE_FULL_DIRECTORY_INFORMATION 0x02
425
+ #define SMB2_FILE_BOTH_DIRECTORY_INFORMATION 0x03
426
+ #define SMB2_FILE_ID_BOTH_DIRECTORY_INFORMATION 0x25
427
+ #define SMB2_FILE_ID_FULL_DIRECTORY_INFORMATION 0x26
428
+
429
+ /* query flags */
430
+ #define SMB2_RESTART_SCANS 0x01
431
+ #define SMB2_RETURN_SINGLE_ENTRY 0x02
432
+ #define SMB2_INDEX_SPECIFIED 0x04
433
+ #define SMB2_REOPEN 0x10
434
+
435
+ #define SMB2_FILEID_FULL_DIRECTORY_INFORMATION_SIZE 80
436
+
437
+ /* Structure for SMB2_FILE_ID_FULL_DIRECTORY_INFORMATION.
438
+ * This is also used as the dirent content.
439
+ */
440
+ struct smb2_fileidfulldirectoryinformation {
441
+ uint32_t next_entry_offset;
442
+ uint32_t file_index;
443
+ struct smb2_timeval creation_time;
444
+ struct smb2_timeval last_access_time;
445
+ struct smb2_timeval last_write_time;
446
+ struct smb2_timeval change_time;
447
+ uint64_t end_of_file;
448
+ uint64_t allocation_size;
449
+ uint32_t file_attributes;
450
+ uint32_t file_name_length;
451
+ uint32_t ea_size;
452
+ uint64_t file_id;
453
+ const char *name; /* or "reserved" for replys */
454
+ };
455
+
456
+ #define SMB2_FILEID_BOTH_DIRECTORY_INFORMATION_SIZE 104
457
+
458
+ /* Structure for SMB2_FILE_ID_BOTH_DIRECTORY_INFORMATION.
459
+ */
460
+ struct smb2_fileidbothdirectoryinformation {
461
+ uint32_t next_entry_offset;
462
+ uint32_t file_index;
463
+ struct smb2_timeval creation_time;
464
+ struct smb2_timeval last_access_time;
465
+ struct smb2_timeval last_write_time;
466
+ struct smb2_timeval change_time;
467
+ uint64_t end_of_file;
468
+ uint64_t allocation_size;
469
+ uint32_t file_attributes;
470
+ uint32_t file_name_length;
471
+ uint32_t ea_size;
472
+ uint8_t short_name_length;
473
+ uint8_t short_name[24];
474
+ uint64_t file_id;
475
+ const char *name; /* or "reserved" for replys */
476
+ };
477
+
478
+ struct smb2_iovec;
479
+ int smb2_decode_fileidfulldirectoryinformation(
480
+ struct smb2_context *smb2,
481
+ struct smb2_fileidfulldirectoryinformation *fs,
482
+ struct smb2_iovec *vec);
483
+
484
+ struct smb2_query_directory_request {
485
+ uint8_t file_information_class;
486
+ uint8_t flags;
487
+ uint32_t file_index;
488
+ smb2_file_id file_id;
489
+ uint32_t output_buffer_length;
490
+ uint16_t file_name_offset;
491
+ uint16_t file_name_length;
492
+ const char *name; /* name in UTF8 */
493
+ };
494
+
495
+ #define SMB2_QUERY_DIRECTORY_REPLY_SIZE 9
496
+
497
+ struct smb2_query_directory_reply {
498
+ uint16_t output_buffer_offset;
499
+ uint32_t output_buffer_length;
500
+ uint8_t *output_buffer;
501
+ };
502
+
503
+ #define SMB2_READ_REQUEST_SIZE 49
504
+
505
+ #define SMB2_READFLAG_READ_UNBUFFERED 0x01
506
+
507
+ #define SMB2_CHANNEL_NONE 0x00000000
508
+ #define SMB2_CHANNEL_RDMA_V1 0x00000001
509
+ #define SMB2_CHANNEL_RDMA_V1_INVALIDATE 0x00000002
510
+
511
+ struct smb2_read_request {
512
+ uint8_t flags;
513
+ uint32_t length;
514
+ uint64_t offset;
515
+ uint8_t *buf;
516
+ smb2_file_id file_id;
517
+ uint32_t minimum_count;
518
+ uint32_t channel;
519
+ uint32_t remaining_bytes;
520
+ uint16_t read_channel_info_offset;
521
+ uint16_t read_channel_info_length;
522
+ uint8_t *read_channel_info;
523
+ };
524
+
525
+ #define SMB2_READ_REPLY_SIZE 17
526
+
527
+ struct smb2_read_reply {
528
+ uint8_t data_offset;
529
+ uint32_t data_length;
530
+ uint32_t data_remaining;
531
+ uint8_t *data;
532
+ };
533
+
534
+ #define SMB2_QUERY_INFO_REQUEST_SIZE 41
535
+
536
+ /* info type */
537
+ #define SMB2_0_INFO_FILE 0x01
538
+ #define SMB2_0_INFO_FILESYSTEM 0x02
539
+ #define SMB2_0_INFO_SECURITY 0x03
540
+ #define SMB2_0_INFO_QUOTA 0x04
541
+
542
+ /* File information class : for SMB2_0_INFO_FILE */
543
+ #define SMB2_FILE_DIRECTORY_INFORMATION 0x01
544
+ #define SMB2_FILE_FULL_DIRECTORY_INFORMATION 0x02
545
+ #define SMB2_FILE_BOTH_DIRECTORY_INFORMATION 0x03
546
+ #define SMB2_FILE_BASIC_INFORMATION 0x04
547
+ #define SMB2_FILE_STANDARD_INFORMATION 0x05
548
+ #define SMB2_FILE_INTERNAL_INFORMATION 0x06
549
+ #define SMB2_FILE_EA_INFORMATION 0x07
550
+ #define SMB2_FILE_ACCESS_INFORMATION 0x08
551
+ #define SMB2_FILE_NAME_INFORMATION 0x09
552
+ #define SMB2_FILE_RENAME_INFORMATION 0x0A
553
+ #define SMB2_FILE_LINK_INFORMATION 0x0B
554
+ #define SMB2_FILE_NAMES_INFORMATION 0x0C
555
+ #define SMB2_FILE_DISPOSITION_INFORMATION 0x0D
556
+ #define SMB2_FILE_POSITION_INFORMATION 0x0E
557
+ #define SMB2_FILE_FULL_EA_INFORMATION 0x0F
558
+ #define SMB2_FILE_MODE_INFORMATION 0x10
559
+ #define SMB2_FILE_ALIGNMENT_INFORMATION 0x11
560
+ #define SMB2_FILE_ALL_INFORMATION 0x12
561
+ #define SMB2_FILE_ALLOCATION_INFORMATION 0x13
562
+ #define SMB2_FILE_END_OF_FILE_INFORMATION 0x14
563
+ #define SMB2_FILE_ALTERNATE_NAME_INFORMATION 0x15
564
+ #define SMB2_FILE_OBJECT_ID_INFORMATION 0x1D
565
+ #define SMB2_FILE_ATTRIBUTE_TAG_INFORMATION 0x23
566
+ #define SMB2_FILE_VALID_DATA_LENGTH_INFORMATION 0x27
567
+ #define SMB2_FILE_NORMALIZED_NAME_INFORMATION 0x30
568
+ #define SMB2_FILE_ID_INFORMATION 0x3B
569
+
570
+ #define SMB2_FILE_STREAM_INFORMATION 0x16
571
+ #define SMB2_FILE_PIPE_INFORMATION 0x17
572
+ #define SMB2_FILE_PIPE_LOCAL_INFORMATION 0x18
573
+ #define SMB2_FILE_PIPE_REMOTE_INFORMATION 0x19
574
+ #define SMB2_FILE_MAILSLOT_QUERY_INFORMATION 0x1A
575
+ #define SMB2_FILE_MAILSLOT_SET_INFORMATION 0x1B
576
+ #define SMB2_FILE_COMPRESSION_INFORMATION 0x1C
577
+ #define SMB2_FILE_OBJECT_ID_INFORMATION 0x1D
578
+ #define SMB2_FILE_QUOTA_INFORMATION 0x20
579
+ #define SMB2_FILE_REPARSE_POINT_INFORMATION 0x21
580
+ #define SMB2_FILE_NETWORK_OPEN_INFORMATION 0x22
581
+
582
+ /* Filesystem information class : for SMB2_0_INFO_FILESYSTEM */
583
+ #define SMB2_FILE_FS_VOLUME_INFORMATION 1
584
+ #define SMB2_FILE_FS_SIZE_INFORMATION 3
585
+ #define SMB2_FILE_FS_DEVICE_INFORMATION 4
586
+ #define SMB2_FILE_FS_ATTRIBUTE_INFORMATION 5
587
+ #define SMB2_FILE_FS_CONTROL_INFORMATION 6
588
+ #define SMB2_FILE_FS_FULL_SIZE_INFORMATION 7
589
+ #define SMB2_FILE_FS_OBJECT_ID_INFORMATION 8
590
+ #define SMB2_FILE_FS_SECTOR_SIZE_INFORMATION 11
591
+
592
+ #define SMB2_FILE_INFO_CLASS_RESERVED 0x40
593
+
594
+ /* additional info */
595
+ #define SMB2_OWNER_SECURITY_INFORMATION 0x00000001
596
+ #define SMB2_GROUP_SECURITY_INFORMATION 0x00000002
597
+ #define SMB2_DACL_SECURITY_INFORMATION 0x00000004
598
+ #define SMB2_SACL_SECURITY_INFORMATION 0x00000008
599
+ #define SMB2_LABEL_SECURITY_INFORMATION 0x00000010
600
+ #define SMB2_ATTRIBUTE_SECURITY_INFORMATION 0x00000020
601
+ #define SMB2_SCOPE_SECURITY_INFORMATION 0x00000040
602
+ #define SMB2_BACKUP_SECURITY_INFORMATION 0x00010000
603
+
604
+ /* flags */
605
+ #define SL_RESTART_SCAN 0x00000001
606
+ #define SL_RETURN_SINGLE_ENTRY 0x00000002
607
+ #define SL_INDEX_SPECIFIED 0x00000004
608
+
609
+ /*
610
+ * FILE_BASIC_INFORMATION
611
+ */
612
+ struct smb2_file_basic_info {
613
+ struct smb2_timeval creation_time;
614
+ struct smb2_timeval last_access_time;
615
+ struct smb2_timeval last_write_time;
616
+ struct smb2_timeval change_time;
617
+ uint32_t file_attributes;
618
+ };
619
+
620
+ /*
621
+ * FILE_STANDARD_INFORMATION
622
+ */
623
+ struct smb2_file_standard_info {
624
+ uint64_t allocation_size;
625
+ uint64_t end_of_file;
626
+ uint32_t number_of_links;
627
+ uint8_t delete_pending;
628
+ uint8_t directory;
629
+ };
630
+
631
+ /*
632
+ * FILE_STREAM_INFORMATION
633
+ */
634
+ struct smb2_file_stream_info {
635
+ uint32_t next_entry_offset;
636
+ uint32_t stream_name_length;
637
+ uint64_t stream_size;
638
+ uint64_t stream_allocation_size;
639
+ const char *stream_name;
640
+ };
641
+
642
+ /*
643
+ * FILE_POSITION_INFORMATION
644
+ */
645
+ struct smb2_file_position_info {
646
+ uint64_t current_byte_offset;
647
+ };
648
+
649
+ /*
650
+ * FILE_NAME_INFORMATION
651
+ */
652
+ struct smb2_file_name_info {
653
+ uint32_t file_name_length;
654
+ const uint8_t *name;
655
+ };
656
+
657
+ /*
658
+ * FILE_ALL_INFORMATION.
659
+ */
660
+ struct smb2_file_all_info {
661
+ struct smb2_file_basic_info basic;
662
+ struct smb2_file_standard_info standard;
663
+ uint64_t index_number;
664
+ uint32_t ea_size;
665
+ uint32_t access_flags;
666
+ uint64_t current_byte_offset;
667
+ uint32_t mode;
668
+ uint32_t alignment_requirement;
669
+ const uint8_t *name;
670
+ };
671
+
672
+ struct smb2_query_info_request {
673
+ uint8_t info_type;
674
+ uint8_t file_info_class;
675
+ uint32_t output_buffer_length;
676
+ uint16_t input_buffer_offset;
677
+ uint32_t input_buffer_length;
678
+ uint8_t *input_buffer;
679
+ uint32_t additional_information;
680
+ uint32_t flags;
681
+ smb2_file_id file_id;
682
+ const uint8_t *input;
683
+ };
684
+
685
+ /*
686
+ * FILE_END_OF_FILE_INFORMATION.
687
+ */
688
+ struct smb2_file_end_of_file_info {
689
+ uint64_t end_of_file;
690
+ };
691
+
692
+ /*
693
+ * FILE_DISPOSITION_INFORMATION.
694
+ */
695
+ struct smb2_file_disposition_info {
696
+ uint8_t delete_pending;
697
+ };
698
+
699
+ /*
700
+ * SMB2_FILE_RENAME_INFORMATION.
701
+ */
702
+ struct smb2_file_rename_info {
703
+ uint8_t replace_if_exist;
704
+ const uint8_t* file_name;
705
+ };
706
+
707
+ /*
708
+ * FILE_NETWORK_OPEN_INFORMATION
709
+ */
710
+ struct smb2_file_network_open_info {
711
+ struct smb2_timeval creation_time;
712
+ struct smb2_timeval last_access_time;
713
+ struct smb2_timeval last_write_time;
714
+ struct smb2_timeval change_time;
715
+ uint64_t allocation_size;
716
+ uint64_t end_of_file;
717
+ uint32_t file_attributes;
718
+ };
719
+
720
+ #define SMB2_SET_INFO_REQUEST_SIZE 33
721
+
722
+ struct smb2_set_info_request {
723
+ uint8_t info_type;
724
+ uint8_t file_info_class;
725
+ uint32_t buffer_length;
726
+ uint16_t buffer_offset;
727
+ uint32_t additional_information;
728
+ smb2_file_id file_id;
729
+ void *input_data;
730
+ };
731
+
732
+ #define SMB2_SET_INFO_REPLY_SIZE 2
733
+
734
+ /*
735
+ * SID
736
+ */
737
+ #define SID_ID_AUTH_LEN 6
738
+
739
+ #ifdef _MSC_VER
740
+ #pragma warning(push)
741
+ #pragma warning( disable : 4200 ) /* Silence c4200 warning. */
742
+ #endif
743
+
744
+ struct smb2_sid {
745
+ uint8_t revision;
746
+ uint8_t sub_auth_count;
747
+ uint8_t id_auth[SID_ID_AUTH_LEN];
748
+ uint32_t sub_auth[0];
749
+ };
750
+
751
+ #ifdef _MSC_VER
752
+ #pragma warning(pop)
753
+ #endif
754
+
755
+ /*
756
+ * ACE
757
+ */
758
+ /* ace type */
759
+ #define SMB2_ACCESS_ALLOWED_ACE_TYPE 0x00
760
+ #define SMB2_ACCESS_DENIED_ACE_TYPE 0x01
761
+ #define SMB2_SYSTEM_AUDIT_ACE_TYPE 0x02
762
+ /*
763
+ * Reserved for future use
764
+ * #define SMB2_SYSTEM_ALARM_ACE_TYPE 0x03
765
+ */
766
+ #define SMB2_ACCESS_ALLOWED_OBJECT_ACE_TYPE 0x05
767
+ #define SMB2_ACCESS_DENIED_OBJECT_ACE_TYPE 0x06
768
+ #define SMB2_SYSTEM_AUDIT_OBJECT_ACE_TYPE 0x07
769
+ /*
770
+ * Reserved for future use
771
+ * #define SMB2_SYSTEM_ALARM_OBJECT_ACE_TYPE 0x08
772
+ */
773
+ #define SMB2_ACCESS_ALLOWED_CALLBACK_ACE_TYPE 0x09
774
+ #define SMB2_ACCESS_DENIED_CALLBACK_ACE_TYPE 0x10
775
+ #define SMB2_SYSTEM_MANDATORY_LABEL_ACE_TYPE 0x11
776
+ #define SMB2_SYSTEM_RESOURCE_ATTRIBUTE_ACE_TYPE 0x12
777
+ #define SMB2_SYSTEM_SCOPED_POLICY_ID_ACE_TYPE 0x13
778
+
779
+ /* ace flags */
780
+ #define SMB2_OBJECT_INHERIT_ACE 0x01
781
+ #define SMB2_CONTAINER_INHERIT_ACE 0x02
782
+ #define SMB2_NO_PROPAGATE_INHERIT_ACE 0x04
783
+ #define SMB2_INHERIT_ONLY_ACE 0x08
784
+ #define SMB2_INHERITED_ACE 0x10
785
+ #define SMB2_SUCCESSFUL_ACCESS_ACE_FLAG 0x40
786
+ #define SMB2_FAILED_ACCESS_ACE_FLAG 0x80
787
+
788
+ #define SMB2_OBJECT_TYPE_SIZE 16
789
+
790
+ struct smb2_ace {
791
+ struct smb2_ace *next;
792
+
793
+ uint8_t ace_type;
794
+ uint8_t ace_flags;
795
+ uint16_t ace_size;
796
+
797
+ /* Which fields are valid depends on the ace type */
798
+ uint32_t mask;
799
+ uint32_t flags;
800
+ struct smb2_sid *sid;
801
+ uint8_t object_type[SMB2_OBJECT_TYPE_SIZE];
802
+ uint8_t inherited_object_type[SMB2_OBJECT_TYPE_SIZE];
803
+
804
+ /* ApplicationData/AttributeData. Used by
805
+ * SMB2_ACCESS_ALLOWED_CALLBACK_ACE_TYPE,
806
+ * SMB2_DENIED_ALLOWED_CALLBACK_ACE_TYPE,
807
+ * SMB2_SYSTEM_RESOURCE_ATTRIBUTE_ACE_TYPE
808
+ */
809
+ size_t ad_len;
810
+ char *ad_data;
811
+
812
+ /* raw blob, used for unknown ACE types */
813
+ size_t raw_len;
814
+ char *raw_data;
815
+ };
816
+
817
+ /*
818
+ * ACL
819
+ */
820
+ #define SMB2_ACL_REVISION 0x02
821
+ #define SMB2_ACL_REVISION_DS 0x04
822
+
823
+ struct smb2_acl {
824
+ uint8_t revision;
825
+ uint16_t ace_count;
826
+ struct smb2_ace *aces;
827
+ };
828
+
829
+ /*
830
+ * SECURITY_DESCRIPTOR
831
+ */
832
+ /* Security descriptor control flags */
833
+ #define SMB2_SD_CONTROL_OD 0x0001
834
+ #define SMB2_SD_CONTROL_GD 0x0002
835
+ #define SMB2_SD_CONTROL_DP 0x0004
836
+ #define SMB2_SD_CONTROL_DD 0x0008
837
+ #define SMB2_SD_CONTROL_SP 0x0010
838
+ #define SMB2_SD_CONTROL_SD 0x0020
839
+ #define SMB2_SD_CONTROL_SS 0x0040
840
+ #define SMB2_SD_CONTROL_DT 0x0080
841
+ #define SMB2_SD_CONTROL_DC 0x0100
842
+ #define SMB2_SD_CONTROL_SC 0x0200
843
+ #define SMB2_SD_CONTROL_DI 0x0400
844
+ #define SMB2_SD_CONTROL_SI 0x0800
845
+ #define SMB2_SD_CONTROL_PD 0x1000
846
+ #define SMB2_SD_CONTROL_PS 0x2000
847
+ #define SMB2_SD_CONTROL_RM 0x4000
848
+ #define SMB2_SD_CONTROL_SR 0x8000
849
+
850
+ struct smb2_security_descriptor {
851
+ uint8_t revision;
852
+ uint16_t control;
853
+ struct smb2_sid *owner;
854
+ struct smb2_sid *group;
855
+ struct smb2_acl *dacl;
856
+ };
857
+
858
+ struct smb2_file_fs_volume_info {
859
+ struct smb2_timeval creation_time;
860
+ uint32_t volume_serial_number;
861
+ uint32_t volume_label_length;
862
+ uint8_t supports_objects;
863
+ uint8_t reserved;
864
+ const uint8_t *volume_label;
865
+ };
866
+
867
+ struct smb2_file_fs_size_info {
868
+ uint64_t total_allocation_units;
869
+ uint64_t available_allocation_units;
870
+ uint32_t sectors_per_allocation_unit;
871
+ uint32_t bytes_per_sector;
872
+ };
873
+
874
+ struct smb2_file_fs_attribute_info {
875
+ uint32_t filesystem_attributes;
876
+ uint32_t maximum_component_name_length;
877
+ uint32_t filesystem_name_length;
878
+ const uint8_t *filesystem_name;
879
+ };
880
+
881
+ /* Device type */
882
+ #define FILE_DEVICE_CD_ROM 0x00000002
883
+ #define FILE_DEVICE_DISK 0x00000007
884
+
885
+ /* Characteristics */
886
+ #define FILE_REMOVABLE_MEDIA 0x00000001
887
+ #define FILE_READ_ONLY_DEVICE 0x00000002
888
+ #define FILE_FLOPPY_DISKETTE 0x00000004
889
+ #define FILE_WRITE_ONCE_MEDIA 0x00000008
890
+ #define FILE_REMOTE_DEVICE 0x00000010
891
+ #define FILE_DEVICE_IS_MOUNTED 0x00000020
892
+ #define FILE_VIRTUAL_VOLUME 0x00000040
893
+ #define FILE_DEVICE_SECURE_OPEN 0x00000100
894
+ #define FILE_CHARACTERISTIC_TS_DEVICE 0x00001000
895
+ #define FILE_CHARACTERISTIC_WEBDAV_DEVICE 0x00002000
896
+ #define FILE_DEVICE_ALLOW_APPCONTAINER_TRAVERSAL 0x00020000
897
+ #define FILE_PORTABLE_DEVICE 0x00040000
898
+
899
+ struct smb2_file_fs_device_info {
900
+ uint32_t device_type;
901
+ uint32_t characteristics;
902
+ };
903
+
904
+ /* File System Control Flags */
905
+ #define FILE_VC_QUOTA_TRACK 0x00000001
906
+ #define FILE_VC_QUOTA_ENFORCE 0x00000002
907
+ #define FILE_VC_CONTENT_INDEX_DISABLED 0x00000008
908
+ #define FILE_VC_LOG_QUOTA_THRESHOLD 0x00000010
909
+ #define FILE_VC_LOG_QUOTA_LIMIT 0x00000020
910
+ #define FILE_VC_LOG_VOLUME_THRESHOLD 0x00000040
911
+ #define FILE_VC_LOG_VOLUME_LIMIT 0x00000080
912
+ #define FILE_VC_QUOTAS_INCOMPLETE 0x00000100
913
+ #define FILE_VC_QUOTAS_REBUILDING 0x00000200
914
+
915
+ struct smb2_file_fs_control_info {
916
+ uint64_t free_space_start_filtering;
917
+ uint64_t free_space_threshold;
918
+ uint64_t free_space_stop_filtering;
919
+ uint64_t default_quota_threshold;
920
+ uint64_t default_quota_limit;
921
+ uint32_t file_system_control_flags;
922
+ };
923
+
924
+ struct smb2_file_fs_full_size_info {
925
+ uint64_t total_allocation_units;
926
+ uint64_t caller_available_allocation_units;
927
+ uint64_t actual_available_allocation_units;
928
+ uint32_t sectors_per_allocation_unit;
929
+ uint32_t bytes_per_sector;
930
+ };
931
+
932
+ struct smb2_file_fs_object_id_info {
933
+ smb2_guid object_id;
934
+ uint8_t extended_info[48];
935
+ };
936
+
937
+ /* Flags */
938
+ #define SSINFO_FLAGS_ALIGNED_DEVICE 0x00000001
939
+ #define SSINFO_FLAGS_PARTITION_ALIGNED_ON_DEVICE 0x00000002
940
+ #define SSINFO_FLAGS_NO_SEEK_PENALTY 0x00000004
941
+ #define SSINFO_FLAGS_TRIM_ENABLED 0x00000008
942
+
943
+ struct smb2_file_fs_sector_size_info {
944
+ uint32_t logical_bytes_per_sector;
945
+ uint32_t physical_bytes_per_sector_for_atomicity;
946
+ uint32_t physical_bytes_per_sector_for_performance;
947
+ uint32_t file_system_effective_physical_bytes_per_sector_for_atomicity;
948
+ uint32_t flags;
949
+ uint32_t byte_offset_for_sector_alignment;
950
+ uint32_t byte_offset_for_partition_alignment;
951
+ };
952
+
953
+ #define SMB2_QUERY_INFO_REPLY_SIZE 9
954
+
955
+ struct smb2_query_info_reply {
956
+ uint16_t output_buffer_offset;
957
+ uint32_t output_buffer_length;
958
+ void *output_buffer;
959
+ };
960
+
961
+ #define SMB2_IOCTL_REQUEST_SIZE 57
962
+
963
+ /* CtlCode */
964
+ #define SMB2_FSCTL_DFS_GET_REFERRALS 0x00060194
965
+ #define SMB2_FSCTL_PIPE_PEEK 0x0011400C
966
+ #define SMB2_FSCTL_PIPE_WAIT 0x00110018
967
+ #define SMB2_FSCTL_PIPE_TRANSCEIVE 0x0011C017
968
+ #define SMB2_FSCTL_SRV_COPYCHUNK 0x001440F2
969
+ #define SMB2_FSCTL_SRV_ENUMERATE_SNAPSHOTS 0x00144064
970
+ #define SMB2_FSCTL_SRV_REQUEST_RESUME_KEY 0x00140078
971
+ #define SMB2_FSCTL_SRV_READ_HASH 0x001441bb
972
+ #define SMB2_FSCTL_SRV_COPYCHUNK_WRITE 0x001480F2
973
+ #define SMB2_FSCTL_LMR_REQUEST_RESILIENCY 0x001401D4
974
+ #define SMB2_FSCTL_QUERY_NETWORK_INTERFACE_INFO 0x001401FC
975
+ #define SMB2_FSCTL_SET_REPARSE_POINT 0x000900A4
976
+ #define SMB2_FSCTL_GET_REPARSE_POINT 0X000900A8
977
+ #define SMB2_FSCTL_DFS_GET_REFERRALS_EX 0x000601B0
978
+ #define SMB2_FSCTL_FILE_LEVEL_TRIM 0x00098208
979
+ #define SMB2_FSCTL_VALIDATE_NEGOTIATE_INFO 0x00140204
980
+
981
+ /* Flags */
982
+ #define SMB2_0_IOCTL_IS_FSCTL 0x00000001
983
+
984
+ #define SMB2_SYMLINK_FLAG_RELATIVE 0x00000001
985
+ struct smb2_symlink_reparse_buffer {
986
+ uint32_t flags;
987
+ char *subname;
988
+ char *printname;
989
+ };
990
+
991
+ #define SMB2_REPARSE_TAG_SYMLINK 0xa000000c
992
+ /*
993
+ * Reparse_data_buffer
994
+ */
995
+ struct smb2_reparse_data_buffer {
996
+ uint32_t reparse_tag;
997
+ uint16_t reparse_data_length;
998
+ union {
999
+ struct smb2_symlink_reparse_buffer symlink;
1000
+ };
1001
+ };
1002
+
1003
+ struct smb2_ioctl_request {
1004
+ uint32_t ctl_code;
1005
+ smb2_file_id file_id;
1006
+ uint32_t input_offset;
1007
+ uint32_t input_count;
1008
+ uint32_t max_input_response;
1009
+ uint32_t output_offset;
1010
+ uint32_t output_count;
1011
+ uint32_t max_output_response;
1012
+ uint32_t flags;
1013
+ void *input;
1014
+ };
1015
+
1016
+ #define SMB2_IOCTL_REPLY_SIZE 49
1017
+
1018
+ struct smb2_ioctl_reply {
1019
+ uint32_t ctl_code;
1020
+ smb2_file_id file_id;
1021
+ uint32_t input_offset;
1022
+ uint32_t input_count;
1023
+ uint32_t output_offset;
1024
+ uint32_t output_count;
1025
+ uint32_t flags;
1026
+ void *output;
1027
+ };
1028
+
1029
+ #define SMB2_IOCTL_VALIDIATE_NEGOTIATE_INFO_SIZE 24
1030
+
1031
+ struct smb2_ioctl_validate_negotiate_info {
1032
+ uint32_t capabilities;
1033
+ uint8_t guid[16];
1034
+ uint16_t security_mode;
1035
+ uint16_t dialect;
1036
+ };
1037
+
1038
+ #define SMB2_CHANGE_NOTIFY_FILE_NOTIFY_CHANGE_FILE_NAME 0x00000001
1039
+ #define SMB2_CHANGE_NOTIFY_FILE_NOTIFY_CHANGE_DIR_NAME 0x00000002
1040
+ #define SMB2_CHANGE_NOTIFY_FILE_NOTIFY_CHANGE_ATTRIBUTES 0x00000004
1041
+ #define SMB2_CHANGE_NOTIFY_FILE_NOTIFY_CHANGE_SIZE 0x00000008
1042
+ #define SMB2_CHANGE_NOTIFY_FILE_NOTIFY_CHANGE_LAST_WRITE 0x00000010
1043
+ #define SMB2_CHANGE_NOTIFY_FILE_NOTIFY_CHANGE_LAST_ACCESS 0x00000020
1044
+ #define SMB2_CHANGE_NOTIFY_FILE_NOTIFY_CHANGE_CREATION 0x00000040
1045
+ #define SMB2_CHANGE_NOTIFY_FILE_NOTIFY_CHANGE_EA 0x00000080
1046
+ #define SMB2_CHANGE_NOTIFY_FILE_NOTIFY_CHANGE_SECURITY 0x00000100
1047
+ #define SMB2_CHANGE_NOTIFY_FILE_NOTIFY_CHANGE_STREAM_NAME 0x00000200
1048
+ #define SMB2_CHANGE_NOTIFY_FILE_NOTIFY_CHANGE_STREAM_SIZE 0x00000400
1049
+ #define SMB2_CHANGE_NOTIFY_FILE_NOTIFY_CHANGE_STREAM_WRITE 0x00000800
1050
+
1051
+ #define SMB2_CHANGE_NOTIFY_WATCH_TREE 0x0001
1052
+
1053
+ #define SMB2_CHANGE_NOTIFY_REQUEST_SIZE 32
1054
+
1055
+ #define SMB2_NOTIFY_CHANGE_FILE_ACTION_ADDED 0x0001
1056
+ #define SMB2_NOTIFY_CHANGE_FILE_ACTION_REMOVED 0x0002
1057
+ #define SMB2_NOTIFY_CHANGE_FILE_ACTION_MODIFIED 0x0003
1058
+ #define SMB2_NOTIFY_CHANGE_FILE_ACTION_RENAMED_OLD_NAME 0x0004
1059
+ #define SMB2_NOTIFY_CHANGE_FILE_ACTION_RENAMED_NEW_NAME 0x0005
1060
+ #define SMB2_NOTIFY_CHANGE_FILE_ACTION_ADDED_STREAM 0x0006
1061
+ #define SMB2_NOTIFY_CHANGE_FILE_ACTION_REMOVED_STREAM 0x0007
1062
+ #define SMB2_NOTIFY_CHANGE_FILE_ACTION_MODIFIED_STREAM 0x0008
1063
+
1064
+ struct smb2_change_notify_request {
1065
+ uint16_t flags;
1066
+ uint32_t output_buffer_length;
1067
+ smb2_file_id file_id;
1068
+ uint32_t completion_filter;
1069
+ };
1070
+
1071
+ #define SMB2_CHANGE_NOTIFY_REPLY_SIZE 9
1072
+
1073
+ struct smb2_change_notify_reply {
1074
+ uint16_t output_buffer_offset;
1075
+ uint32_t output_buffer_length;
1076
+ uint8_t *output;
1077
+ };
1078
+
1079
+ struct smb2_file_notify_change_information {
1080
+ uint32_t action;
1081
+ const char *name;
1082
+ struct smb2_file_notify_change_information *next;
1083
+ };
1084
+
1085
+ int
1086
+ smb2_decode_filenotifychangeinformation(
1087
+ struct smb2_context *smb2,
1088
+ struct smb2_file_notify_change_information *fnc,
1089
+ struct smb2_iovec *vec,
1090
+ uint32_t next_entry_offset);
1091
+
1092
+ #define SMB2_OPLOCK_LEVEL_NONE 0x00
1093
+ #define SMB2_OPLOCK_LEVEL_II 0x01
1094
+ #define SMB2_OPLOCK_LEVEL_EXCLUSIVE 0x08
1095
+
1096
+ #define SMB2_OPLOCK_BREAK_NOTIFICATION_SIZE 24
1097
+
1098
+ struct smb2_oplock_break_notification {
1099
+ uint8_t oplock_level;
1100
+ smb2_file_id file_id;
1101
+ };
1102
+
1103
+ #define SMB2_OPLOCK_BREAK_ACKNOWLEDGE_SIZE 24
1104
+
1105
+ struct smb2_oplock_break_acknowledgement {
1106
+ uint8_t oplock_level;
1107
+ smb2_file_id file_id;
1108
+ };
1109
+
1110
+ #define SMB2_OPLOCK_BREAK_REPLY_SIZE 24
1111
+
1112
+ struct smb2_oplock_break_reply {
1113
+ uint8_t oplock_level;
1114
+ smb2_file_id file_id;
1115
+ };
1116
+
1117
+ #define SMB2_LEASE_NONE 0x00
1118
+ #define SMB2_LEASE_READ_CACHING 0x01
1119
+ #define SMB2_LEASE_HANDLE_CACHING 0x02
1120
+ #define SMB2_LEASE_WRITE_CACHING 0x04
1121
+
1122
+ #define SMB2_BREAK_TYPE_OPLOCK_NOTIFICATION 0x01
1123
+ #define SMB2_BREAK_TYPE_OPLOCK_RESPONSE 0x02
1124
+ #define SMB2_BREAK_TYPE_OPLOCK_ACKNOWLEDGE 0x03
1125
+
1126
+ #define SMB2_BREAK_TYPE_LEASE_NOTIFICATION 0x04
1127
+ #define SMB2_BREAK_TYPE_LEASE_RESPONSE 0x05
1128
+ #define SMB2_BREAK_TYPE_LEASE_ACKNOWLEDGE 0x06
1129
+
1130
+ #define SMB2_LEASE_BREAK_NOTIFICATION_SIZE 44
1131
+
1132
+ struct smb2_lease_break_notification {
1133
+ uint16_t new_epoch;
1134
+ uint32_t flags;
1135
+ smb2_lease_key lease_key;
1136
+ uint32_t current_lease_state;
1137
+ uint32_t new_lease_state;
1138
+ uint32_t break_reason;
1139
+ uint32_t access_mask_hint;
1140
+ uint32_t share_mask_hint;
1141
+ };
1142
+
1143
+ #define SMB2_LEASE_BREAK_ACKNOWLEDGE_SIZE 36
1144
+
1145
+ struct smb2_lease_break_acknowledgement {
1146
+ uint32_t flags;
1147
+ smb2_lease_key lease_key;
1148
+ uint32_t lease_state;
1149
+ uint64_t lease_duration;
1150
+ };
1151
+
1152
+ #define SMB2_LEASE_BREAK_REPLY_SIZE 36
1153
+
1154
+ struct smb2_lease_break_reply {
1155
+ uint32_t flags;
1156
+ smb2_lease_key lease_key;
1157
+ uint32_t lease_state;
1158
+ uint64_t lease_duration;
1159
+ };
1160
+
1161
+ /* note that for oplocks, notifications (request) and responses (reply)
1162
+ * come from the server, while acknowledgements come from the client
1163
+ */
1164
+ struct smb2_oplock_or_lease_break_reply {
1165
+ uint16_t struct_size;
1166
+ int break_type;
1167
+ union {
1168
+ struct smb2_oplock_break_notification oplock;
1169
+ struct smb2_oplock_break_reply oplockrep;
1170
+ struct smb2_lease_break_notification lease;
1171
+ struct smb2_lease_break_reply leaserep;
1172
+ }
1173
+ lock;
1174
+ };
1175
+
1176
+ struct smb2_oplock_or_lease_break_request {
1177
+ uint16_t struct_size;
1178
+ int break_type;
1179
+ union {
1180
+ struct smb2_oplock_break_acknowledgement oplock;
1181
+ struct smb2_lease_break_acknowledgement lease;
1182
+ }
1183
+ lock;
1184
+ };
1185
+
1186
+ #define SMB2_WRITE_REQUEST_SIZE 49
1187
+
1188
+ #define SMB2_WRITEFLAG_WRITE_THROUGH 0x00000001
1189
+ #define SMB2_WRITEFLAG_WRITE_UNBUFFERED 0x00000002
1190
+
1191
+ struct smb2_write_request {
1192
+ uint16_t data_offset;
1193
+ uint32_t length;
1194
+ uint64_t offset;
1195
+ const uint8_t* buf;
1196
+ smb2_file_id file_id;
1197
+ uint32_t channel;
1198
+ uint32_t remaining_bytes;
1199
+ uint16_t write_channel_info_offset;
1200
+ uint16_t write_channel_info_length;
1201
+ uint8_t *write_channel_info;
1202
+ uint32_t flags;
1203
+ };
1204
+
1205
+ #define SMB2_WRITE_REPLY_SIZE 17
1206
+
1207
+ struct smb2_write_reply {
1208
+ uint32_t count;
1209
+ uint32_t remaining;
1210
+ };
1211
+
1212
+ #define SMB2_LOCK_ELEMENT_SIZE 24
1213
+
1214
+ struct smb2_lock_element {
1215
+ uint64_t offset;
1216
+ uint64_t length;
1217
+ uint32_t flags;
1218
+ uint32_t reserved;
1219
+ };
1220
+
1221
+ /* Note that this size includes 1 lock element */
1222
+ #define SMB2_LOCK_REQUEST_SIZE 48
1223
+
1224
+ struct smb2_lock_request {
1225
+ uint16_t lock_count;
1226
+ uint8_t lock_sequence_number;
1227
+ uint32_t lock_sequence_index;
1228
+ smb2_file_id file_id;
1229
+ struct smb2_lock_element *locks;
1230
+ };
1231
+
1232
+ #define SMB2_LOCK_REPLY_SIZE 4
1233
+
1234
+
1235
+ #define SMB2_ECHO_REQUEST_SIZE 4
1236
+ #define SMB2_ECHO_REPLY_SIZE 4
1237
+ #define SMB2_CANCEL_REQUEST_SIZE 4
1238
+
1239
+ #define SMB2_LOGOFF_REQUEST_SIZE 4
1240
+ #define SMB2_LOGOFF_REPLY_SIZE 4
1241
+
1242
+ #define SMB2_TREE_DISCONNECT_REQUEST_SIZE 4
1243
+ #define SMB2_TREE_DISCONNECT_REPLY_SIZE 4
1244
+
1245
+ #define SMB_ENCRYPTION_AES128_CCM 0x0001
1246
+
1247
+ #ifdef __cplusplus
1248
+ }
1249
+ #endif
1250
+
1251
+ #endif /* !_SMB2_H_ */