diff --git a/include/nwnss/support/lnxmbINC/bindery.h b/include/nwnss/support/lnxmbINC/bindery.h new file mode 100644 index 0000000..31d5d17 --- /dev/null +++ b/include/nwnss/support/lnxmbINC/bindery.h @@ -0,0 +1,194 @@ +#ifndef __BINDERY_H__ +#define __BINDERY_H__ +/***************************************************************************** + * + * (C) Copyright 1986-1994 Novell, Inc. + * All Rights Reserved. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of version 2 of the GNU General Public + * License as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, contact Novell, Inc. + * + * To contact Novell about this file by physical or electronic mail, + * you may find current contact information at www.novell.com + * + * $RCSfile$ + * $Date: 2004-12-31 01:10:58 +0530 (Fri, 31 Dec 2004) $ + * $Revision: 465 $ + * + ****************************************************************************/ + +/* + BINDERY DEFINITION + NETWARE 386 +*/ + + +#define ITEMPROP 0 +#define GROUPPROP 2 + +struct ObjectStructure +{ + LONG ObjectID; /* Unique ID number of object (0=FREE) */ + WORD ObjectType; /* Object type */ + BYTE ObjectName [48]; /* Object name */ + BYTE ObjectFlags; /* Bits as follows: + 0x01 Set = Dynamic, Clear = Static */ + BYTE ObjectSecurity; /* (Same as propstruct.security) below */ + LONG FirstPropertyID; /* ID of first property of object */ + LONG HashLink; +}; + +struct PropertyStructure +{ + LONG PropertyID; /* Unique ID of property (0=FREE) */ + BYTE PropertyName[16]; + BYTE PropertyFlags; /* 0x01 Set = Dynamic, Clear = Static + 0x02 Set = Group, Clear = Item/non-group */ + BYTE PropertySecurity; /* Read security: + 0xn0 = R by anyone + 0xn1 = R by anyone logged in + 0xn2 = R by Object or Supervisor + 0xn3 = R by Supervisor only + 0xn4 = R by Bindery only + + Write Security: + 0x0n = W by anyone + 0x1n = W by anyone logged in + 0x2n = W by Object or Supervisor + 0x3n = W by Supervisor only + 0x4n = W by Bindery only + */ + + LONG OwnerObjectID; /* Unique ID of owning object */ + LONG NextPropertyID; /* Link to next property node */ + LONG FirstValueID; /* Unique ID of first value node */ +}; + +struct ValueStructure +{ + LONG ValueID; + LONG OwnerPropertyID; /* Offset of owning property head */ + LONG NextValueID; /* Link to next value field */ + WORD SetNumber; /* Set number (1-0xFFFF) of this value node */ + BYTE ValueData[128]; /* portion ((set# - 1) * 128) of value */ +}; + +/* Definition of bindery login control structure */ +struct PassCtrlStruct +{ + BYTE Exp_Date[3]; + BYTE Acct_Expired; + BYTE Pass_Date[3]; + BYTE Pass_Grace; + WORD Exp_Interval; + BYTE Grace_Reset; + BYTE Min_Pass_Length; + WORD Max_Connections; + BYTE Time_BitMap[42]; + BYTE Last_Log_Time[6]; + BYTE RestrictionFlags; + BYTE UnknownInfo; + LONG MaxDiskBlocks; + WORD BadLogCount; + LONG NextResetTime; + BYTE BadStnAddress[12]; +}; + +/****************************************************************************/ +/* BIT DEFINITIONS */ + +#define READ_RIGHTS_MASK 0x0F +#define RFREE 0x00 +#define RANYONE 0x01 +#define ROBJECT 0x02 +#define RSUPER 0x03 +#define RBINDER 0x04 + +#define WRITE_RIGHTS_MASK 0xF0 +#define WFREE 0x00 +#define WANYONE 0x10 +#define WOBJECT 0x20 +#define WSUPER 0x30 +#define WBINDER 0x40 + +#define RMASK 0x0F +#define WMASK 0xF0 + +#define FDYNAMIC 0x01 +#define FGROUP 0x02 + +#define CHECK 0xFF +#define NOCHECK 0x00 + +/****************************************************************************/ +/* TYPE DEFINITIONS FOR OBJECTS */ + +#define TUNKNOWN 0 +#define TUSER 0x0100 +#define TUSERGROUP 0x0200 +#define TPRINTQ 0x0300 +#define TFILE_SERVER 0x0400 +#define TWILDCARD -1 + + +#define STATIC 0 +#define DYNAMIC 1 + + +/****************************************************************************/ + +/* External variable definitions */ + +extern BYTE BinderyOpen; +extern BYTE EnableAccounting; +extern LONG BinderSem; +extern LONG SuperID; +extern LONG ServerID; +extern int *BindHashTable; +extern LONG NumObjects; +extern int ObjectAvailQueue; +extern LONG NumProperties; +extern int PropertyAvailQueue; +extern LONG NumValues; +extern int ValueAvailQueue; + +extern BYTE *ACCT_LOCKOUT; +extern BYTE *BACK_LINKS; +extern BYTE *BALANCE; +extern BYTE *BLOCKS_READ; +extern BYTE *BLOCKS_WRITTEN; +extern BYTE *CONNECT_TIME; +extern BYTE *DISK_STORAGE; +extern BYTE *HOLD; +extern BYTE *HOME_DIRECTORY; +extern BYTE *LOG_CONTROL; +extern BYTE *MANAGERS; +extern BYTE *MEMBERS; +extern BYTE *MYGROUPPROP; +extern BYTE *NET_ADDRESS; +extern BYTE *NODE_CONTROL; +extern BYTE *OBJ_SUPERVISORS; +extern BYTE *OLDPASSPROP; +extern BYTE *OPERATORS; +extern BYTE *PASSPROP; +extern BYTE *Q_DIRECTORY; +extern BYTE *Q_OPERATORS; +extern BYTE *Q_SERVERS; +extern BYTE *Q_USERS; +extern BYTE *REQUESTS_MADE; +extern BYTE *SECURITY_EQUALS; + +/****************************************************************************/ +/****************************************************************************/ + + +#endif /* __BINDERY_H__ */