#ifdef KERBEROS
#include <krb.h>
#endif KERBEROS

#define NAME_SIZE 64


#define VERSION_1 "01a\0"
#define VERSION VERSION_1
#define PG_SERVICE "page"
#ifdef KERBEROS
#define K_SERVICE "rcmd"
#define K_REALM "ATHENA.MIT.EDU"
#endif KERBEROS

/*
 * Request types
 */

#define LOOKUP_REQ     1
#define ADD_REQ        2
#define CHANGE_REQ     3
#define DELETE_REQ     4
#define PAGE_REQ       5
#define ADD_ACL_REQ    6
#define DEL_ACL_REQ    7
#define ACTIVATE_REQ   8
#define DEACTIVATE_REQ 9
#define SETMSG_REQ     10

/*
 * Request 
 */

typedef struct _REQUEST
{
  char  version[4];
  int   request_type;
  char  *client;
  char  *name;
  
#ifdef KERBEROS
  KTEXT kdata;
#endif KERBEROS
} REQUEST;


/*
 * generic responses
 */

#define SUCCESS 0
#define ERROR  -1
#define YES     1
#define NO      0
#define OK      1


/*
 * server resposne codes
 */

#define NOT_FOUND   100
#define NO_ACCESS   101
#define NO_CARRIER  102
#define EXISTS      103
#define TIMED_OUT   104
#define BAD_FORMAT  105
#define BAD_VERSION 106
#define BAD_REQUEST 107
#define INACTIVE    108
#define EOPEN       109
#define INCOMING    110
#define ECALL       111
#define SEND        112

#define ALPHANUMERIC 1
#define NUMERIC      2
#define POINTER      3

#define PG_SAFE   1
#define PG_UNSAFE 2

typedef struct _DB
{
  char  version[4];
  short active;
  short type;
  char  *name;
  char  *number;
  char  *pagerid;
} DB;

