/*
 * Please do not edit this file.
 * It was generated using rpcgen.
 */

#ifndef _NISDB_PRIV_H_RPCGEN
#define _NISDB_PRIV_H_RPCGEN

#include <rpc/rpc.h>


#ifdef __cplusplus
extern "C" {
#endif

/* We store the data in XDR form in the database. So we could
   generate the most important functions with help of rpcgen. */
/* Versionsnumber: */
#define XDB_VERSION 0
#define XDB_VER_STRING "XDB Version 0"
/* Which xdb (XDR Database) */

enum xdb_type {
	XDB_FILE = 0,
	XDB_LOG = 1,
};
typedef enum xdb_type xdb_type;
/* This is the header for all database files. */

struct xdb_header {
	char *identifier;
	uint32_t vers;
	bool_t log_present;
	xdb_type type;
	uint32_t header_size;
};
typedef struct xdb_header xdb_header;
/* What should we do with the log entry ? Add or delete. */

enum xdb_logaction {
	LOG_ADD = 0,
	LOG_DELETE = 1,
	LOG_IGNORE = 2,
};
typedef enum xdb_logaction xdb_logaction;

struct xdb_logentry {
	xdb_logaction action;
	uint32_t hashkey;
	char *table_name;
	char *table_path;
};
typedef struct xdb_logentry xdb_logentry;

/* the xdr functions */

#if defined(__STDC__) || defined(__cplusplus)
extern  bool_t xdr_xdb_type (XDR *, xdb_type*);
extern  bool_t xdr_xdb_header (XDR *, xdb_header*);
extern  bool_t xdr_xdb_logaction (XDR *, xdb_logaction*);
extern  bool_t xdr_xdb_logentry (XDR *, xdb_logentry*);

#else /* K&R C */
extern bool_t xdr_xdb_type ();
extern bool_t xdr_xdb_header ();
extern bool_t xdr_xdb_logaction ();
extern bool_t xdr_xdb_logentry ();

#endif /* K&R C */

#ifdef __cplusplus
}
#endif

#endif /* !_NISDB_PRIV_H_RPCGEN */
