/* szModuleName__ []  = "f:/r3/code/c/incl/nradutil.h" */
/* szLastVersion []   = "Version 0.5" */
/* szLastSave []      = "1994-07-12*13:58" */
/***********************************************************************
Abstract
nradutil.c - handling of utilitys for Nordrad pgm's

Change activity
1994-12-27      ARg  Removed DEBUG define
1994-01-21 1.00 BBN  Initial version by Bjorn Brodin, AU-System Communication AB.

Description
	Timer functions 

Program structure:

Return codes:         

***********************************************************************/
#ifndef NRADUTIL
#define NRADUTIL

#ifdef VAXC
#include <types.h>
#include <stdio.h>
#include <stdlib.h>
#include <errno.h>
#include <string.h>
#include <signal.h>
/* #include termio */
#include <in.h>
/* #include fcntl  */
#include <time.h>
#else
#include <sys/types.h>
#include <stdio.h>
#include <stdlib.h>
#include <errno.h>
#include <string.h>
#include <signal.h>
/* #include <termio.h>*/
#include <netinet/in.h>
#include <fcntl.h>
#include <sys/time.h>
#include <arpa/inet.h>   /* Needed on some machines */
#include <unistd.h>      /* Needed on some machines */

/* #include <sys/timers.h> */ /* As good as events.h */
#endif

#include "apitypes.h"

/****************************************************************************
*   Global variables
*****************************************************************************
*/

/* typedef  enum  boolean={FALSE,TRUE}; */
#ifndef FALSE
#define FALSE 0
#endif
#ifndef TRUE
#define TRUE  1
#endif

extern int     bTimeout;

#ifndef VAXC
#ifndef NOTIMERS
static	struct sigaction	sigalrm_action;
static	struct sigaction	sigalrm_sav_action;
static	time_t			itimerid;
#endif
#endif
/* static	int			(*intstat)(); */


/****************************************************************************
*   function declarations
*****************************************************************************
*/
/* static	 int	timeout_handler( int, int, struct sigcontext *); CED */
extern   INT32	 UtlStartTimeout ( INT32 timeout);
extern   INT32	 UtlCancelTimeout ( void );
extern   INT32	 UtlCancelTimeout ( void );
extern   void     UtlInitTimeoutHandler( void );
extern   INT32     UtlIntToNet(INT32 iLocalInt);
extern   INT32     UtlIntFromNet(INT32 iLocalInt);
void UtlInitErrMsgTab(void);
#endif 
