From: David Howells Date: Fri, 10 Jan 2014 01:07:03 +0000 (+0000) Subject: xg: More cleanups X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=6da91ba087d941a94cd117b87def3b4aa42c31dd;p=users%2Fdhowells%2Fkafs-utils.git xg: More cleanups More cleanups to the xg files. Signed-off-by: David Howells --- diff --git a/rpc-api/afsuuid.h b/rpc-api/afsuuid.h index 0639e7b..acd2bb5 100644 --- a/rpc-api/afsuuid.h +++ b/rpc-api/afsuuid.h @@ -39,12 +39,12 @@ #endif struct afsUUID { - uint32_t time_low; - uint16_t time_mid; - uint16_t time_hi_and_version; - uint8_t clock_seq_hi_and_reserved; - uint8_t clock_seq_low; - char node[6]; + uint32_t time_low; + uint16_t time_mid; + uint16_t time_hi_and_version; + uint8_t clock_seq_hi_and_reserved; + uint8_t clock_seq_low; + uint8_t node[6]; } AFSUUID_GENERATE; %#endif /* _AFSUUID_COMMON_ */ diff --git a/rpc-api/bos.xg b/rpc-api/bos.xg index b5e63c6..2fb88c4 100644 --- a/rpc-api/bos.xg +++ b/rpc-api/bos.xg @@ -50,7 +50,7 @@ const BZIO = 39432; const BZNET = 39433; const BZBADTYPE = 39434; -const BOZO_BSSIZE = 256; +const BOZO_BSSIZE = 256; const BSTAT_SHUTDOWN = 0; const BSTAT_NORMAL = 1; diff --git a/rpc-api/cb.xg b/rpc-api/cb.xg index 9a1edb6..8402462 100644 --- a/rpc-api/cb.xg +++ b/rpc-api/cb.xg @@ -40,50 +40,53 @@ package RXAFSCB_ #include "common.h" struct AFSDBLockDesc { - uint8_t waitStates; - uint8_t exclLocked; - uint16_t readersReading; - uint16_t numWaiting; - uint16_t spare; - int32_t pid_last_reader; - int32_t pid_writer; - int32_t src_indicator; + uint8_t waitStates; + uint8_t exclLocked; + uint16_t readersReading; + uint16_t numWaiting; + uint16_t spare; + int32_t pid_last_reader; + int32_t pid_writer; + int32_t src_indicator; }; struct AFSDBLock { - char name[16]; + char name[16]; struct AFSDBLockDesc lock; }; struct AFSDBCacheEntry { - int32_t addr; - int32_t cell; /*Cell part of the fid*/ - AFSFid netFid; /*Network part of the fid*/ - int32_t Length; - int32_t DataVersion; + int32_t addr; + int32_t cell; /*Cell part of the fid*/ + AFSFid netFid; /*Network part of the fid*/ + int32_t Length; + int32_t DataVersion; struct AFSDBLockDesc lock; - int32_t callback; - int32_t cbExpires; - uint16_t refCount; - uint16_t opens; - uint16_t writers; - uint8_t mvstat; - uint8_t states; + int32_t callback; + int32_t cbExpires; + uint16_t refCount; + uint16_t opens; + uint16_t writers; + uint8_t mvstat; + uint8_t states; }; const AFSCB_MAX_XSTAT_LONGS = 2048; + typedef int32_t AFSCB_CollData; -const AFSCB_XSTATSCOLL_CALL_INFO = 0; /*CM call counting & info*/ -const AFSCB_XSTATSCOLL_PERF_INFO = 1; /*CM performance info*/ -const AFSCB_XSTATSCOLL_FULL_PERF_INFO = 2; /*CM performance info*/ -const AFS_MAX_INTERFACE_ADDR = 32; +const AFSCB_XSTATSCOLL_CALL_INFO = 0; /* CM call counting & info */ +const AFSCB_XSTATSCOLL_PERF_INFO = 1; /* CM performance info */ +const AFSCB_XSTATSCOLL_FULL_PERF_INFO = 2; /* CM performance info */ + +const AFS_MAX_INTERFACE_ADDR = 32; + struct interfaceAddr { /* for multihomed clients */ - int32_t numberOfInterfaces; - afsUUID uuid; - ASIS int32_t addr_in[AFS_MAX_INTERFACE_ADDR]; /* interface addresses */ - ASIS int32_t subnetmask[AFS_MAX_INTERFACE_ADDR]; /* subnet masks in net ord */ - int32_t mtu[AFS_MAX_INTERFACE_ADDR]; /* MTU */ + int32_t numberOfInterfaces; + afsUUID uuid; + ASIS int32_t addr_in[AFS_MAX_INTERFACE_ADDR]; /* interface addresses */ + ASIS int32_t subnetmask[AFS_MAX_INTERFACE_ADDR]; /* subnet masks in net ord */ + int32_t mtu[AFS_MAX_INTERFACE_ADDR]; /* MTU */ }; const AFSMAXCELLHOSTS = 8; /*Max VLDB servers per cell*/ diff --git a/rpc-api/common.h b/rpc-api/common.h index b5dc2ee..f16a06d 100644 --- a/rpc-api/common.h +++ b/rpc-api/common.h @@ -36,16 +36,16 @@ %#ifndef _COMMON_ %#define _COMMON_ -const LockRead = 0; -const LockWrite = 1; -const LockExtend = 2; -const LockRelease = 3; +const LockRead = 0; +const LockWrite = 1; +const LockExtend = 2; +const LockRelease = 3; const AFSNAMEMAX = 256; -const RWVOL = 0; -const ROVOL = 1; -const BACKVOL = 2; +const RWVOL = 0; +const ROVOL = 1; +const BACKVOL = 2; struct AFSFid { uint32_t Volume; @@ -54,8 +54,8 @@ struct AFSFid { }; struct VenusFid { - int32_t Cell; - AFSFid fid; + int32_t Cell; + AFSFid fid; }; struct AFSCallBack { @@ -64,7 +64,11 @@ struct AFSCallBack { uint32_t CallBackType; }; -enum CallBackType { CBEXCLUSIVE = 1, CBSHARED = 2, CBDROPPED = 3}; +enum CallBackType { + CBEXCLUSIVE = 1, + CBSHARED = 2, + CBDROPPED = 3 +}; const CALLBACK_VERSION = 1; @@ -87,8 +91,8 @@ struct AFSFetchStatus { uint32_t LinkCount; uint32_t Length; uint32_t DataVersion; - uint32_t Author; - uint32_t Owner; + int32_t Author; + int32_t Owner; uint32_t CallerAccess; uint32_t AnonymousAccess; uint32_t UnixModeBits; @@ -99,7 +103,7 @@ struct AFSFetchStatus { uint32_t ServerModTime; uint32_t Group; uint32_t SyncCounter; - uint32_t DataVersionHigh; /* For AFS/DFS translator */ + uint32_t DataVersionHigh; uint32_t LockCount; uint32_t LengthHigh; uint32_t ErrorCode; @@ -114,7 +118,7 @@ const SS_OWNER = 0x02 ; const SS_GROUP = 0x04 ; const SS_MODEBITS = 0x08 ; const SS_SEGSIZE = 0x10 ; -const SS_FSYNC = 0x400; /* 1024 */ +const SS_FSYNC = 0x400; struct AFSStoreStatus { @@ -127,24 +131,24 @@ struct AFSStoreStatus { }; struct AFSFetchVolumeStatus { - int32_t Vid; - int32_t ParentId; - uint8_t Online; - uint8_t InService; - uint8_t Blessed; - uint8_t NeedsSalvage; - int32_t Type; - int32_t MinQuota; - int32_t MaxQuota; - int32_t BlocksInUse; - int32_t PartBlocksAvail; - int32_t PartMaxBlocks; + int32_t Vid; + int32_t ParentId; + uint8_t Online; + uint8_t InService; + uint8_t Blessed; + uint8_t NeedsSalvage; + int32_t Type; + int32_t MinQuota; + int32_t MaxQuota; + int32_t BlocksInUse; + int32_t PartBlocksAvail; + int32_t PartMaxBlocks; }; struct AFSStoreVolumeStatus { - int32_t Mask; - int32_t MinQuota; - int32_t MaxQuota; + int32_t Mask; + int32_t MinQuota; + int32_t MaxQuota; }; const AFS_SETMINQUOTA = 1; @@ -154,7 +158,7 @@ const AFSOPAQUEMAX = 1024; typedef opaque AFSOpaque; -typedef int32_t ViceLockType; +typedef uint32_t ViceLockType; const AFSCBMAX = 50; @@ -164,13 +168,13 @@ typedef AFSFid AFSCBFids; /* Definitions for ACLs */ -const PRSFS_READ = 1 ; /* Read files */ -const PRSFS_WRITE = 2 ; /* Write files & write-lock existing files */ -const PRSFS_INSERT = 4 ; /* Insert & write-lock new files */ -const PRSFS_LOOKUP = 8 ; /* Enumerate files and examine ACL */ -const PRSFS_DELETE = 16 ; /* Remove files */ -const PRSFS_LOCK = 32 ; /* Read-lock files */ -const PRSFS_ADMINISTER = 64 ; /* Set access list of directory */ +const PRSFS_READ = 1; /* Read files */ +const PRSFS_WRITE = 2; /* Write files & write-lock existing files */ +const PRSFS_INSERT = 4; /* Insert & write-lock new files */ +const PRSFS_LOOKUP = 8; /* Enumerate files and examine ACL */ +const PRSFS_DELETE = 16; /* Remove files */ +const PRSFS_LOCK = 32; /* Read-lock files */ +const PRSFS_ADMINISTER = 64; /* Set access list of directory */ struct AFSVolumeInfo { uint32_t Vid; @@ -203,6 +207,6 @@ struct AFSVolumeInfo { const AFSCAPABILITIESMAX = 196; -typedef int32_t Capabilities; +typedef uint32_t Capabilities; %#endif /* _COMMON_ */ diff --git a/rpc-api/fs.xg b/rpc-api/fs.xg index ca4ed9c..c297163 100644 --- a/rpc-api/fs.xg +++ b/rpc-api/fs.xg @@ -164,38 +164,38 @@ GetRootVolume (OUT string a_rootVolNameP) = 151; GetTime (OUT uint32_t *a_secondsP, OUT uint32_t *a_uSecondsP) = 153; -NGetVolumeInfo (IN string VolumeName, +NGetVolumeInfo (IN string VolumeName, OUT AFSVolumeInfo *stuff) = 154; -BulkStatus (IN AFSCBFids *FidsArray, +BulkStatus (IN AFSCBFids *FidsArray, OUT AFSBulkStats *StatArray, OUT AFSCBs *CBArray, OUT AFSVolSync *Sync) = 155; -SetLock (IN AFSFid *Fid, - IN ViceLockType Type, +SetLock (IN AFSFid *Fid, + IN ViceLockType Type, OUT AFSVolSync *Sync) = 156; -ExtendLock (IN AFSFid *Fid, +ExtendLock (IN AFSFid *Fid, OUT AFSVolSync *Sync) = 157; -ReleaseLock (IN AFSFid *Fid, +ReleaseLock (IN AFSFid *Fid, OUT AFSVolSync *Sync) = 158; -FlushCPS (IN ViceIds *IdsArray, +FlushCPS (IN ViceIds *IdsArray, IN IPAddrs *AddrsArray, IN int32_t spare1, OUT int32_t *spare2, OUT int32_t *spare3) = 162; -FetchData64 (IN AFSFid *Fid, +FetchData64 (IN AFSFid *Fid, IN int64_t Pos, IN int64_t Length, OUT AFSFetchStatus *OutStatus, OUT AFSCallBack *CallBack, OUT AFSVolSync *Sync) split = 65537; -StoreData64 (IN AFSFid *Fid, +StoreData64 (IN AFSFid *Fid, IN AFSStoreStatus *InStatus, IN uint64_t Pos, IN uint64_t Length, @@ -203,6 +203,6 @@ StoreData64 (IN AFSFid *Fid, OUT AFSFetchStatus *OutStatus, OUT AFSVolSync *Sync) split = 65538; -GiveUpAllCallBacks () = 65539 ; +GiveUpAllCallBacks () = 65539; GetCapabilities(OUT Capabilities *capabilities) = 65540; diff --git a/rpc-api/ka.xg b/rpc-api/ka.xg index 79aebab..bcf982c 100644 --- a/rpc-api/ka.xg +++ b/rpc-api/ka.xg @@ -54,7 +54,6 @@ const GETTICKET = 23; const MAXKAKVNO = 127; /* Flags (note 0 is illegal) */ - const KAFNORMAL = 0x1; /* For the two following the KAFNORMAL MUST not be set */ const KAFREE = 0x2; /* on freelist */ @@ -72,77 +71,73 @@ const KAFNOCPW = 0x040; /* can't change password */ const KAFNEWASSOC = 0x080; /* can create associates */ /* MISC stuff */ - const KAMAJORVERSION = 5; const KAMINORVERSION = 1; const NEVERDATE = 037777777777; const KADEBUGKCINFOSIZE = 25; -#define Date uint32_t - /* Error codes */ -const KADATABASEINCONSISTENT = 180480; -const KAEXIST = 180481; -const KAIO = 180482; -const KACREATEFAIL = 180483; -const KANOENT = 180484; -const KAEMPTY = 180485; -const KABADNAME = 180486; -const KABADINDEX = 180487; -const KANOAUTH = 180488; -const KAANSWERTOOLONG = 180489; -const KABADREQUEST = 180490; -const KAOLDINTERFACE = 180491; -const KABADARGUMENT = 180492; -const KABADCMD = 180493; -const KANOKEYS = 180494; -const KAREADPW = 180495; -const KABADKEY = 180496; -const KAUBIKINIT = 180497; -const KAUBIKCALL = 180498; -const KABADPROTOCOL = 180499; -const KANOCELLS = 180500; -const KANOCELL = 180501; -const KATOOMANYUBIKS = 180502; -const KATOOMANYKEYS = 180503; -const KABADTICKET = 180504; -const KAUNKNOWNKEY = 180505; -const KAKEYCACHEINVALID = 180506; -const KABADSERVER = 180507; -const KABADUSER = 180508; -const KABADCPW = 180509; -const KABADCREATE = 180510; -const KANOTICKET = 180511; -const KAASSOCUSER = 180512; -const KANOTSPECIAL = 180513; -const KACLOCKSKEW = 180514; -const KANORECURSE = 180515; -const KARXFAIL = 180516; -const KANULLPASSWORD = 180517; -const KAINTERNALERROR = 180518; -const KAPWEXPIRED = 180519; -const KAREUSED = 180520; -const KATOOSOON = 180521; -const KALOCKED = 180522; +const KADATABASEINCONSISTENT = 180480; +const KAEXIST = 180481; +const KAIO = 180482; +const KACREATEFAIL = 180483; +const KANOENT = 180484; +const KAEMPTY = 180485; +const KABADNAME = 180486; +const KABADINDEX = 180487; +const KANOAUTH = 180488; +const KAANSWERTOOLONG = 180489; +const KABADREQUEST = 180490; +const KAOLDINTERFACE = 180491; +const KABADARGUMENT = 180492; +const KABADCMD = 180493; +const KANOKEYS = 180494; +const KAREADPW = 180495; +const KABADKEY = 180496; +const KAUBIKINIT = 180497; +const KAUBIKCALL = 180498; +const KABADPROTOCOL = 180499; +const KANOCELLS = 180500; +const KANOCELL = 180501; +const KATOOMANYUBIKS = 180502; +const KATOOMANYKEYS = 180503; +const KABADTICKET = 180504; +const KAUNKNOWNKEY = 180505; +const KAKEYCACHEINVALID = 180506; +const KABADSERVER = 180507; +const KABADUSER = 180508; +const KABADCPW = 180509; +const KABADCREATE = 180510; +const KANOTICKET = 180511; +const KAASSOCUSER = 180512; +const KANOTSPECIAL = 180513; +const KACLOCKSKEW = 180514; +const KANORECURSE = 180515; +const KARXFAIL = 180516; +const KANULLPASSWORD = 180517; +const KAINTERNALERROR = 180518; +const KAPWEXPIRED = 180519; +const KAREUSED = 180520; +const KATOOSOON = 180521; +const KALOCKED = 180522; struct ka_CBS { - opaque Seq<>; + opaque Seq<>; }; struct ka_BBS { - int32_t MaxSeqLen; - opaque Seq<>; + int32_t MaxSeqLen; + opaque Seq<>; }; struct EncryptionKey { uint8_t key[8]; }; -const MAXKANAMELEN = 64; -#define MAXKANAMELEN 64 -const KA_LABELSIZE = 4; +const MAXKANAMELEN = 64; +const KA_LABELSIZE = 4; %#ifndef MAXKTCTICKETLEN const MAXKTCTICKETLEN = 344; @@ -151,24 +146,26 @@ const MAXKTCTICKETLEN = 344; typedef string kaname; struct kaident { - char name[MAXKANAMELEN]; - char instance[MAXKANAMELEN]; + char name[MAXKANAMELEN]; + char instance[MAXKANAMELEN]; }; +typedef uint32_t Date; + struct kaentryinfo { - int32_t minor_version; - int32_t flags; - uint32_t user_expiration; - Date modification_time; - kaident modification_user; - Date change_password_time; - uint32_t max_ticket_lifetime; - uint32_t key_version; - EncryptionKey key; - uint32_t keyCheckSym; - int32_t reserved2; - int32_t reserved3; - int32_t reserved4; + uint32_t minor_version; + uint32_t flags; + uint32_t user_expiration; + Date modification_time; + kaident modification_user; + Date change_password_time; + uint32_t max_ticket_lifetime; + uint32_t key_version; + EncryptionKey key; + uint32_t keyCheckSym; + uint32_t reserved2; + uint32_t reserved3; + uint32_t reserved4; }; diff --git a/rpc-api/pts.xg b/rpc-api/pts.xg index 6798401..cd6c5d2 100644 --- a/rpc-api/pts.xg +++ b/rpc-api/pts.xg @@ -39,29 +39,28 @@ package PR_ /* Opcodes */ -const PRINEWUSER = 500; -const PRWHEREISIT = 501; -const PRDUMPENTRY = 502; -const PRADDTOGROUP = 503; -const PRNAMETOUID = 504; -const PRIDTONAME = 505; -const PRDELETE = 506; -const PRREMOVEFROMGROUP = 507; -const PRGETCPS = 508; -const PRNEWENTRY = 509; -const PRLISTMAX = 510; -const PRSETMAX = 511; -const PRLISTENTRY = 512; -const PRCHANGEENTRY = 513; -const PRLISTELEMENTS = 514; -const PROSAMEMBEROF = 515; -const PRSETFIELDSENTRY = 516; -const PRLISTOWNED = 517; -const PRGETCPS2 = 518; -const PRGETHOSTCPS = 519; +const PRINEWUSER = 500; +const PRWHEREISIT = 501; +const PRDUMPENTRY = 502; +const PRADDTOGROUP = 503; +const PRNAMETOUID = 504; +const PRIDTONAME = 505; +const PRDELETE = 506; +const PRREMOVEFROMGROUP = 507; +const PRGETCPS = 508; +const PRNEWENTRY = 509; +const PRLISTMAX = 510; +const PRSETMAX = 511; +const PRLISTENTRY = 512; +const PRCHANGEENTRY = 513; +const PRLISTELEMENTS = 514; +const PROSAMEMBEROF = 515; +const PRSETFIELDSENTRY = 516; +const PRLISTOWNED = 517; +const PRGETCPS2 = 518; +const PRGETHOSTCPS = 519; /* Constants */ - const PR_MAXNAMELEN = 64; const PR_MAXGROUPS = 5000; const PR_MAXLIST = 5000; @@ -74,87 +73,56 @@ const HASHSIZE = 8191; const PRDBVERSION = 0; /* Bits for PR_SetFieldsEntry() */ - -const PR_SF_NGROUPS = 0x80000000; -const PR_SF_NUSERS = 0x40000000; -const PR_SF_ALLBITS = 0xff; +const PR_SF_NGROUPS = 0x80000000; +const PR_SF_NUSERS = 0x40000000; +const PR_SF_ALLBITS = 0xff; /* Reserved IDs */ -const PR_SYSADMINID = -204; -const PR_ANYUSERID = -101; -const PR_AUTHUSERID = -102; -const PR_ANONYMOUSID = 32766; -const PR_BADID = 0x80000000; +const PR_SYSADMINID = -204; +const PR_ANYUSERID = -101; +const PR_AUTHUSERID = -102; +const PR_ANONYMOUSID = 32766; +const PR_BADID = 0x80000000; /* Bits for struct prentry flags */ -const PRTYPE = 0x3f; -const PRFREE = 1; -const PRGRP = 2; -const PRCONT = 4; -const PRCELL = 8; -const PRFOREIGN = 16; -const PRINST = 32; -const PRUSER = 0; - -const PRACCESS = 0x40; -const PRQUOTA = 0x80; +const PRTYPE = 0x3f; +const PRFREE = 1; +const PRGRP = 2; +const PRCONT = 4; +const PRCELL = 8; +const PRFOREIGN = 16; +const PRINST = 32; +const PRUSER = 0; + +const PRACCESS = 0x40; +const PRQUOTA = 0x80; /* Privacy Bits */ -const PRP_REMOVE_MEM = 0x010000; -const PRP_ADD_MEM = 0x020000; -const PRP_ADD_ANY = 0x040000; -const PRP_MEMBER_MEM = 0x080000; -const PRP_MEMBER_ANY = 0x100000; -const PRP_OWNED_ANY = 0x200000; -const PRP_STATUS_MEM = 0x400000; -const PRP_STATUS_ANY = 0x800000; +const PRP_REMOVE_MEM = 0x010000; +const PRP_ADD_MEM = 0x020000; +const PRP_ADD_ANY = 0x040000; +const PRP_MEMBER_MEM = 0x080000; +const PRP_MEMBER_ANY = 0x100000; +const PRP_OWNED_ANY = 0x200000; +const PRP_STATUS_MEM = 0x400000; +const PRP_STATUS_ANY = 0x800000; /* Misc */ const PRSUCCESS = 0; const PR_REMEMBER_TIMES = 1; - -struct prheader { - uint32_t version; - uint32_t headerSize; - uint32_t freePtr; - uint32_t eofPtr; - uint32_t maxGroup; - uint32_t maxID; - uint32_t maxForeign; - uint32_t maxInst; - uint32_t orphan; - uint32_t usercount; - uint32_t groupcount; - uint32_t foreigncount; - uint32_t instcount; - uint32_t reserved[5]; - uint32_t nameHash[HASHSIZE]; - uint32_t idHash[HASHSIZE]; -}; - -struct prheader_disk { - uint32_t version; - uint32_t headerSize; - uint32_t maxGroup; - uint32_t maxID; - uint32_t orphan<>; - uint32_t usercount; - uint32_t groupcount; -}; - struct prentry { uint32_t flags; - uint32_t id; + int32_t id; uint32_t cellid; uint32_t next; uint32_t reserved[5]; - uint32_t entries[PRSIZE]; + int32_t entries[PRSIZE]; uint32_t nextID; uint32_t nextName; - uint32_t owner; - uint32_t creator; + int32_t owner; + int32_t creator; uint32_t ngroups; uint32_t nusers; uint32_t count; @@ -167,29 +135,17 @@ struct prentry { char name[PR_MAXNAMELEN]; }; -struct prentry_disk { - uint32_t flags; - uint32_t id; - uint32_t cellid; - uint32_t owner; - uint32_t creator; - uint32_t ngroups; - uint32_t owned; - string name; - uint32_t entries; -}; - struct prdebugentry { uint32_t flags; - uint32_t id; + int32_t id; uint32_t cellid; uint32_t next; uint32_t reserved[5]; - uint32_t entries[PRSIZE]; + int32_t entries[PRSIZE]; uint32_t nextID; uint32_t nextname; - uint32_t owner; - uint32_t creator; + int32_t owner; + int32_t creator; uint32_t ngroups; uint32_t nusers; uint32_t count; @@ -204,9 +160,9 @@ struct prdebugentry { struct prcheckentry { uint32_t flags; - uint32_t id; - uint32_t owner; - uint32_t creator; + int32_t id; + int32_t owner; + int32_t creator; uint32_t ngroups; uint32_t nusers; uint32_t count; @@ -219,28 +175,28 @@ typedef char prname[PR_MAXNAMELEN]; typedef prname namelist; -typedef uint32_t idlist; +typedef int32_t idlist; -typedef uint32_t prlist; +typedef int32_t prlist; /* Error codes */ -const PREXIST = 267264 ; -const PRIDEXIST = 267265 ; -const PRNOIDS = 267266 ; -const PRDBFAIL = 267267 ; -const PRNOENT = 267268 ; -const PRPERM = 267269 ; -const PRNOTGROUP = 267270 ; -const PRNOTUSER = 267271 ; -const PRBADNAM = 267272 ; -const PRBADARG = 267273 ; -const PRNOMORE = 267274 ; -const PRDBBAD = 267275 ; -const PRGROUPEMPTY = 267276 ; -const PRINCONSISTENT = 267277 ; -const PRBADDR = 267278 ; -const PRTOOMANY = 267279 ; +const PREXIST = 267264; +const PRIDEXIST = 267265; +const PRNOIDS = 267266; +const PRDBFAIL = 267267; +const PRNOENT = 267268; +const PRPERM = 267269; +const PRNOTGROUP = 267270; +const PRNOTUSER = 267271; +const PRBADNAM = 267272; +const PRBADARG = 267273; +const PRNOMORE = 267274; +const PRDBBAD = 267275; +const PRGROUPEMPTY = 267276; +const PRINCONSISTENT = 267277; +const PRBADDR = 267278; +const PRTOOMANY = 267279; NameToID(IN namelist *nlist, @@ -251,25 +207,25 @@ IDToName(IN idlist *ilist, NewEntry(IN string name, IN uint32_t flag, - IN uint32_t oid, - OUT uint32_t *id) = 509; + IN int32_t oid, + OUT int32_t *id) = 509; INewEntry(IN string name, - IN uint32_t id, - IN uint32_t oid) = 500; + IN int32_t id, + IN int32_t oid) = 500; -ListEntry(IN uint32_t id, +ListEntry(IN int32_t id, OUT struct prcheckentry *entry) = 512; DumpEntry(IN uint32_t pos, OUT struct prdebugentry *entry) = 502; -ChangeEntry(IN uint32_t id, +ChangeEntry(IN int32_t id, IN string name, - IN uint32_t oid, - IN uint32_t newid) = 513; + IN int32_t oid, + IN int32_t newid) = 513; -SetFieldsEntry(IN uint32_t id, +SetFieldsEntry(IN int32_t id, IN uint32_t mask, IN uint32_t flags, IN uint32_t ngroups, @@ -287,40 +243,40 @@ SetFieldsEntry(IN uint32_t id, * Sucess: PRSUCCESS. */ -Delete(IN uint32_t id) = 506; +Delete(IN int32_t id) = 506; -WhereIsIt(IN uint32_t id, +WhereIsIt(IN int32_t id, OUT uint32_t *ps) = 501; -AddToGroup(IN uint32_t uid, - IN uint32_t gid) = 503; +AddToGroup(IN int32_t uid, + IN int32_t gid) = 503; -RemoveFromGroup(IN uint32_t id, - IN uint32_t gid) = 507; +RemoveFromGroup(IN int32_t id, + IN int32_t gid) = 507; -ListMax(OUT uint32_t *uid, - OUT uint32_t *gid) = 510; +ListMax(OUT int32_t *uid, + OUT int32_t *gid) = 510; -SetMax(IN uint32_t uid, +SetMax(IN int32_t uid, IN uint32_t gflag) = 511; -ListElements(IN uint32_t id, +ListElements(IN int32_t id, OUT prlist *elist, OUT uint32_t *over) = 514; -GetCPS(IN uint32_t id, +GetCPS(IN int32_t id, OUT prlist *elist, OUT uint32_t *over) = 508; -ListOwned(IN uint32_t id, +ListOwned(IN int32_t id, OUT prlist *elist, INOUT uint32_t *over) = 517; -IsAMemberOf(IN uint32_t uid, - IN uint32_t gid, +IsAMemberOf(IN int32_t uid, + IN int32_t gid, OUT uint32_t *flag) = 515; -GetCPS2(IN uint32_t id, +GetCPS2(IN int32_t id, IN uint32_t host, OUT prlist *elist, OUT uint32_t *over) = 518; diff --git a/rpc-api/ubik.xg b/rpc-api/ubik.xg index d827c7c..317d8a2 100644 --- a/rpc-api/ubik.xg +++ b/rpc-api/ubik.xg @@ -45,48 +45,47 @@ const UBIK_MAX_INTERFACE_ADDR = 256; /* max interfaces per server */ typedef net_tid net_version; struct ubik_debug { - uint32_t now; - uint32_t lastYesTime; - uint32_t lastYesHost; - uint32_t lastYesState; - uint32_t lastYesClaim; - uint32_t lowestHost; - uint32_t lowestTime; - uint32_t syncHost; - uint32_t syncTime; - net_version syncVersion; - net_tid syncTid; - uint32_t amSyncSite; - uint32_t syncSiteUntil; - uint32_t nServers; - uint32_t lockedPages; - uint32_t writeLockedPages; - net_version localVersion; - uint32_t activeWrite; - uint32_t tidCounter; - uint32_t anyReadLocks; - uint32_t anyWriteLocks; - uint32_t recoveryState; - uint32_t currentTrans; - uint32_t writeTrans; - uint32_t epochTime; + uint32_t now; + uint32_t lastYesTime; + uint32_t lastYesHost; + uint32_t lastYesState; + uint32_t lastYesClaim; + uint32_t lowestHost; + uint32_t lowestTime; + uint32_t syncHost; + uint32_t syncTime; + net_version syncVersion; + net_tid syncTid; + uint32_t amSyncSite; + uint32_t syncSiteUntil; + uint32_t nServers; + uint32_t lockedPages; + uint32_t writeLockedPages; + net_version localVersion; + uint32_t activeWrite; + uint32_t tidCounter; + uint32_t anyReadLocks; + uint32_t anyWriteLocks; + uint32_t recoveryState; + uint32_t currentTrans; + uint32_t writeTrans; + uint32_t epochTime; }; struct ubik_sdebug { - uint32_t addr; - uint32_t lastVoteTime; - uint32_t lastBeaconSent; - uint32_t lastVote; - net_version remoteVersion; - uint32_t currentDB; - uint32_t beaconSinceDown; - uint32_t up; - uint32_t altAddr[255]; /*alternate addresses:host byte */ - /*this is actually UBIK_MAX_INTERFACE_ADDR-1*/ + uint32_t addr; + uint32_t lastVoteTime; + uint32_t lastBeaconSent; + uint32_t lastVote; + net_version remoteVersion; + uint32_t currentDB; + uint32_t beaconSinceDown; + uint32_t up; + uint32_t altAddr[255]; /*alternate addresses:host byte */ + /*this is actually UBIK_MAX_INTERFACE_ADDR-1*/ }; - /* Opcodes */ const VOTE_BEACON = 10000; const VOTE_DEBUG = 10001; diff --git a/rpc-api/vldb.xg b/rpc-api/vldb.xg index b8e0384..6e72078 100644 --- a/rpc-api/vldb.xg +++ b/rpc-api/vldb.xg @@ -130,7 +130,6 @@ const VL_INDEXERANGE = 363549; const VL_MULTIPADDR = 363550; const VL_BADMASK = 363551; - /* Opcodes */ const VLCREATEENTRY = 501; const VLDELETEENTRY = 502; @@ -218,7 +217,7 @@ struct vital_vlheader { }; -const VLUPDATE_VOLUMENAME = 0x1; +const VLUPDATE_VOLUMENAME = 0x1; const VLUPDATE_FLAGS = 0x4; const VLUPDATE_READONLYID = 0x8; const VLUPDATE_BACKUPID = 0x10; @@ -251,17 +250,17 @@ struct VldbUpdateEntry { }; /* bit mask for VldbListByAttributes.Mask */ -const VLLIST_SERVER = 0x1; -const VLLIST_PARTITION = 0x2; -/* 0x4 was VLLIST_VOLUMETYPE but now it seems to be depricated */ -const VLLIST_VOLUMEID = 0x8; -const VLLIST_FLAG = 0x10; +const VLLIST_SERVER = 0x1; +const VLLIST_PARTITION = 0x2; +/* 0x4 was VLLIST_VOLUMETYPE but now it seems to be deprecated */ +const VLLIST_VOLUMEID = 0x8; +const VLLIST_FLAG = 0x10; struct VldbListByAttributes { uint32_t Mask; uint32_t server; uint32_t partition; - uint32_t volumetype; /* depricated */ + uint32_t volumetype; /* deprecated */ uint32_t volumeid; uint32_t flag; }; @@ -306,12 +305,12 @@ struct vldstats { uint32_t reserved[5]; }; -const VL_MAX_BULK_ADDRS = 1024 ; +const VL_MAX_BULK_ADDRS = 1024; typedef vldbentry bulkentries<>; typedef nvldbentry nbulkentries<>; typedef uvldbentry ubulkentries<>; -typedef int32_t bulkaddrs; +typedef uint32_t bulkaddrs; /* @@ -494,17 +493,17 @@ const VL_UUID_data_INVALID = 1; const VL_UUID_data_IPV6 = 1; struct VL_UUID_data { - opaque ipv6_addr<128>; - int32_t ipv6_mtu; + opaque ipv6_addr<128>; + int32_t ipv6_mtu; }; const VL_UUID_data_GSSAPI_name = 2; struct VL_UUID_data_gss_name { - opaque gss_name<>; + opaque gss_name<>; }; /* - * `uuid' is the uuid we query information the diffrent types are in + * `uuid' is the uuid we query information the different types are in * `query'. * * For each `query'-item there can be one or more items in `reply'.