🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.mac
Article #13619

Aztec 'C' problem - help!

#13619
From: Rajiv Arora
Date: Tue, 25 Nov 1986 15:53
54 lines
2212 bytes
Hi all.

I have a question for those of you who have used the Appletalk Manager
calls from Aztec 'C'. I'm trying to use the AB Link Access Protocol in
my application and can't for the life of me get the function
LAPOpenProtocol () to work. I was wondering if any of you had had the
same problem and knew of a fix. Shown below is the code illustrating
the problem: 

#include <stdio.h>
#include <appletalk.h>
#include <syserr.h>

main ()
{
OSErr errcode;
pascal OSErr MPPopen ();
pascal OSErr LAPOpenProtocol ();
ABByte myLAPType;			/* ABByte is typedefed as
					   "unsigned char" and Ptr as
Ptr myprotoptr;				   "char *" in appletalk.h */

if ((errcode = MPPOpen ()) != noErr)
    {
    printf ("error opening MPP\n");
    printf ("errorcode = %d\n");
    }
else
    {
    myLAPType = 53;		/* arbitrary protocol number */
    myprotoptr = NULL;
    if ((errcode = LAPOpenProtocol (myLAPType, myprotoptr)) != noErr)
	{
	printf ("error opening protocol\n");
	printf ("errorcode = %d\n);
	}
    }
}

The problem is that LAPOpenProtocol always returns with errorcode -94,
which indicates that either myLAPType (= 53) is out of range, already
present in the protocol handler table, or that the protocol table is
full. Since the table can have upto 4 entries, and only two are used
by DDP (i.e. LAP types 1 and 2), the last should not be the case. The
other two possibilities also seem unlikely.

Any suggestions/comments/help would be greatly appreciated.

Rajiv Arora
-- 
	UUCP:		{seismo,cmc12,columbia,cornell,harvard,
			ll-xn,nike,topaz}!rochester!ur-valhalla!rajiv
	ARPA:		ur-valhalla!rajiv@rochester.arpa
Technical Details
Message-ID: <864@ur-valhalla.UUCP>
Path: arc1-ca.pugleaf.net!utzoo!mnetor!seismo!rochester!ur-tut!ur-valhalla!rajiv

Show Full Headers
Complete Article Headers
Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Path: arc1-ca.pugleaf.net!utzoo!mnetor!seismo!rochester!ur-tut!ur-valhalla!rajiv
From: rajiv@ur-valhalla.UUCP (Rajiv Arora)
Newsgroups: comp.sys.mac
Subject: Aztec 'C' problem - help!
Message-ID: <864@ur-valhalla.UUCP>
Date: Tue, 25-Nov-86 10:53:35 EST
Article-I.D.: ur-valha.864
Posted: Tue Nov 25 10:53:35 1986
Date-Received: Tue, 25-Nov-86 22:44:08 EST
Reply-To: rajiv@ur-valhalla.UUCP (Rajiv Arora)
Distribution: net
Organization: EE VLSI Graduate Research Facility, UR, Rochester NY
Lines: 54