]> www.infradead.org Git - users/dhowells/kafs-utils.git/commitdiff
xg: More cleanups
authorDavid Howells <dhowells@redhat.com>
Wed, 25 Sep 2019 15:32:05 +0000 (16:32 +0100)
committerDavid Howells <dhowells@redhat.com>
Thu, 26 Sep 2019 09:56:00 +0000 (10:56 +0100)
More cleanups to the xg files.

Signed-off-by: David Howells <dhowells@redhat.com>
rpc-api/afsuuid.h
rpc-api/bos.xg
rpc-api/cb.xg
rpc-api/common.h
rpc-api/fs.xg
rpc-api/ka.xg
rpc-api/pts.xg
rpc-api/ubik.xg
rpc-api/vldb.xg

index a1e207d3f886dcae724bed40d1c660c6b29efc2e..ee74bdc366427cd065a7d8c69eb7d7db2655e566 100644 (file)
 #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_ */
index 2ba908533174288e4bfaf1530692eeb868b73bc9..be148c25a7235acc6081e47a91c5eddc2edc91e1 100644 (file)
@@ -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;
index 5fb0ebaea0c88da11fd541d13cf057c42047e3ea..5f09f939c8af7223946bb1b5eb25cc5c52236b7b 100644 (file)
@@ -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<AFSCB_MAX_XSTAT_LONGS>;
-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 uint32_t     addr_in[AFS_MAX_INTERFACE_ADDR]; /* interface addresses */
-       ASIS uint32_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 uint32_t   addr_in[AFS_MAX_INTERFACE_ADDR]; /* interface addresses */
+       ASIS uint32_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*/
index 78edb998cf8f9ddd7fb4b09750040c207b7ba194..e44faa5e49437ba1df9c4cd57c915887e7ecd58a 100644 (file)
 %#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<AFSOPAQUEMAX>;
 
-typedef int32_t ViceLockType;
+typedef uint32_t ViceLockType;
 
 const AFSCBMAX = 50;
 
@@ -164,13 +168,13 @@ typedef AFSFid AFSCBFids<AFSCBMAX>;
 
 /* 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<AFSCAPABILITIESMAX>;
+typedef uint32_t Capabilities<AFSCAPABILITIESMAX>;
 
 %#endif /* _COMMON_ */
index 21345279648b81c42f7833401dd8b235f3e78902..d89f929d303a9d30445e6d3eb2fa95c820a4829c 100644 (file)
@@ -164,38 +164,38 @@ GetRootVolume (OUT string a_rootVolNameP<AFSNAMEMAX>) = 151;
 GetTime (OUT uint32_t *a_secondsP,
         OUT uint32_t *a_uSecondsP) = 153;
 
-NGetVolumeInfo (IN  string VolumeName<AFSNAMEMAX>,
+NGetVolumeInfo (IN string VolumeName<AFSNAMEMAX>,
                 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;
index aa7e59d0d32f3a0cf4c6bb3eb6789eb6ccc0745b..05a94b4c069f39cf20f0769fa6832074b66cb307 100644 (file)
@@ -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<MAXKANAMELEN>;
 
 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;
 };
 
 
index 4283d994aafa1cec237dfabadd5c42545a463991..d5affd77836785b4ad3fbbf10c78071345096bce 100644 (file)
@@ -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<PR_MAXGROUPS>;
-       string name<PR_MAXNAMELEN>;
-       uint32_t entries<PR_MAXGROUPS>;
-};
-
 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<PR_MAXLIST>;
 
-typedef uint32_t idlist<PR_MAXLIST>;
+typedef int32_t idlist<PR_MAXLIST>;
 
-typedef uint32_t prlist<PR_MAXGROUPS>;
+typedef int32_t prlist<PR_MAXGROUPS>;
 
 
 /* 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<PR_MAXNAMELEN>,
         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<PR_MAXNAMELEN>,
-         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<PR_MAXNAMELEN>,
-           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;
index 72baa17265acb4beaabc1019ba496b390429db61..636edf7c22b2226177fcaf3fa8527892f09cef78 100644 (file)
@@ -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;
index db2fe906fe7d032ecb5d18918ccd7eada6c4e8dc..358c7591bea58ef3eefb216bfa47584bb6893161 100644 (file)
@@ -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<VL_MAX_BULK_ADDRS>;
+typedef uint32_t bulkaddrs<VL_MAX_BULK_ADDRS>;
 
 
 /*
@@ -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'.