2 ** InterslipLib - Routines to talk to InterSLIP. Version 1.1, 31-Oct-1995.
5 ** (c) Jack Jansen, CWI, 1995 <jack@cwi.nl>
10 #include "InterslipLib.h"
12 static CntrlParam iopb
;
13 static short refnum
= -1;
17 if ( refnum
>= 0 ) return 0;
18 return OpenDriver("\p.InterSLIP", &refnum
);
23 iopb
.ioCRefNum
= refnum
;
24 iopb
.ioVRefNum
= refnum
;
25 iopb
.ioCompletion
= (UniversalProcPtr
) 0;
27 return PBControlImmed((ParmBlkPtr
)&iopb
);
32 iopb
.ioCRefNum
= refnum
;
33 iopb
.ioVRefNum
= refnum
;
34 iopb
.ioCompletion
= (UniversalProcPtr
) 0;
36 return PBControlImmed((ParmBlkPtr
)&iopb
);
39 OSErr
is_status(long *status
, long *msgseqnum
, StringPtr
*msg
)
44 iopb
.ioCRefNum
= refnum
;
45 iopb
.ioVRefNum
= refnum
;
46 iopb
.ioCompletion
= (UniversalProcPtr
) 0;
48 if( err
= PBControlImmed((ParmBlkPtr
)&iopb
) )
50 csp
= (long *)&iopb
.csParam
;
53 *msg
= (unsigned char *)csp
[2];
57 OSErr
is_getconfig(long *baudrate
, long *flags
,
58 Str255 idrvnam
, Str255 odrvnam
, Str255 cfgnam
)
63 iopb
.ioCRefNum
= refnum
;
64 iopb
.ioVRefNum
= refnum
;
65 iopb
.ioCompletion
= (UniversalProcPtr
) 0;
67 csp
= (long *)&iopb
.csParam
;
68 csp
[2] = (long)idrvnam
;
69 csp
[3] = (long)odrvnam
;
70 csp
[4] = (long)cfgnam
;
71 if( err
= PBControlImmed((ParmBlkPtr
)&iopb
) )
78 OSErr
is_setconfig(long baudrate
, long flags
,
79 Str255 idrvnam
, Str255 odrvnam
, Str255 cfgnam
)
84 iopb
.ioCRefNum
= refnum
;
85 iopb
.ioVRefNum
= refnum
;
86 iopb
.ioCompletion
= (UniversalProcPtr
) 0;
88 csp
= (long *)&iopb
.csParam
;
91 csp
[2] = (long)idrvnam
;
92 csp
[3] = (long)odrvnam
;
93 csp
[4] = (long)cfgnam
;
94 return PBControlImmed((ParmBlkPtr
)&iopb
);