docs: @Override
      protected int writeBytesWireFormat ( byte[] dst, int dstIndex ) {
          int start = dstIndex;
          SMBUtil.writeInt2(36, dst, dstIndex);
          SMBUtil.writeInt2(this.dialects.length, dst, dstIndex + 2);
          dstIndex += 4;
  
          SMBUtil.writeInt2(this.securityMode, dst, dstIndex);
          SMBUtil.writeInt2(0, dst, dstIndex + 2); // Reserved
          dstIndex += 4;
  
          SMBUtil.writeInt4(this.capabilities, dst, dstIndex);
          dstIndex += 4;
  
          System.arraycopy(this.clientGuid, 0, dst, dstIndex, 16);
          dstIndex += 16;
  
          // if SMB 3.11 support negotiateContextOffset/negotiateContextCount
          int negotitateContextOffsetOffset = 0;
          if ( this.negotiateContexts == null || this.negotiateContexts.length == 0 ) {
              SMBUtil.writeInt8(0, dst, dstIndex);
          }
          else {
              negotitateContextOffsetOffset = dstIndex;
              SMBUtil.writeInt2(this.negotiateContexts.length, dst, dstIndex + 4);
              SMBUtil.writeInt2(0, dst, dstIndex + 6);
          }
          dstIndex += 8;
  
          for ( int dialect : this.dialects ) {
              SMBUtil.writeInt2(dialect, dst, dstIndex);
              dstIndex += 2;
          }
  
          dstIndex += pad8(dstIndex);
  
          if ( this.negotiateContexts != null && this.negotiateContexts.length != 0 ) {
              SMBUtil.writeInt4(dstIndex - getHeaderStart(), dst, negotitateContextOffsetOffset);
              for ( NegotiateContextRequest nc : this.negotiateContexts ) {
                  SMBUtil.writeInt2(nc.getContextType(), dst, dstIndex);
                  int lenOffset = dstIndex + 2;
                  dstIndex += 4;
                  SMBUtil.writeInt4(0, dst, dstIndex);
                  dstIndex += 4; // Reserved
                  int dataLen = size8(nc.encode(dst, dstIndex));
                  SMBUtil.writeInt2(dataLen, dst, lenOffset);
                  dstIndex += dataLen;
              }
          }
          return dstIndex - start;
      }