Content-transfer-encoding: 7BIT
Newsgroups: bit.listserv.banyan-l
Date:         Tue, 15 Dec 1992 15:14:35 -0300
From:         Ian.Brabham@CC.MONASH.EDU.AU
Subject:      re: Associated Record '0' layout

Greg,

>Question, Does anyone have the layout of StreetTalk's AR '0'?  I'm doing some
>fiddling with Visual Basic and want to grab the User description.  I know
>it's part of the 1024 byte AR but don't know which 64 bytes it is.  I've
>wandered through the Toolkit and the TEch II books but didn't find it.

I stripped the attached out of the toolkit file
        /disk1/local/include/banyan/ststruct.h

The bit you seem interested in can be summarised as follows

typedef struct
        {
        short designator;     /* 1=user 2=service 3=list ... */
        short category;       /* service category (print, file, mail... ) */
        char descrip[64];     /* Description !!! only for types 1, 2 and 3 */
        .......               /* other type specific stuff */
        } STRecord;

Ian Brabham                 email: ian.brabham@cc.monash.edu.au
Micro Support Group         phone: +61 3 565 4742
Monash University           fax:   +61 3 565 4746
Melbourne Australia
============================<ststruct.h>====================================
#define DBNAMELEN         16
#define STNAMELEN         64
#define MAXTPORTS         3
#define ENUMSET           15
#define MAXLSTSET         10
#define MAXREPS           3

typedef String STNAME[STNAMELEN];
typedef String DESCTYPE[64];
typedef Byte IpcPort[16];

#define NULLCHOICE        0

typedef Cardinal RecordClass;

#define USER             1
#define SERVICE          2
#define LIST             3
#define ALIASENTRY       4
#define ENUM             5
#define LSTMEMB          6
#define ACLREC           7
#define ASSOCREC         8
#define DOMREC           9

typedef struct
        {
        Cardinal category;
        DESCTYPE descrip;
        Cardinal flags;
        IpcPort TalkPorts[MAXTPORTS];
        Byte dummy1;
        Byte dummy2;
        Byte dummya1[2];
        LongCardinal lastlogin;
        Boolean secrec;
        Byte expires[6];
        Byte dummy3;
        Byte dummya2;
        Cardinal disabled;
        LongCardinal lastpwdchg;
        Boolean chgpwd;
        Byte dummy4[6];
        } User;

typedef struct
        {
        Cardinal category;
        DESCTYPE descrip;
        Cardinal flags;
        IpcPort port;
        String ssname[DBNAMELEN];
        } Service;

typedef struct
        {
        Cardinal category;
        DESCTYPE descrip;
        } List;

typedef struct
        {
        Cardinal category;
        STNAME realname;
        } Alias;

typedef struct
        {
        Cardinal length;
        STNAME sequence[ENUMSET];
        } Enum;

typedef struct
        {
        Cardinal length;
        STNAME sequence[MAXLSTSET];
        } LstMemb;

typedef struct
        {
        Cardinal length;
        Byte WFAR *sequence;
        } AssocRec;

typedef String SvrNames[DBNAMELEN];

typedef struct
        {
        Cardinal length;
        SvrNames sequence[MAXREPS];
        } HoldingSvrs;

typedef struct
        {
        STNAME reserved;
        HoldingSvrs places;
        } DomRec;

typedef struct
        {
        RecordClass designator;
        union
                {

#define USER_case             u0.u_USER
#define SERVICE_case          u0.u_SERVICE
#define LIST_case             u0.u_LIST
#define ALIASENTRY_case       u0.u_ALIASENTRY
#define ENUM_case             u0.u_ENUM
#define LSTMEMB_case          u0.u_LSTMEMB
#define ASSOCREC_case         u0.u_ASSOCREC
#define DOMREC_case           u0.u_DOMREC

                User u_USER;
                Service u_SERVICE;
                List u_LIST;
                Alias u_ALIASENTRY;
                Enum u_ENUM;
                LstMemb u_LSTMEMB;
                AssocRec u_ASSOCREC;
                DomRec u_DOMREC;
                } u0;
        } STRecord;
=============================================================================
Newsgroups: bit.listserv.banyan-l