nbd_unlocked_get_protocol (struct nbd_handle *h)
{
  /* I believe that if we reach the Connected or Closed permitted
   * states, then the state machine must have set h->protocol.  So if
   * this assertion is hit then it indicates a bug in libnbd.
   */
  assert (h->protocol);

  return h->protocol;
}
nbd_unlocked_get_protocol (struct nbd_handle *h)
{
   
  assert (h->protocol);

  return h->protocol;
}