00001 #ifndef _DRMS_H
00002 #define _DRMS_H
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026 #include "jsoc.h"
00027 #include <arpa/inet.h>
00028 #include <libgen.h>
00029 #include <netdb.h>
00030 #include <netinet/in.h>
00031 #include <netinet/tcp.h>
00032 #include <openssl/sha.h>
00033 #include <pthread.h>
00034 #include <sys/socket.h>
00035 #include <sys/stat.h>
00036 #include <sys/wait.h>
00037 #include <termios.h>
00038 #include <zlib.h>
00039
00040 #include "timeio.h"
00041
00042
00043 #include "foundation.h"
00044
00045
00046 #include "db.h"
00047 #include "hcontainer.h"
00048 #include "xassert.h"
00049 #include "util.h"
00050 #include "byteswap.h"
00051 #include "timer.h"
00052 #include "ndim.h"
00053
00054
00055 #include "SUM.h"
00056
00057
00058
00059
00060 #include "drms_types.h"
00061 #include "drms_defs.h"
00062 #include "drms_env.h"
00063 #include "drms_series.h"
00064 #include "drms_keyword.h"
00065 #include "drms_link.h"
00066 #include "drms_record.h"
00067 #include "drms_segment.h"
00068 #include "drms_array.h"
00069 #include "drms_protocol.h"
00070 #include "drms_statuscodes.h"
00071 #include "drms_network.h"
00072 #include "drms_storageunit.h"
00073 #include "drms_server.h"
00074 #include "drms_binfile.h"
00075 #include "drms_parser.h"
00076 #include "drms_names.h"
00077 #include "drms_array.h"
00078 #include "drms_cmdparams.h"
00079
00080
00081
00082 static inline void drms_make_hashkey(char *hashkey, const char *name,
00083 long long num)
00084 {
00085
00086 char *tmp = strdup(name);
00087 strtolower(tmp);
00088 if (tmp)
00089 {
00090 sprintf(hashkey, "%s_%020lld", tmp, num);
00091 free(tmp);
00092 }
00093 else
00094 {
00095 fprintf(stderr, "drms_make_hashkey() - out of memory.\n");
00096 }
00097 }
00098
00099 static inline void drms_term()
00100 {
00101 base_term();
00102 drms_keyword_term();
00103 drms_protocol_term();
00104 drms_defs_term();
00105 drms_time_term();
00106 }
00107 #endif