00001 // Copyright (C) 2001, Compaq Computer Corporation 00002 // 00003 // This file is part of Vesta. 00004 // 00005 // Vesta is free software; you can redistribute it and/or 00006 // modify it under the terms of the GNU Lesser General Public 00007 // License as published by the Free Software Foundation; either 00008 // version 2.1 of the License, or (at your option) any later version. 00009 // 00010 // Vesta is distributed in the hope that it will be useful, 00011 // but WITHOUT ANY WARRANTY; without even the implied warranty of 00012 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00013 // Lesser General Public License for more details. 00014 // 00015 // You should have received a copy of the GNU Lesser General Public 00016 // License along with Vesta; if not, write to the Free Software 00017 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 00018 00019 // 00020 // VestaSourceSRPC.H 00021 // Last modified on Wed Apr 20 02:16:58 EDT 2005 by ken@xorian.net 00022 // modified on Fri May 18 17:05:42 PDT 2001 by mann 00023 // 00024 // Shared definitions between SRPC client and server for VestaSource 00025 // interface, etc. 00026 // 00027 00028 #ifndef _VSSRPC 00029 #define _VSSRPC 1 00030 00031 #include <MultiSRPC.H> 00032 #include "AccessControl.H" 00033 00034 // The type "identity" used below is an AccessControl::Identity. It 00035 // is marshalled as follows: 00036 // 00037 // - First, the flavor is marshalled as an int. 00038 // 00039 // - Second: 00040 // 00041 // - For the unix flavor, the fields of the underlying 00042 // authunix_parms are marshalled in the order they appear, with the 00043 // length of the list of groups marshalled just before the list. 00044 // 00045 // - For the global flavor, the character string user_ is 00046 // marshalled. 00047 // 00048 // - For the gssapi flavor, the character string user_ is 00049 // marshalled, followed by the appropriate gssapi token. 00050 // !! May need to do more here. 00051 // 00052 // !!We might also need a way to say "same as last identity" to save 00053 // the time and effort of repeatedly marshalling and verifying the same 00054 // identity after a connection is opened. This is tolerable now but 00055 // maybe not once GSS-API identities are supported. However, it's hard 00056 // to see how to do this on top of MultiSRPC... 00057 00058 namespace VestaSourceSRPC { 00059 enum { 00060 // current version 00061 version = 11 00062 }; 00063 enum { 00064 Lookup, // see VestaSource::lookup 00065 // Arguments: 00066 // longid (bytes) 32-byte LongId of directory. 00067 // arc (chars) Name to look up. 00068 // At most MAX_ARC_LEN plus \0 terminator. 00069 // who (identity) 00070 // Results: 00071 // err (int) VestaSource::errorCode. If err != 00072 // VestaSource::ok, other results are omitted. 00073 // type (int) VestaSource::typeTag for result. 00074 // rlongid (bytes) 32-byte LongId of result. 00075 // master (int) bool; master attribute of result. 00076 // pseudoInode (int) pseudo-inode number for result. 00077 // sid (int) ShortId of result, 0 if none 00078 // timestamp (int) modified time of result (as a time_t) 00079 // hasAttribs (int) bool; does source have mutable attribs? 00080 // fptag (bytes) 8-byte FP::Tag of result 00081 00082 CreateVolatileDirectory, // see VDirSurrogate::createVolatileDirectory 00083 // Arguments: 00084 // hostname (chars) TCP hostname for SRPC to evaluator. 00085 // port (chars) TCP port for SRPC to evaluator. 00086 // handle (bytes) 8-byte handle of base evalutor directory 00087 // timestamp (int) time_t 00088 // roExisting (int) bool 00089 // Results: 00090 // Same as Lookup. 00091 00092 DeleteVolatileDirectory, // see VDirSurrogate::deleteVolatileDirectory 00093 // Arguments: 00094 // longid (bytes) 32-byte LongId of directory 00095 // Results: 00096 // err (int) VestaSource::errorCode 00097 00098 List, // see VestaSource::list 00099 // Arguments: 00100 // longid (bytes) 32-byte LongId of directory 00101 // firstIndex (int) unsigned int 00102 // who (identity) 00103 // deltaOnly (int) bool 00104 // limit (int) Maximum amount to return; see below 00105 // overhead (int) Used in limit calculation; see below 00106 // Results: 00107 // Returns an SRPC general sequence, using send_seq_* 00108 // No length information is passed with send_seq_start. 00109 // Each sequence element other than the last is: 00110 // arc (chars) Name for this entry. 00111 // At most MAX_ARC_LEN plus \0 terminator. 00112 // type (int) VestaSource::typeTag for this entry 00113 // index (int) Index for this entry. 00114 // pseudoInode (int) pseudo-inode number for this entry. 00115 // filesid (int) shortid for this entry or NullShortId. 00116 // master (int) master flag for this entry. 00117 // The last element is: 00118 // arc (chars) Always "" 00119 // type (int) VestaSource::unused 00120 // err (int) VestaSource::errorCode 00121 // 00122 // The sequence terminates when either: 00123 // (a) extending the sequence by one would cause the cumulative 00124 // cost of the sequence to exceed 'limit', where the cost 00125 // of an element of the sequence is strlen(name)+overhead, or 00126 // (b) the end of the directory is reached, in which case a 00127 // special terminating entry is appended to the sequence 00128 // whose 'type' is VestaSource::unused. This entry is 00129 // not included in the cost calculation. 00130 00131 GetNFSInfo, // see VDirSurrogate::getNFSInfo 00132 // Arguments: 00133 // None. 00134 // Results: 00135 // socket (chars) UDP socket of repository NFS server, 00136 // in SRPC-style hostName:portNumber format. 00137 // root (bytes) 32-byte LongId (fhandle) of repository root 00138 // muRoot (bytes) 32-byte LongId (fhandle) of mutable root 00139 00140 ReallyDelete, // see VestaSource::reallyDelete 00141 // Arguments: 00142 // longid (bytes) 32-byte LongId of directory 00143 // arc (chars) At most MAX_ARC_LEN plus \0 terminator. 00144 // who (identity) 00145 // existCheck (int) bool 00146 // timestamp (int) time_t 00147 // Results: 00148 // err (int) VestaSource::errorCode 00149 00150 InsertFile, // see VestaSource::insertFile 00151 // Arguments: 00152 // longid (bytes) 32-byte LongId of directory 00153 // arc (chars) At most MAX_ARC_LEN plus \0 terminator. 00154 // sid (int) ShortId 00155 // master (int) bool 00156 // who (identity) 00157 // chk (int) VestaSource::dupeCheck 00158 // timestamp (int) time_t 00159 // fptag (bytes) 8-byte FP::Tag to assign, or 0 bytes if NULL 00160 // Results: 00161 // err (int) VestaSource::errorCode. If err != 00162 // VestaSource::ok, other results are omitted. 00163 // rlongid (bytes) 32-byte LongId of result. 00164 // pseudoInode (int) pseudo-inode number of result 00165 // fptag (bytes) 8-byte FP::Tag of result 00166 // sid (int) ShortId of result 00167 00168 InsertMutableFile, // see VestaSource::insertMutableFile 00169 // Arguments and results: 00170 // Same as InsertFile 00171 00172 InsertImmutableDirectory, // see VestaSource::insertImmutableDirectory 00173 // Arguments: 00174 // longid (bytes) 32-byte LongId of this directory 00175 // arc (chars) At most MAX_ARC_LEN plus \0 terminator. 00176 // dir (bytes) 32-byte LongId of prototype child dir, 00177 // or NullLongId to represent NULL. 00178 // master (int) bool 00179 // who (identity) 00180 // chk (int) VestaSource::dupeCheck 00181 // timestamp (int) time_t 00182 // fptag (bytes) 8-byte FP::Tag to assign, or 0 bytes if NULL 00183 // Results: 00184 // err (int) VestaSource::errorCode. If err != 00185 // VestaSource::ok, other results are omitted. 00186 // rlongid (bytes) 32-byte LongId of result. 00187 // pseudoInode (int) pseudo-inode number of result. 00188 // fptag (bytes) 8-byte FP::Tag of result 00189 // sid (int) ShortId of result 00190 00191 InsertAppendableDirectory,// see VestaSource::insertAppendableDirectory 00192 // Arguments: 00193 // longid (bytes) 32-byte LongId of this directory 00194 // arc (chars) At most MAX_ARC_LEN plus \0 terminator. 00195 // master (int) bool 00196 // who (identity) 00197 // chk (int) VestaSource::dupeCheck 00198 // timestamp (int) time_t 00199 // Results: 00200 // err (int) VestaSource::errorCode. If err != 00201 // VestaSource::ok, other results are omitted. 00202 // rlongid (bytes) 32-byte LongId of result. 00203 // pseudoInode (int) pseudo-inode number of result. 00204 // fptag (bytes) 8-byte FP::Tag of result 00205 00206 InsertMutableDirectory, // see VestaSource::insertMutableDirectory 00207 // Arguments: 00208 // longid (bytes) 32-byte LongId of this directory 00209 // arc (chars) At most MAX_ARC_LEN plus \0 terminator. 00210 // dir (bytes) 32-byte LongId of prototype child dir, 00211 // or NullLongId to represent NULL. 00212 // master (int) bool 00213 // who (identity) 00214 // chk (int) VestaSource::dupeCheck 00215 // timestamp (int) time_t 00216 // Results: 00217 // err (int) VestaSource::errorCode. If err != 00218 // VestaSource::ok, other results are omitted. 00219 // rlongid (bytes) 32-byte LongId of result. 00220 // pseudoInode (int) pseudo-inode number of result. 00221 // fptag (bytes) 8-byte FP::Tag of result 00222 // sid (int) ShortId of result (should be 0) 00223 00224 InsertGhost, // see VestaSource::insertGhost 00225 // Arguments and results: 00226 // Same as InsertAppendableDirectory 00227 00228 InsertStub, // see VestaSource::insertStub 00229 // Arguments and results: 00230 // Same as InsertAppendableDirectory 00231 00232 RenameTo, // see VestaSource::renameTo 00233 // Arguments: 00234 // longid (bytes) 32-byte LongId of this directory 00235 // arc (chars) At most MAX_ARC_LEN plus \0 terminator. 00236 // fromDir (bytes) 32-byte LongId of fromDir 00237 // fromArc (chars) At most MAX_ARC_LEN plus \0 terminator. 00238 // who (identity) 00239 // chk (int) VestaSource::dupeCheck 00240 // timestamp (int) time_t 00241 // Results: 00242 // err (int) VestaSource::errorCode. 00243 00244 MakeMutable, // see VestaSource::makeMutable 00245 // Arguments: 00246 // longid (bytes) 32-byte LongId of this source 00247 // sid (int) ShortId 00248 // copyMaxLo (int) low-order 32 bits of copyMax 00249 // copyMaxHi (int) high-order 32 bits of copyMax 00250 // who (identity) 00251 // Results: 00252 // Same as Lookup. 00253 00254 obsolete1, // formerly CheckOut 00255 obsolete2, // formerly Advance 00256 obsolete3, // formerly CheckIn 00257 00258 InAttribs, // see VestaSource::inAttribs 00259 // Arguments: 00260 // longid (bytes) 32-byte LongId of this source 00261 // name (chars) 00262 // value (chars) 00263 // Results: 00264 // retval (int) bool; value to return 00265 00266 GetAttrib, // see VestaSource::getAttrib 00267 // Arguments: 00268 // longid (bytes) 32-byte LongId of this source 00269 // name (chars) 00270 // Results: 00271 // null (int) bool; if true, return NULL 00272 // value (chars) Otherwise, return this string 00273 00274 GetAttrib2, // see VestaSource::getAttrib 00275 // Arguments: 00276 // longid (bytes) 32-byte LongId of this source 00277 // name (chars) 00278 // Results: 00279 // Returns an SRPC general sequence, using send_seq_* 00280 // No length information is passed with send_seq_start. 00281 // Each sequence element is: 00282 // value (chars) 00283 00284 ListAttribs, // see VestaSource::listAttribs 00285 // Arguments: 00286 // longid (bytes) 32-byte LongId of this source 00287 // Results: 00288 // Returns an SRPC general sequence, using send_seq_* 00289 // No length information is passed with send_seq_start. 00290 // Each sequence element is: 00291 // value (chars) 00292 00293 GetAttribHistory, // see VestaSource::getAttribHistory 00294 // Arguments: 00295 // longid (bytes) 32-byte LongId of this source 00296 // Results: 00297 // Returns an SRPC general sequence, using send_seq_* 00298 // No length information is passed with send_seq_start. 00299 // Each sequence element is: 00300 // op (int) VestaSource::attribOp 00301 // name (chars) 00302 // value (chars) 00303 // timestamp (int) time_t 00304 00305 WriteAttrib, // see VestaSource::writeAttrib 00306 // Arguments: 00307 // longid (bytes) 32-byte LongId of this source 00308 // op (int) VestaSource::attribOp 00309 // name (chars) 00310 // value (chars) 00311 // who (identity) 00312 // timestamp (int) time_t 00313 // Results: 00314 // err (int) VestaSource::errorCode 00315 00316 LookupPathname, // see VestaSource::lookupPathname 00317 // Arguments: 00318 // longid (bytes) 32-byte LongId of directory. 00319 // pathname (chars) Name to look up; any length. 00320 // who (identity) 00321 // pathnameSep (int) char 00322 // Results: 00323 // Same as Lookup. 00324 00325 LookupIndex, // see VestaSource::lookupIndex 00326 // Arguments: 00327 // longid (bytes) 32-byte LongId of directory. 00328 // index (int) unsigned int; index to look up 00329 // sendarc (int) bool 00330 // Results: 00331 // Same as Lookup, followed by... 00332 // arc (chars) At most MAX_ARC_LEN plus \0 terminator; 00333 // omitted if sendarc is false. 00334 00335 obsolete6, // was AddUserMapping 00336 obsolete7, // was RemoveUserMapping 00337 obsolete8, // was ListUserMappings 00338 obsolete9, // was AddGroupMapping 00339 obsolete10, // was RemoveGroupMapping 00340 obsolete11, // was ListGroupMappings 00341 obsolete12, // was RefreshImplicitMappings 00342 00343 MakeFilesImmutable, // see VestaSource::makeFilesImmutable 00344 // Arguments: 00345 // longid (bytes) 32-byte LongId of directory. 00346 // threshold (int) unsigned int 00347 // who (identity) 00348 // Results: 00349 // err (int) VestaSource::errorCode 00350 00351 SetIndexMaster, // see VestaSource::setIndexMaster 00352 // Arguments: 00353 // longid (bytes) 32-byte LongId of directory. 00354 // index (int) unsigned int 00355 // state (int) bool 00356 // who (identity) 00357 // Results: 00358 // err (int) VestaSource::errorCode 00359 00360 Stat, // see VestaSource::(executable, size, timestamp) 00361 // Arguments: 00362 // longid (bytes) 32-byte LongId 00363 // Results: 00364 // err (int) VestaSource::errorCode (not used by client) 00365 // timestamp (int) modified time (as a time_t) 00366 // executable (int) bool 00367 // sizelo (int) low-order 32 bits of size 00368 // sizehi (int) high-order 32 bits of size 00369 00370 Read, // see VestaSource::read 00371 // Arguments: 00372 // longid (bytes) 32-byte LongId 00373 // nbytes (int) number of bytes to read 00374 // offsetlo (int) low-order 32 bits of offset 00375 // offsethi (int) high-order 32 bits of offset 00376 // who (identity) 00377 // Results: 00378 // err (int) VestaSource::errorCode. If err != 00379 // VestaSource::ok, other results are omitted. 00380 // buffer (bytes) bytes read (<= nbytes) 00381 00382 Write, // see VestaSource::write 00383 // Arguments: 00384 // longid (bytes) 32-byte LongId 00385 // offsetlo (int) low-order 32 bits of offset 00386 // offsethi (int) high-order 32 bits of offset 00387 // buffer (bytes) nbytes bytes 00388 // who (identity) 00389 // Results: 00390 // err (int) VestaSource::errorCode. If err != 00391 // VestaSource::ok, other results are omitted. 00392 // rbytes (int) number of bytes written 00393 00394 SetExecutable, // see VestaSource::setExecutable 00395 // Arguments: 00396 // longid (bytes) 32-byte LongId 00397 // state (int) bool 00398 // who (identity) 00399 // Results: 00400 // err (int) VestaSource::errorCode 00401 00402 SetSize, // see VestaSource::setSize 00403 // Arguments: 00404 // longid (bytes) 32-byte LongId 00405 // sizelo (int) low-order 32 bits of size 00406 // sizehi (int) high-order 32 bits of size 00407 // who (identity) 00408 // Results: 00409 // err (int) VestaSource::errorCode 00410 00411 SetTimestamp, // see VestaSource::setTimestamp 00412 // Arguments: 00413 // longid (bytes) 32-byte LongId 00414 // timestamp (int) time_t 00415 // who (identity) 00416 // Results: 00417 // err (int) VestaSource::errorCode 00418 00419 FPToShortId, // see VDirSurrogate::fpToShortId 00420 // Arguments: 00421 // fptag (bytes) 8-byte FP::Tag 00422 // Results: 00423 // sid (int) ShortId of result, 0 if none 00424 00425 GetBase, // see VestaSource::getBase 00426 // Arguments: 00427 // longid (bytes) 32-byte LongId of directory. 00428 // who (identity) 00429 // Results: 00430 // Same as Lookup. 00431 00432 obsolete4, // Old mastership transfer opcodes 00433 obsolete5, 00434 00435 // Start an atomic group; see VestaSourceAtomic.H 00436 Atomic, 00437 // Arguments: 00438 // who (identity) 00439 // One or more of the following. See VestaSourceAtomic.C 00440 // for the real details. Not all VestaSourceSRPC ops are 00441 // supported; in particular, nesting is not allowed. 00442 // opcode (int) VestaSourceSRPC enum element 00443 // additional arguments depending on opcode 00444 // Results: see AtomicRun or AtomicCancel 00445 00446 // Set target error codes for an atomic group 00447 AtomicTarget, 00448 // Arguments: 00449 // target1 (int) VestaSource::errorCode 00450 // target2 (int) VestaSource::errorCode 00451 // okrepl (int) VestaSource::errorCode 00452 // Results: none, atomic group continues 00453 00454 // Assign the next vsi to this longid 00455 AtomicDeclare, 00456 // Arguments: 00457 // longid (bytes) 32-byte LongId 00458 // Results: none, atomic group continues 00459 00460 // Do a resync at the server end 00461 AtomicResync, 00462 // Arguments: 00463 // vsi (int) VestaSourceAtomic::VSIndex 00464 // Results: none, atomic group continues 00465 00466 // Test vsi's master flag. 00467 AtomicTestMaster, 00468 // Arguments: 00469 // vsi (int) VestaSourceAtomic::VSIndex 00470 // master (int) bool 00471 // err (int) VestaSource::errorCode 00472 // Results: none, atomic group continues 00473 00474 // Set vsi's master flag 00475 AtomicSetMaster, // see VestaSource::setMaster 00476 // Arguments: 00477 // vsi (int) VestaSourceAtomic::VSIndex 00478 // master (int) bool 00479 // Results: none, atomic group continues 00480 00481 // Invoke AccessControl::check on vsi's ac field 00482 AtomicAccessCheck, 00483 // Arguments: 00484 // vsi (int) VestaSourceAtomic::VSIndex 00485 // cls (int) AccessControl::Class 00486 // expected (bool) 00487 // err (int) VestaSource::errorCode 00488 // Results: none, atomic group continues 00489 00490 // Test vsi's type field 00491 AtomicTypeCheck, 00492 // Arguments: 00493 // vsi (int) VestaSourceAtomic::VSIndex 00494 // allowed (int) unsigned int 00495 // err (int) VestaSource::errorCode 00496 // Results: none, atomic group continues 00497 00498 // End an atomic group and run it 00499 AtomicRun, 00500 // Arguments: none 00501 // Results: 00502 // ncommands (int) Number of commands successfully completed 00503 // err (int) VestaSource::errorCode of last command tried 00504 // okreplace (int) VestaSource::errorCode to use if err == ok 00505 // but success == false 00506 // success (int) bool, true if program successfully completed 00507 00508 // End an atomic group and don't run it 00509 AtomicCancel, 00510 // Arguments: none 00511 // Results: none 00512 00513 // See VestaSourceAtomic::mergeAttrib 00514 AtomicMergeAttrib, 00515 // Arguments: 00516 // fromvsi (int) VestaSourceAtomic::VSIndex 00517 // tovsi (int) VestaSourceAtomic::VSIndex 00518 // name (chars) 00519 // timestamp (int) time_t 00520 // Results: none, atomic group continues 00521 00522 AcquireMastership, 00523 // Arguments: 00524 // pathname (chars) Pathname of object 00525 // srcHost (chars) Current master repos host ("" if unknown) 00526 // srcPort (chars) Current master repos port ("" if unknown) 00527 // pathnameSep (int) char 00528 // dwho (identity) Identity to use at destination (callee) 00529 // swho (identity) Identity to use at source 00530 // Results: 00531 // err (int) VestaSource::errorCode 00532 00533 CedeMastership, 00534 // Arguments: 00535 // longid (bytes) 32-byte LongId of object 00536 // requestid (chars) 00537 // who (identity) 00538 // Results: 00539 // err (int) VestaSource::errorCode 00540 // grantid (chars) Sent only if err == VestaSource::ok 00541 00542 Replicate, 00543 // Arguments: 00544 // pathname (chars) Pathname of object 00545 // asStub (int) bool 00546 // asGhost (int) bool 00547 // srcHost (chars) Source repos host ("" if unknown) 00548 // srcPort (chars) Source repos port ("" if unknown) 00549 // pathnameSep (int) char 00550 // dwho (identity) Identity to use at destination (callee) 00551 // swho (identity) Identity to use at source 00552 // Results: 00553 // err (int) VestaSource::errorCode 00554 00555 ReplicateAttribs, 00556 // Arguments: 00557 // pathname (chars) Pathname of object 00558 // inclAccess (int) bool 00559 // srcHost (chars) Source repos host ("" if unknown) 00560 // srcPort (chars) Source repos port ("" if unknown) 00561 // pathnameSep (int) char 00562 // dwho (identity) Identity to use at destination (callee) 00563 // swho (identity) Identity to use at source 00564 // Results: 00565 // err (int) VestaSource::errorCode 00566 00567 GetUserInfo, 00568 // Arguments: 00569 // who (identity) User making the inquiry 00570 // subject (identity) Identity to inquire about 00571 // Results: 00572 // names (chars_seq) Global names (incl aliases) of 00573 // this user 00574 // groups (chars_seq) Global groups this user is a 00575 // member of 00576 // unix_uid (int32) UNIX user ID of this user 00577 // unix_gid (int32) UNIX group ID of this user's 00578 // primary group 00579 // specials (int16) 0x1 = is_root 00580 // 0x2 = is_admin 00581 // 0x4 = is_wizard 00582 // 0x8 = is_runtool 00583 00584 RefreshAccessTables, 00585 // Arguments: 00586 // who (identity) User requesting the refresh 00587 // Results: none (in the event of failure, SRPC::send_failure 00588 // is used to send the error message). 00589 00590 GetStats, 00591 // Arguments: 00592 // who (identity) User making the inquiry 00593 // stats (int16 array) 00594 // Requested statistics. (See 00595 // ReposStats::StatKind enum.) 00596 // Results: 00597 // 00598 // [sequence of 0 or more of:] 00599 // 00600 // stat_kind (in16) Following statistic kind 00601 // 00602 // [if stat_kind == ReposStats::fdCache] 00603 // 00604 // n_in_cache (int32) 00605 // hits (int64) 00606 // open_misses (int64) 00607 // try_misses (int64) 00608 // evictions (int64) 00609 // expirations (int64) 00610 // 00611 // [if stat_kind == ReposStats::dupeTotal] 00612 // 00613 // new (int64) 00614 // inProcess (int64) 00615 // completed (int64) 00616 // 00617 // [if stat_kind == ReposStats::srpcTotal or ReposStats::nfsTotal] 00618 // 00619 // call_count (int64) 00620 // elapsed_secs (int64) 00621 // elapsed_usecs (int64) 00622 00623 MeasureDirectory, // see VestaSource::measureDirectory 00624 // Arguments: 00625 // longid (bytes) 32-byte LongId of the directory to 00626 // be measured 00627 // who (identity) 00628 // Results: 00629 // err (int) VestaSource::errorCode. If err != 00630 // VestaSource::ok, other results are omitted. 00631 // baseChainLength (int32) 00632 // usedEntryCount (int32) 00633 // usedEntrySize (int32) 00634 // totalEntryCount (int32) 00635 // totalEntrySize (int32) 00636 00637 CollapseBase, // see VestaSource::collapseBase 00638 // Arguments: 00639 // longid (bytes) 32-byte LongId of the directory to 00640 // have its base collapsed 00641 // who (identity) 00642 // Results: 00643 // err (int) VestaSource::errorCode. 00644 00645 SetPerfDebug, 00646 // Arguments: 00647 // who (identity) 00648 // settings (int64) bit mask of features to enable 00649 // Results: 00650 // settings (int64) features now enabled (0 if this 00651 // repository doesn't have performance 00652 // debugging code) 00653 00654 GetServerInfo, 00655 // Arguments: 00656 // who (identity) 00657 // Results: 00658 // version (chars) Server version string 00659 // startTime (int64) Server start time 00660 // uptime (int32) Server uptime in seconds 00661 00662 ReadWholeCompressed // see VestaSource::readWhole 00663 // Arguments: 00664 // longid (bytes) 32-byte LongId 00665 // who (identity) 00666 // methods (int16 array) 00667 // Compression methods supported by the 00668 // client. 00669 // max_bytes (int32) maximum number of bytes to receive 00670 // in a single chunk (i.e. size of the 00671 // buffer at the receiver) 00672 // Results: 00673 // err (int) VestaSource::errorCode. If err != 00674 // VestaSource::ok, other results are omitted. 00675 // method (int16) Compression method used 00676 // Returns an SRPC general sequence, using send_seq_* 00677 // No length information is passed with send_seq_start. 00678 // Each sequence element is: 00679 // buffer (bytes) compressed data in zlib format 00680 00681 }; 00682 00683 // Compression methods 00684 enum 00685 { 00686 // use zlib's deflate/inflate 00687 compress_zlib_deflate 00688 }; 00689 00690 // The default host an interface (i.e. that of the local 00691 // repository). 00692 Text defaultHost() throw(); 00693 Text defaultInterface() throw(); 00694 00695 // Get a connection to the local repository. 00696 MultiSRPC::ConnId Start(SRPC *&srpc) throw (SRPC::failure); 00697 // Get a connection to a repository. "host_interface" should be of 00698 // the form "hostname[:interface]". If the interface is omitted, 00699 // the default will be used. 00700 MultiSRPC::ConnId Start(SRPC *&srpc, 00701 const Text &host_interface) 00702 throw (SRPC::failure); 00703 // Get a connection to a repository. If either "hostname" or 00704 // "interface" are the empty string, the defaults will be used. 00705 MultiSRPC::ConnId Start(SRPC *&srpc, 00706 Text hostname, Text interface) 00707 throw (SRPC::failure); 00708 00709 // Return a previously obtained connection, making available for 00710 // use. 00711 void End(MultiSRPC::ConnId id) throw(); 00712 00713 // Marshall and transmit an AccessControl::Identity. 00714 void send_identity(SRPC* srpc, AccessControl::Identity who) 00715 throw(SRPC::failure); 00716 } 00717 00718 #endif //_VSSRPC