/******************************************************/
/* Copyright (C) 2008 Arch Rock Corporation           */
/* License Agreement: refer to LICENSE.txt            */
/*                                                    */
/******************************************************/

#ifndef _ERRNO_H
#define _ERRNO_H    1

#include<platform.h>
extern int16_t errno;

/*! \brief Error number enumerations. 
 */
enum ErrnoEnum{
  /*! Generic indication of a failed completion of a call or operation.  */
  FAIL           = -1,           
  /*! Generic indication of a successful completion of a call or operation. */
  SUCCESS        = 0,
  /*! Parameter passed in was too big. */
  ESIZE          = 2,
  /*! Operation cancelled by a call. */
  ECANCEL        = 3,
  /*! Subsystem is not active */
  EOFF           = 4,
  /*! The underlying system is busy; retry later */
  EBUSY          = 5,           
  /*! An invalid parameter was passed. */
  EINVAL         = 6,           
  /*! A rare and transient failure: can retry */
  ERETRY         = 7,           
  /*! Reservation required before usage */
  ERESERVE       = 8,
  /*! Destination is unreachable */
  ENETUNREACH    = 9,           
  /*! Global time is not synchronized */
  ENOTTIMESYNC   = 10,          
  /*! Operation timeouted */
  ETIMEOUT       = 11,          
  /*! Descriptor limit has been reached. */
  ENFILE         = 12,
  /*! Socket is not connected. */
  ENOTCONN       = 13,
};

#endif
