00001 #ifndef __SUM_RPC_H
00002 #define __SUM_RPC_H
00003
00004
00005
00006
00007
00008 #include <SUM.h>
00009 #include <rpc/rpc.h>
00010 #include <soi_key.h>
00011 #if defined(SUMS_TAPE_AVAILABLE) && SUMS_TAPE_AVAILABLE
00012 #include <tape.h>
00013 #endif
00014 #include <sum_info.h>
00015
00016
00017
00018 #if defined(SUMS_USEMTSUMS) && SUMS_USEMTSUMS
00019
00020 #define MAX_MTSUMS_NSUS 32768
00021 #endif
00022
00023 #define OFFSITEDIR "/dds/socdc"
00024 #define MAX_PART 1024
00025 #define MAXSUMSETS 4
00026 #define MAXSUMOPEN 16
00027 #define MAXSUMREQCNT 512
00028
00029
00030 #define MAX_STR 256
00031 #define MAXSTRING 4096
00032 #define SUMARRAYSZ MAXSUMREQCNT
00033 #define MAXSUNUMARRAY 65536
00034 #define RESPWAIT 30
00035 #define RPCMSG 2
00036 #define TIMEOUTMSG 3
00037 #define ERRMESS 4
00038 #define ERRMSG 4
00039
00040 #define JSOC 0
00041 #define LKHD 1
00042
00043
00044 #define DARW 1
00045 #define DADP 2
00046
00047 #define DAAP 4
00048 #define DARO 8
00049 #define DAPERM 16
00050 #define DASAP 32
00051
00052 #define DAAEDDP 32
00053 #define DAAPERM 64
00054 #define DAADP 128
00055
00056 #define DADMVA 256
00057 #define DADMVC 512
00058 #define DADPDELSU 1024
00059
00060
00061
00062
00063 #ifdef _LP64
00064
00065
00066
00067
00068
00069
00070
00071
00072
00073
00074
00075
00076
00077
00078
00079
00080
00081
00082
00083
00084
00085
00086 #endif
00087
00088 #ifdef __APPLE__
00089 #define xdr_uint_t xdr_u_int_t
00090 #define xdr_uint16_t xdr_u_int16_t
00091 #define xdr_uint32_t xdr_u_int32_t
00092 #define xdr_uint64_t xdr_u_int64_t
00093 #endif
00094
00095 typedef char *nametype;
00096 bool_t xdr_nametype(XDR *xdr, nametype *objp);
00097
00098 struct keyseg {
00099 nametype name;
00100 int key_type;
00101 union {
00102 nametype val_str;
00103 char *val_byte;
00104 u_char *val_ubyte;
00105 short *val_short;
00106 u_short *val_ushort;
00107 int *val_int;
00108 u_int *val_uint;
00109 long *val_long;
00110 u_long *val_ulong;
00111 uint32_t *val_uint32;
00112 uint64_t *val_uint64;
00113 float *val_float;
00114 double *val_double;
00115 FILE *val_FILE;
00116 TIME *val_time;
00117 } keyseg_u;
00118 };
00119 typedef struct keyseg keyseg;
00120 bool_t xdr_keyseg(XDR *xdrs, keyseg *objp);
00121
00122
00123 struct Rkey {
00124 struct Rkey *next;
00125 keyseg key_segment;
00126 };
00127 typedef struct Rkey Rkey;
00128 bool_t xdr_Rkey(XDR *xdrs, Rkey *objp);
00129
00130
00131 struct Sunumarray {
00132 int reqcnt;
00133 int mode;
00134 int tdays;
00135 int reqcode;
00136 uint64_t uid;
00137 char *username;
00138 char *machinetype;
00139 uint64_t *sunums;
00140 };
00141 typedef struct Sunumarray Sunumarray;
00142 bool_t xdr_Sunumarray(XDR *xdrs, Sunumarray *objp);
00143
00144
00145 struct Sinfoarray {
00146 int reqcnt;
00147 int reqcode;
00148 uint64_t uid;
00149 SUM_info_t *sinfo;
00150 };
00151 typedef struct Sinfoarray Sinfoarray;
00152 bool_t xdr_Sinfoarray(XDR *xdrs, Sinfoarray *objp);
00153 bool_t xdr_sum_info_t(XDR *xdrs, SUM_info_t *objp);
00154
00155
00156
00157
00158 #define SUMALLOC ((uint32_t)0x200005e7)
00159 #define SUMALLOCV ((uint32_t)1)
00160 #define SUMGET ((uint32_t)0x200005e8)
00161 #define SUMGETV ((uint32_t)1)
00162 #define SUMPUT ((uint32_t)0x200005e9)
00163 #define SUMPUTV ((uint32_t)1)
00164 #define SUMINFO ((uint32_t)0x200005ea)
00165 #define SUMINFOV ((uint32_t)1)
00166 #define SUMDELSER ((uint32_t)0x200005eb)
00167 #define SUMDELSERV ((uint32_t)1)
00168 #define SUMINFO1 ((uint32_t)0x200005ec)
00169 #define SUMINFO2 ((uint32_t)0x200005ed)
00170 #define SUMPUT1 ((uint32_t)0x200005ee)
00171 #define SUMPUT2 ((uint32_t)0x200005ef)
00172 #define SUMGET1 ((uint32_t)0x200005f0)
00173 #define SUMGET2 ((uint32_t)0x200005f1)
00174 #define SUMALLOC1 ((uint32_t)0x200005f2)
00175 #define SUMALLOC2 ((uint32_t)0x200005f3)
00176 #define SUMOPEN ((uint32_t)0x200005f4)
00177 #define SUMOPENV ((uint32_t)1)
00178 #define SUMOPEN1 ((uint32_t)0x200005f5)
00179 #define SUMOPEN2 ((uint32_t)0x200005f6)
00180 #define SUMOPEN3 ((uint32_t)0x200005f7)
00181 #define SUMOPEN4 ((uint32_t)0x200005f8)
00182 #define SUMOPEN5 ((uint32_t)0x200005f9)
00183 #define SUMOPEN6 ((uint32_t)0x200005fa)
00184 #define SUMOPEN7 ((uint32_t)0x200005fb)
00185 #define SUMALLOC3 ((uint32_t)0x200005fc)
00186 #define SUMALLOC4 ((uint32_t)0x200005fd)
00187 #define SUMALLOC5 ((uint32_t)0x200005fe)
00188 #define SUMALLOC6 ((uint32_t)0x200005ff)
00189 #define SUMALLOC7 ((uint32_t)0x20000600)
00190 #define SUMGET3 ((uint32_t)0x20000601)
00191 #define SUMGET4 ((uint32_t)0x20000602)
00192 #define SUMGET5 ((uint32_t)0x20000603)
00193 #define SUMGET6 ((uint32_t)0x20000604)
00194 #define SUMGET7 ((uint32_t)0x20000605)
00195 #define SUMPUT3 ((uint32_t)0x20000606)
00196 #define SUMPUT4 ((uint32_t)0x20000607)
00197 #define SUMPUT5 ((uint32_t)0x20000608)
00198 #define SUMPUT6 ((uint32_t)0x20000609)
00199 #define SUMPUT7 ((uint32_t)0x2000060a)
00200 #define SUMINFO3 ((uint32_t)0x2000060b)
00201 #define SUMINFO4 ((uint32_t)0x2000060c)
00202 #define SUMINFO5 ((uint32_t)0x2000060d)
00203 #define SUMINFO6 ((uint32_t)0x2000060e)
00204 #define SUMINFO7 ((uint32_t)0x2000060f)
00205
00206 #define SUMPROG ((uint32_t)0x20000611)
00207 #define SUMVERS ((uint32_t)1)
00208 #define SUMDO ((uint32_t)1)
00209 #define OPENDO ((uint32_t)2)
00210 #define CLOSEDO ((uint32_t)3)
00211 #define GETDO ((uint32_t)4)
00212 #define SUMRESPDO ((uint32_t)5)
00213 #define ALLOCDO ((uint32_t)6)
00214 #define PUTDO ((uint32_t)7)
00215
00216
00217
00218
00219
00220 #define DEBUGDO ((uint32_t)11)
00221 #define DELSERIESDO ((uint32_t)12)
00222 #define INFODO ((uint32_t)13)
00223 #define SHUTDO ((uint32_t)14)
00224 #define INFODOX ((uint32_t)15)
00225 #define NOPDO ((uint32_t)16)
00226 #define TAPERECONNECTDO ((uint32_t)17)
00227 #define CONFIGDO ((uint32_t)18)
00228 #define INFODOARRAY ((uint32_t)19)
00229 #define SUMREPARTN ((uint32_t)20)
00230
00231 extern KEY *sumdo_1(void);
00232 extern KEY *opendo_1(KEY *params);
00233 extern KEY *shutdo_1(KEY *params);
00234 extern KEY *closedo_1(KEY *params);
00235 extern KEY *getdo_1(KEY *params);
00236 extern KEY *infodo_1(KEY *params);
00237 extern KEY *infodoX_1(KEY *params);
00238 extern KEY *infodoX_1_U(void);
00239 extern KEY *infodoArray_1(Sunumarray *params);
00240 extern KEY *sumrespdo_1(KEY *params);
00241 extern KEY *allocdo_1(KEY *params);
00242 extern KEY *putdo_1(KEY *params);
00243 extern KEY *archsudo_1(void);
00244 extern KEY *nopdo_1(KEY *params);
00245 extern KEY *tapereconnectdo_1(KEY *params);
00246
00247
00248
00249
00250
00251 extern KEY *delseriesdo_1(KEY *params);
00252 extern KEY *configdo_1(KEY *params);
00253 extern KEY *repartndo_1(KEY *params);
00254
00255
00256 #define TAPEPROG ((uint32_t)0x20000612)
00257 #define TAPEVERS ((uint32_t)1)
00258 #define READDO ((uint32_t)1)
00259 #define WRITEDO ((uint32_t)2)
00260 #define TAPERESPREADDO ((uint32_t)3)
00261 #define TAPERESPWRITEDO ((uint32_t)4)
00262 #define TAPERESPROBOTDO ((uint32_t)5)
00263 #define TAPERESPROBOTDOORDO ((uint32_t)6)
00264 #define IMPEXPDO ((uint32_t)7)
00265 #define TAPETESTDO ((uint32_t)8)
00266 #define ONOFFDO ((uint32_t)9)
00267 #define DRONOFFDO ((uint32_t)10)
00268 #define ROBOTONOFFDO ((uint32_t)11)
00269 #define JMTXTAPEDO ((uint32_t)12)
00270 #define EXPCLOSEDO ((uint32_t)13)
00271 #define TAPENOPDO ((uint32_t)14)
00272 #define CLNTGONE ((uint32_t)15)
00273
00274 extern KEY *readdo_1(void);
00275 extern KEY *writedo_1(void);
00276 extern KEY *taperespreaddo_1(void);
00277 extern KEY *taperespwritedo_1(void);
00278 extern KEY *taperesprobotdo_1(void);
00279 extern KEY *taperesprobotdoordo_1(void);
00280 extern KEY *impexpdo_1(void);
00281 extern KEY *tapetestdo_1(void);
00282 extern KEY *onoffdo_1(void);
00283 extern KEY *dronoffdo_1(void);
00284 extern KEY *robotonoffdo_1(void);
00285 extern KEY *jmtxtapedo_1(void);
00286 extern KEY *expclosedo_1(void);
00287 extern KEY *tapenopdo_1(void);
00288 extern KEY *clntgone_1(void);
00289
00290
00291 #define RESPPROG ((uint32_t)0x20000613)
00292 #define RESPVERS ((uint32_t)1)
00293 #define RESPDO ((uint32_t)1)
00294 #define RESPDOARRAY ((uint32_t)2)
00295 #define RESULT_PEND 32
00296
00297 extern KEY *respdo_1(KEY *params);
00298
00299
00300 #define TAPEARCPROG ((uint32_t)0x20000614)
00301 #define TAPEARCVERS ((uint32_t)1)
00302 #define TAPEARCVERS0 ((uint32_t)2)
00303 #define TAPEARCVERS1 ((uint32_t)3)
00304 #define TAPEARCVERS2 ((uint32_t)4)
00305 #define TAPEARCVERS3 ((uint32_t)5)
00306 #define TAPEARCVERS4 ((uint32_t)6)
00307 #define TAPEARCVERS5 ((uint32_t)7)
00308 #define TAPEARCVERS6 ((uint32_t)8)
00309 #define TAPEARCVERS7 ((uint32_t)9)
00310 #define TAPEARCVERS8 ((uint32_t)10)
00311 #define TAPEARCDO ((uint32_t)1)
00312
00313 extern KEY *tapearcdo_1(KEY *params);
00314
00315
00316 #define DRIVE0PROG ((uint32_t)0x20000615)
00317 #define DRIVE0VERS ((uint32_t)1)
00318 #define READDRVDO ((uint32_t)1)
00319 #define WRITEDRVDO ((uint32_t)2)
00320
00321 extern KEY *readdrvdo_1(KEY *params);
00322 extern KEY *writedrvdo_1(KEY *params);
00323
00324
00325 #define DRIVE1PROG ((uint32_t)0x20000616)
00326 #define DRIVE1VERS ((uint32_t)1)
00327 #define READDRVDO ((uint32_t)1)
00328 #define WRITEDRVDO ((uint32_t)2)
00329
00330
00331 #define DRIVE2PROG ((uint32_t)0x20000617)
00332 #define DRIVE2VERS ((uint32_t)1)
00333 #define READDRVDO ((uint32_t)1)
00334 #define WRITEDRVDO ((uint32_t)2)
00335
00336
00337 #define DRIVE3PROG ((uint32_t)0x20000618)
00338 #define DRIVE3VERS ((uint32_t)1)
00339 #define READDRVDO ((uint32_t)1)
00340 #define WRITEDRVDO ((uint32_t)2)
00341
00342
00343 #define DRIVE4PROG ((uint32_t)0x20000619)
00344 #define DRIVE4VERS ((uint32_t)1)
00345 #define READDRVDO ((uint32_t)1)
00346 #define WRITEDRVDO ((uint32_t)2)
00347
00348
00349 #define DRIVE5PROG ((uint32_t)0x2000061a)
00350 #define DRIVE5VERS ((uint32_t)1)
00351 #define READDRVDO ((uint32_t)1)
00352 #define WRITEDRVDO ((uint32_t)2)
00353
00354
00355 #define DRIVE6PROG ((uint32_t)0x2000061b)
00356 #define DRIVE6VERS ((uint32_t)1)
00357 #define READDRVDO ((uint32_t)1)
00358 #define WRITEDRVDO ((uint32_t)2)
00359
00360
00361 #define DRIVE7PROG ((uint32_t)0x2000061c)
00362 #define DRIVE7VERS ((uint32_t)1)
00363 #define READDRVDO ((uint32_t)1)
00364 #define WRITEDRVDO ((uint32_t)2)
00365
00366
00367 #define DRIVE8PROG ((uint32_t)0x2000061d)
00368 #define DRIVE8VERS ((uint32_t)1)
00369 #define READDRVDO ((uint32_t)1)
00370 #define WRITEDRVDO ((uint32_t)2)
00371
00372
00373 #define DRIVE9PROG ((uint32_t)0x2000061e)
00374 #define DRIVE9VERS ((uint32_t)1)
00375 #define READDRVDO ((uint32_t)1)
00376 #define WRITEDRVDO ((uint32_t)2)
00377
00378
00379 #define DRIVE10PROG ((uint32_t)0x2000061f)
00380 #define DRIVE10VERS ((uint32_t)1)
00381 #define READDRVDO ((uint32_t)1)
00382 #define WRITEDRVDO ((uint32_t)2)
00383
00384
00385 #define DRIVE11PROG ((uint32_t)0x20000620)
00386 #define DRIVE11VERS ((uint32_t)1)
00387 #define READDRVDO ((uint32_t)1)
00388 #define WRITEDRVDO ((uint32_t)2)
00389
00390
00391 #define ROBOT0PROG ((uint32_t)0x20000627)
00392 #define ROBOT0VERS ((uint32_t)1)
00393 #define ROBOTDO ((uint32_t)1)
00394 #define ROBOTDOORDO ((uint32_t)2)
00395
00396 extern KEY *robotdo_1(KEY *params);
00397 extern KEY *robotdoordo_1(KEY *params);
00398
00399
00400 #define ROBOT1PROG ((uint32_t)0x20000628)
00401 #define ROBOT1VERS ((uint32_t)1)
00402 #define ROBOTDO ((uint32_t)1)
00403
00404
00405
00406 #define SUMRMPROG ((uint32_t)0x20000629)
00407 #define SUMRMVERS ((uint32_t)1)
00408
00409
00410
00411
00412 #define SUMPEPROG ((uint32_t)0x2000062a)
00413 #define SUMPEVERS ((uint32_t)1)
00414 #define SUMPEVERS2 ((uint32_t)2)
00415 #define SUMPEDO ((uint32_t)1)
00416 #define SUMPEACK ((uint32_t)2)
00417 extern KEY *sumpedo_1(KEY *params);
00418 extern KEY *sumpeack_1(KEY *params);
00419
00420
00421 #define PEPEQPROG ((uint32_t)0x2000062b)
00422 #define PEPEQVERS ((uint32_t)1)
00423 #define PEPEQRESPDO ((uint32_t)1)
00424 extern KEY *pepeqdo_1(KEY *params);
00425
00426
00427 #define SUMEXPROG ((uint32_t)0x2000062c)
00428 #define SUMEXVERS ((uint32_t)1)
00429 #define SUMEXVERS2 ((uint32_t)2)
00430 #define SUMEXDO ((uint32_t)1)
00431 #define SUMEXACK ((uint32_t)2)
00432 extern KEY *sumexdo_1(KEY *params);
00433 extern KEY *sumexack_1(KEY *params);
00434
00435
00436 #define REMSUMPROG ((uint32_t)0x2000062d)
00437 #define REMSUMVERS ((uint32_t)1)
00438 #define REMSUMRESPDO ((uint32_t)1)
00439
00440
00441 #define JMTXPROG ((uint32_t)0x2000062e)
00442 #define JMTXVERS ((uint32_t)1)
00443 #define JMTXDO ((uint32_t)1)
00444 extern KEY *jmtxdo_1(KEY *params);
00445
00446
00447 #define SUMPINGPROG ((uint32_t)0x2000062f)
00448 #define SUMPINGVERS ((uint32_t)1)
00449 #define SUMPINGDO ((uint32_t)1)
00450
00451 #if defined(SUMS_USEMTSUMS) && SUMS_USEMTSUMS
00452 typedef int MSUMSCLIENT_t;
00453
00454 #if defined(SUMS_USEMTSUMS_ALL) && SUMS_USEMTSUMS_ALL
00455
00456
00457
00458 #undef SUMS_USEMTSUMS_CONNECTION
00459 #define SUMS_USEMTSUMS_CONNECTION 1
00460
00461
00462
00463
00464
00465
00466
00467
00468
00469
00470
00471
00472
00473
00474
00475
00476
00477
00478 #undef SUMS_USEMTSUMS_INFO
00479 #define SUMS_USEMTSUMS_INFO 1
00480
00481
00482
00483 #undef SUMS_USEMTSUMS_GET
00484 #define SUMS_USEMTSUMS_GET 1
00485
00486
00487
00488
00489
00490 #undef SUMS_USEMTSUMS_ALLOC
00491 #define SUMS_USEMTSUMS_ALLOC 1
00492
00493
00494
00495 #undef SUMS_USEMTSUMS_PUT
00496 #define SUMS_USEMTSUMS_PUT 1
00497
00498
00499
00500 #undef SUMS_USEMTSUMS_DELETESUS
00501 #define SUMS_USEMTSUMS_DELETESUS 1
00502
00503 #else
00504
00505 #if (defined(SUMS_USEMTSUMS_CONNECTION) && SUMS_USEMTSUMS_CONNECTION) && (defined(SUMS_USEMTSUMS_INFO) && SUMS_USEMTSUMS_INFO) && (defined(SUMS_USEMTSUMS_GET) && SUMS_USEMTSUMS_GET) && (defined(SUMS_USEMTSUMS_ALLOC) && SUMS_USEMTSUMS_ALLOC) && (defined(SUMS_USEMTSUMS_PUT) && SUMS_USEMTSUMS_PUT) && (defined(SUMS_USEMTSUMS_DELETESUS) && SUMS_USEMTSUMS_DELETESUS)
00506
00507 #error DRMS is not configured correctly. It is configured to use at least one RPC service, but all MT SUMS parameters are set.
00508 #endif
00509
00510
00511
00512
00513 #if defined(SUMS_USEMTSUMS_CONNECTION) && SUMS_USEMTSUMS_CONNECTION
00514 #error DRMS is not configured correctly. It is configured to use at least one RPC service, but the CONNECTION parameter is not set for the RPC interface.
00515 #endif
00516
00517 #endif
00518
00519
00520 #if (!defined(SUMS_USEMTSUMS_CONNECTION) || !SUMS_USEMTSUMS_CONNECTION) && (!defined(SUMS_USEMTSUMS_INFO) || !SUMS_USEMTSUMS_INFO) && (!defined(SUMS_USEMTSUMS_GET) || !SUMS_USEMTSUMS_GET) && (!defined(SUMS_USEMTSUMS_ALLOC) || !SUMS_USEMTSUMS_ALLOC) && (!defined(SUMS_USEMTSUMS_PUT) || !SUMS_USEMTSUMS_PUT) && (!defined(SUMS_USEMTSUMS_DELETESUS) || !SUMS_USEMTSUMS_DELETESUS)
00521
00522 #error DRMS is not configured correctly. If DRMS is configured to use MT SUMS, then at least one MT SUMS service must be enabled.
00523 #endif
00524 #else
00525
00526 #endif
00527
00528
00529 typedef struct SUM_struct
00530 {
00531 SUMID_t uid;
00532
00533 #if (!defined(SUMS_USEMTSUMS) || !SUMS_USEMTSUMS) || (!defined(SUMS_USEMTSUMS_ALL) || !SUMS_USEMTSUMS_ALL)
00534 CLIENT *cl;
00535 #endif
00536 #if (!defined(SUMS_USEMTSUMS) || !SUMS_USEMTSUMS) || (!defined(SUMS_USEMTSUMS_CONNECTION) || !SUMS_USEMTSUMS_CONNECTION)
00537 CLIENT *clopen;
00538 CLIENT *clopen1;
00539 CLIENT *clopen2;
00540 CLIENT *clopen3;
00541 CLIENT *clopen4;
00542 CLIENT *clopen5;
00543 CLIENT *clopen6;
00544 CLIENT *clopen7;
00545 CLIENT *clclose;
00546 #endif
00547 #if (!defined(SUMS_USEMTSUMS) || !SUMS_USEMTSUMS) || (!defined(SUMS_USEMTSUMS_ALLOC) || !SUMS_USEMTSUMS_ALLOC)
00548 CLIENT *clalloc;
00549 CLIENT *clalloc1;
00550 CLIENT *clalloc2;
00551 CLIENT *clalloc3;
00552 CLIENT *clalloc4;
00553 CLIENT *clalloc5;
00554 CLIENT *clalloc6;
00555 CLIENT *clalloc7;
00556 #endif
00557 #if (!defined(SUMS_USEMTSUMS) || !SUMS_USEMTSUMS) || (!defined(SUMS_USEMTSUMS_GET) || !SUMS_USEMTSUMS_GET)
00558 CLIENT *clget;
00559 CLIENT *clget1;
00560 CLIENT *clget2;
00561 CLIENT *clget3;
00562 CLIENT *clget4;
00563 CLIENT *clget5;
00564 CLIENT *clget6;
00565 CLIENT *clget7;
00566 #endif
00567 #if (!defined(SUMS_USEMTSUMS) || !SUMS_USEMTSUMS) || (!defined(SUMS_USEMTSUMS_PUT) || !SUMS_USEMTSUMS_PUT)
00568 CLIENT *clput;
00569 CLIENT *clput1;
00570 CLIENT *clput2;
00571 CLIENT *clput3;
00572 CLIENT *clput4;
00573 CLIENT *clput5;
00574 CLIENT *clput6;
00575 CLIENT *clput7;
00576 #endif
00577 #if (!defined(SUMS_USEMTSUMS) || !SUMS_USEMTSUMS) || (!defined(SUMS_USEMTSUMS_INFO) || !SUMS_USEMTSUMS_INFO)
00578 CLIENT *clinfo;
00579 CLIENT *clinfo1;
00580 CLIENT *clinfo2;
00581 CLIENT *clinfo3;
00582 CLIENT *clinfo4;
00583 CLIENT *clinfo5;
00584 CLIENT *clinfo6;
00585 CLIENT *clinfo7;
00586 #endif
00587 #if (!defined(SUMS_USEMTSUMS) || !SUMS_USEMTSUMS) || (!defined(SUMS_USEMTSUMS_DELETESUS) || !SUMS_USEMTSUMS_DELETESUS)
00588 CLIENT *cldelser;
00589 #endif
00590 SUM_info_t *sinfo;
00591 int debugflg;
00592 int mode;
00593 int tdays;
00594 int group;
00595 int storeset;
00596 int status;
00597 int numSUM;
00598 double bytes;
00599 char *dsname;
00600 char *username;
00601 char *history_comment;
00602 int reqcnt;
00603 uint64_t *dsix_ptr;
00604 char **wd;
00605 #if defined(SUMS_USEMTSUMS) && SUMS_USEMTSUMS
00606 MSUMSCLIENT_t mSumsClient;
00607 #endif
00608 } SUM_t;
00609
00610 typedef struct SUMEXP_struct
00611 {
00612 SUMID_t uid;
00613 int reqcnt;
00614 uint32_t port;
00615 char *cmd;
00616 char *host;
00617 char **src;
00618 char **dest;
00619 } SUMEXP_t;
00620
00621
00622
00623
00624
00625 struct sumopened {
00626 struct sumopened *next;
00627 SUMID_t uid;
00628 SUM_t *sum;
00629 char user[16];
00630 };
00631 typedef struct sumopened SUMOPENED;
00632
00633
00634
00635
00636
00637
00638
00639
00640 struct sumoffcnt {
00641 struct sumoffcnt *next;
00642 SUMID_t uid;
00643 int offcnt;
00644 int uniqcnt;
00645 char *tapeids[MAXSUMREQCNT];
00646 int tapefns[MAXSUMREQCNT];
00647 int reqofflinenum[MAXSUMREQCNT];
00648 uint64_t dsix[MAXSUMREQCNT];
00649 uint32_t sprog;
00650 };
00651 typedef struct sumoffcnt SUMOFFCNT;
00652
00653
00654
00655
00656
00657 struct tq {
00658 struct tq *next;
00659 KEY *list;
00660 SUMID_t uid;
00661 uint32_t spare;
00662 uint64_t ds_index;
00663 char *tapeid;
00664 char *username;
00665 int filenum;
00666 };
00667 typedef struct tq TQ;
00668
00669
00670
00671
00672
00673 struct padata {
00674 struct padata *next;
00675 char *wd;
00676 char *effective_date;
00677 uint64_t sumid;
00678 double bytes;
00679 int status;
00680 int archsub;
00681 int group_id;
00682 int safe_id;
00683 uint64_t ds_index;
00684 };
00685 typedef struct padata PADATA;
00686
00687
00688
00689
00690
00691
00692
00693 struct partition {
00694 char *name;
00695 double bytes_total;
00696 double bytes_left;
00697 double bytes_alloc;
00698 int pds_set_num;
00699
00700 int pds_set_prime;
00701 };
00702 typedef struct partition PART;
00703
00704
00705
00706
00707
00708
00709 struct peuid {
00710 struct peuid *next;
00711 uint64_t uid;
00712 int petid;
00713 };
00714 typedef struct peuid PEUID;
00715
00716
00717 SUM_t *SUM_open(char *server, char *db, int (*history)(const char *fmt, ...));
00718 int SUM_shutdown(int query, int (*history)(const char *fmt, ...));
00719 int SUM_close(SUM_t *sum, int (*history)(const char *fmt, ...));
00720 int SUM_get(SUM_t *sum, int (*history)(const char *fmt, ...));
00721 int SUM_put(SUM_t *sum, int (*history)(const char *fmt, ...));
00722 int SUM_alloc(SUM_t *sum, int (*history)(const char *fmt, ...));
00723 int SUM_alloc2(SUM_t *sum, uint64_t sunum, int (*history)(const char *fmt, ...));
00724 int SUM_poll(SUM_t *sum);
00725 int SUM_wait(SUM_t *sum);
00726 int SUM_delete_series(SUM_t *sum, char *filename, char *seriesname, int (*history)(const char *fmt, ...));
00727 int SUM_export(SUMEXP_t *sumexp, int (*history)(const char *fmt, ...));
00728 #if defined(SUMS_USEMTSUMS) && SUMS_USEMTSUMS
00729 int SUM_rollback(SUM_t *sums, int (*history)(const char *fmt, ...));
00730 int SUM_infoArray(SUM_t *sums, uint64_t *sunums, int reqcnt, int (*history)(const char *fmt, ...));
00731 void SUM_infoArray_free(SUM_t *sums);
00732 #else
00733 int SUM_info(SUM_t *sum, uint64_t sunum, int (*history)(const char *fmt, ...));
00734 int SUM_infoEx(SUM_t *sum, int (*history)(const char *fmt, ...));
00735 int SUM_infoArray(SUM_t *sum, uint64_t *dxarray, int reqcnt, int (*history)(const char *fmt, ...));
00736 void SUM_infoEx_free(SUM_t *sum);
00737 void SUM_infoArray_free(SUM_t *sum);
00738 #endif
00739 int SUM_nop(SUM_t *sum, int (*history)(const char *fmt, ...));
00740 int SUM_repartn(SUM_t *sum, int (*history)(const char *fmt, ...));
00741
00742 int NC_PaUpdate(char *wd, uint64_t uid, double bytes, int status, int archsub, char *eff_date, int gpid, int sid, uint64_t ds_index, int flg, int commit);
00743 SUMID_t SUMLIB_Open(void);
00744 SUMID_t sumrpcopen_1(KEY *argp, CLIENT *clnt, int (*history)(const char *fmt, ...));
00745 void setsumopened (SUMOPENED **list, SUMID_t uid, SUM_t *sum, char *user);
00746 SUMOPENED *getsumopened (SUMOPENED *list, SUMID_t uid);
00747 void remsumopened (SUMOPENED **list, SUMID_t uid);
00748 SUMOFFCNT *setsumoffcnt (SUMOFFCNT **list, SUMID_t uid, int offcnt);
00749 SUMOFFCNT *getsumoffcnt (SUMOFFCNT *list, SUMID_t uid);
00750 void remsumoffcnt (SUMOFFCNT **list, SUMID_t uid);
00751 TQ *delete_q_rd_front(void);
00752 TQ *delete_q_wrt_front(void);
00753 TQ *delete_q_rd(TQ *p);
00754 TQ *delete_q_wrt(TQ *p);
00755 TQ *q_entry_make(KEY *list, SUMID_t uid, char *tapeid, int filenum, char *user, uint64_t dsix);
00756 void tq_entry_rd_dump(char *user);
00757 void insert_tq_entry_rd_sort(TQ *p);
00758 void insert_tq_entry_rd(TQ *p);
00759 void insert_tq_entry_wrt(TQ *p);
00760 PADATA *getpadata(PADATA *list, char *wd, uint64_t sumid);
00761 PADATA *getpauid(PADATA *list, uint64_t uid);
00762 PADATA *getpawd(PADATA *list, char *wd);
00763 PADATA *getpanext(PADATA *list);
00764 PADATA *NC_PaRequest_AP(int groupset);
00765 PADATA *NC_PaRequest_AP_60d(void);
00766 int DS_ConnectDB (char *dbname);
00767 int DS_DisConnectDB(void);
00768 int DS_ConnectDB_Q (char *dbname);
00769 int DS_DisConnectDB_Q(void);
00770 int DS_DataRequest(KEY *params, KEY **results);
00771 int DS_PavailRequest(void);
00772 int DS_PallocRequest(void);
00773 int DS_PallocClean(void);
00774 int DS_RmDo(double *bytesdel);
00775 int DS_RmNow(char *wd, uint64_t sumid, double bytes, char *effdate, uint64_t ds_index, int archsub, double *rmbytes);
00776 int DS_RmDoX(char *name, double bytesdel);
00777 int DS_RmNowX(char *wd, uint64_t sumid, double bytes, char *effdate, uint64_t ds_index, int archsub, double *rmbytes);
00778 int DS_Rm_Commit(void);
00779 int rmdirs(char *wd, char *root);
00780 int SUM_Main_Update (KEY *params, KEY **results);
00781
00782 int SUMLIB_Close(KEY *params);
00783 int SUMLIB_TapeState(char *tapeid);
00784 int SUM_StatOffline(uint64_t ds_index);
00785 int SUMLIB_TapeClose(char *tapeid);
00786 int SUMLIB_TapeActive(char *tapeid);
00787 int SUMLIB_TapeCatalog(char *tapeid);
00788 int SUMLIB_MainTapeUpdate(KEY *params);
00789 int SUMLIB_EffDateUpdate(char *tapeid, int operation);
00790 int SUMLIB_MD5info(char *tapeid);
00791 int SUMLIB_SafeTapeUpdate(char *suname, char *tapeid, int tapefn, char *tapedate);
00792 int DS_SumMainDelete(uint64_t ds_index);
00793 int SUM_StatOnline(uint64_t ds_index, char *newwd);
00794 int DS_DataRequest_WD(KEY *params, KEY **results);
00795 int SUMLIB_TapeUpdate(char *tapeid, int tapenxtfn, uint64_t tellblock, double totalbytes);
00796 int SUMLIB_TapeFilenumber(char *tapeid);
00797 #if defined(SUMS_TAPE_AVAILABLE) && SUMS_TAPE_AVAILABLE
00798 int SUMLIB_TapeFindGroup(int group, double bytes, TAPE *tape);
00799 #endif
00800 int SUMLIB_PavailGet(double bytes, int pds_set, uint64_t uid, uint64_t sunum, KEY **results);
00801 int SUMLIB_PavailUpdate(char *name, double bytes);
00802 int SUMLIB_PavailOff(char *name);
00803 int SUMLIB_PavailOn(char *name, int setnum);
00804 int SUMLIB_DelSeriesSU(char *file, char *series);
00805 int SUMLIB_InfoGet(uint64_t sunum , KEY **results);
00806
00807
00808 void setpeuid(PEUID **list, uint64_t uid, int petid);
00809 void updpadata (PADATA **list, char *wd, uint64_t sumid, char *eff_date);
00810 PEUID *getpeuid(PEUID *list, uint64_t uid);
00811 PEUID *getpeuidnext(PEUID *list);
00812 void rempeuid(PEUID **list, uint64_t uid);
00813 void setpadata(PADATA **list, char *wd, uint64_t sumid, double bytes,
00814 int stat, int substat, char *eff_date,
00815 int group_id, int safe_id, uint64_t ds_index);
00816 void setpadatar(PADATA **list, char *wd, uint64_t sumid, double bytes,
00817 int stat, int substat, char *eff_date,
00818 int group_id, int safe_id, uint64_t ds_index);
00819 int tape_inventory(int sim, int catalog);
00820 int robot_verify(char *action, int slot, int slotordrive);
00821 void uidpadata(PADATA *new, PADATA **start, PADATA **end);
00822 void remuidpadata(PADATA **start, PADATA **end, char *wd, uint64_t sumid);
00823 void rempadata(PADATA **list, char *wd, uint64_t sumid);
00824 char *get_effdate(int plusdays);
00825 char *get_datetime(void);
00826 void write_time(void);
00827 void send_ack(void);
00828 CLIENT *set_client_handle(uint32_t prognum, uint32_t versnum);
00829 double du_dir(char *wd);
00830
00831 #endif
00832