00001
00002
00003
00004
00005
00006
00007
00008
00009
00010 #include "db.h"
00011
00012 typedef struct DRMSSiteInfo_struct {
00013 unsigned short site_code;
00014
00015 char *site_name;
00016
00017 char *location;
00018
00019 char *contact;
00020
00021
00022 char *notify;
00023
00024 char *data_URL;
00025
00026
00027 char *query_URL;
00028
00029 char *request_URL;
00030
00031 char *SUMS_URL;
00032
00033
00034
00035 char *owner;
00036
00037
00038 char *db_name;
00039
00040 char *db_server;
00041
00042 char *namelist;
00043
00044
00045 } DRMSSiteInfo_t;
00046
00047 #define DEFAULT_SITE_TABLE_0 ("jsoc.drms_sites")
00048 #define DEFAULT_SITE_TABLE_1 ("drms.sites")
00049 #define DRMSSITE_MAXQUERYLEN 8192
00050
00051 extern short drmssite_code_from_sunum (unsigned long long sunum);
00052
00053 #ifdef DEFS_CLIENT
00054 extern short drmssite_client_info_from_sunum (unsigned long long sunum,
00055 int sockfd, DRMSSiteInfo_t **info);
00056
00057 extern short drmssite_client_getlocalinfo(int sockfd, DRMSSiteInfo_t **info);
00058 #else
00059 extern short drmssite_server_info_from_sunum (unsigned long long sunum,
00060 DB_Handle_t *dbin, DRMSSiteInfo_t **info);
00061
00062 extern short drmssite_server_getlocalinfo(DB_Handle_t *dbin, DRMSSiteInfo_t **info);
00063 #endif
00064
00065 extern int drmssite_sunum_is_local (unsigned long long sunum);
00066
00067 extern void drmssite_freeinfo(DRMSSiteInfo_t **info);
00068
00069 #ifndef DEFS_CLIENT
00070 extern int drmssite_server_siteinfo(int sockfd, DB_Handle_t *db_handle);
00071
00072 extern int drmssite_server_localsiteinfo(int sockfd, DB_Handle_t *db_handle);
00073 #endif
00074
00075
00076
00077
00078
00079