-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathlistsess.c
35 lines (30 loc) · 966 Bytes
/
listsess.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#include <stdio.h>
#include <appletalk.h>
typedef struct ListSessions2ResultRec {
Byte sessionRefNum;
Byte slotDrive;
char volumeName[28];
Word volumeID;
char serverName[32];
char zoneName[33];
} ListSessions2ResultRec;
ListSessions2ResultRec ls2Results[20];
int main(void)
{
PFIListSessions2Rec listSessions2Rec;
int i;
listSessions2Rec.async = 0;
listSessions2Rec.command = pfiListSessions2Command;
listSessions2Rec.bufferLength = sizeof(ls2Results);
listSessions2Rec.bufferPtr = (LongWord)&ls2Results;
i = _CALLAT(&listSessions2Rec);
if (i != 0) {
fprintf(stderr, "Error %04x\n", listSessions2Rec.result);
return 1;
}
for (i = 0; i < listSessions2Rec.entriesRtn; i++) {
printf("Session=%i, Volume=%b, Server=%b, Zone=%b\n",
ls2Results[i].sessionRefNum, ls2Results[i].volumeName,
ls2Results[i].serverName, ls2Results[i].zoneName);
}
}