TransWaitNamedPipe.cs 2.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. // This code is derived from jcifs smb client library <jcifs at samba dot org>
  2. // Ported by J. Arturo <webmaster at komodosoft dot net>
  3. //
  4. // This library is free software; you can redistribute it and/or
  5. // modify it under the terms of the GNU Lesser General Public
  6. // License as published by the Free Software Foundation; either
  7. // version 2.1 of the License, or (at your option) any later version.
  8. //
  9. // This library is distributed in the hope that it will be useful,
  10. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  12. // Lesser General Public License for more details.
  13. //
  14. // You should have received a copy of the GNU Lesser General Public
  15. // License along with this library; if not, write to the Free Software
  16. // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
  17. namespace SharpCifs.Smb
  18. {
  19. internal class TransWaitNamedPipe : SmbComTransaction
  20. {
  21. internal TransWaitNamedPipe(string pipeName)
  22. {
  23. Name = pipeName;
  24. Command = SmbComTransaction;
  25. SubCommand = TransWaitNamedPipe;
  26. Timeout = unchecked((int)(0xFFFFFFFF));
  27. MaxParameterCount = 0;
  28. MaxDataCount = 0;
  29. MaxSetupCount = unchecked(unchecked(0x00));
  30. SetupCount = 2;
  31. }
  32. internal override int WriteSetupWireFormat(byte[] dst, int dstIndex)
  33. {
  34. dst[dstIndex++] = SubCommand;
  35. dst[dstIndex++] = unchecked(unchecked(0x00));
  36. dst[dstIndex++] = unchecked(unchecked(0x00));
  37. // no FID
  38. dst[dstIndex++] = unchecked(unchecked(0x00));
  39. return 4;
  40. }
  41. internal override int ReadSetupWireFormat(byte[] buffer, int bufferIndex, int len)
  42. {
  43. return 0;
  44. }
  45. internal override int WriteParametersWireFormat(byte[] dst, int dstIndex)
  46. {
  47. return 0;
  48. }
  49. internal override int WriteDataWireFormat(byte[] dst, int dstIndex)
  50. {
  51. return 0;
  52. }
  53. internal override int ReadParametersWireFormat(byte[] buffer,
  54. int bufferIndex,
  55. int len)
  56. {
  57. return 0;
  58. }
  59. internal override int ReadDataWireFormat(byte[] buffer, int bufferIndex, int len)
  60. {
  61. return 0;
  62. }
  63. public override string ToString()
  64. {
  65. return "TransWaitNamedPipe["
  66. + base.ToString()
  67. + ",pipeName=" + Name + "]";
  68. }
  69. }
  70. }