title: How to manipulate with magnetic tapes in C/C++?
body: <p>I need to do a few basic operations with magnetic tapes on our tape server:</p>
  
  <ul>
  <li>load tapes</li>
  <li>display statistics (equivalent to <code>mt stat</code> command in Linux)</li>
  <li>read/write data onto blocks of tapes</li>
  </ul>
  
  <p>I want to do perform these tasks via an API/library in C/C++ but I'm really struggling with finding instructions/tutorial for beginners.</p>
  
  <p>Can you somehow use <em>sg</em> driver, functions from <em>sg3_utils</em> or some toying with <code>ioctl()</code>?</p>