/* 
** PACS-WLL 2000 project, Prepaid System.
** 
** The module Copyright (C) 2000-2001 interWAVE Inc.
** Written completely by Zhang Shuzhong at iCRD January, 2001
**
** file name: dbsync.h
** CVS $Id: dbsync.h,v 1.2 2001/02/08 10:53:33 zhangsz Exp $
**
** Defination for Database Synchronization (dbsync.c).
*/

#ifndef DBSYNC__H
#define DBSYNC__H

#include "iptrans.h"

#define DS_PORT_NO		 4959   /* Prepaid service port */
#define DS_PORT_ID       DS_PORT_NO - PORT_BASE_NUM

#define DS_SHM_KEY       0x80000000
#define DS_SHM_PERM      0664
#define DS_MSG_TYPE      "D0"
#define DS_DBNAME_MAX_LEN    14
#define DS_SQLSCRIPT_MAX_LEN   MAX_CONTENT_LEN-DS_DBNAME_MAX_LEN-2

typedef struct _dbsync_msg {
	char        type[2];
	char        db_name[DS_DBNAME_MAX_LEN];
	char        sql_script[DS_SQLSCRIPT_MAX_LEN];
} _dbsync_msg;

typedef struct ds_shm {
	char            time_created[15];
} ds_shm;
	
#endif /* DBSYNC__H */
