home *** CD-ROM | disk | FTP | other *** search
- /*
- File: ENET.h
-
- Copyright: © 1984-1993 by Apple Computer, Inc., all rights reserved.
-
- WARNING
- This file was auto generated by the interfacer tool. Modifications
- must be made to the master file.
-
- */
-
- #ifndef __ENET__
- #define __ENET__
-
- #ifndef __TYPES__
- #include <Types.h>
- /* #include <ConditionalMacros.h> */
- /* #include <MixedMode.h> */
- /* #include <Traps.h> */
- #endif
-
- #ifndef __OSUTILS__
- #include <OSUtils.h>
- #endif
-
- #define EAddrRType 'eadr'
-
- enum {
- ENetSetGeneral = 253, /*Set "general" mode*/
- ENetGetInfo = 252, /*Get info*/
- ENetRdCancel = 251, /*Cancel read*/
- ENetRead = 250, /*Read*/
- ENetWrite = 249, /*Write*/
- ENetDetachPH = 248, /*Detach protocol handler*/
- ENetAttachPH = 247, /*Attach protocol handler*/
- ENetAddMulti = 246, /*Add a multicast address*/
- ENetDelMulti = 245, /*Delete a multicast address*/
- eLenErr = -92, /*Length error ddpLenErr*/
- eMultiErr = -91 /*Multicast address error ddpSktErr*/
- };
-
- typedef union EParamBlock EParamBlock, *EParamBlkPtr;
-
-
- /*
- ENETCompletionProcs cannot be written in or called from a high-level
- language without the help of mixed mode or assembly glue because they
- use the following parameter-passing convention:
-
- typedef pascal void (*ENETCompletionProcPtr)(EParamBlkPtr thePBPtr);
-
- In:
- => thePBPtr A0.L
- Out:
- none
- */
-
- enum {
- uppENETCompletionProcInfo = kRegisterBased|REGISTER_ROUTINE_PARAMETER(1,kRegisterA0,kFourByteCode)
- };
-
- #if USESROUTINEDESCRIPTORS
- typedef pascal void (*ENETCompletionProcPtr)(EParamBlkPtr thePBPtr);
-
- typedef UniversalProcPtr ENETCompletionUPP;
-
- #define CallENETCompletionProc(userRoutine, thePBPtr) \
- CallUniversalProc((UniversalProcPtr)(userRoutine), uppENETCompletionProcInfo, (thePBPtr))
-
- #define NewENETCompletionProc(userRoutine) \
- (ENETCompletionUPP) NewRoutineDescriptor((ProcPtr)(userRoutine), \
- uppENETCompletionProcInfo, GetCurrentISA())
-
- #else
- typedef ProcPtr ENETCompletionUPP;
-
- #define NewENETCompletionProc(userRoutine) \
- (ENETCompletionUPP)(userRoutine)
-
- #endif
-
- #define EParamHeader \
- QElem *qLink; \
- short qType; \
- short ioTrap; \
- Ptr ioCmdAddr; \
- ENETCompletionUPP ioCompletion; \
- OSErr ioResult; \
- StringPtr ioNamePtr; \
- short ioVRefNum; \
- short ioRefNum; \
- short csCode;
-
- #if defined(powerc) || defined (__powerc)
- #pragma options align=mac68k
- #endif
- struct EParamMisc1 {
- QElem *qLink;
- short qType;
- short ioTrap;
- Ptr ioCmdAddr;
- ENETCompletionUPP ioCompletion;
- OSErr ioResult;
- StringPtr ioNamePtr;
- short ioVRefNum;
- short ioRefNum;
- short csCode; /*General EParams*/
- short eProtType; /*Ethernet protocol type*/
- Ptr ePointer; /*No support for PowerPC code*/
- short eBuffSize; /*buffer size*/
- short eDataSize; /*number of bytes read*/
- };
- #if defined(powerc) || defined(__powerc)
- #pragma options align=reset
- #endif
-
- typedef struct EParamMisc1 EParamMisc1;
-
- #if defined(powerc) || defined (__powerc)
- #pragma options align=mac68k
- #endif
- struct EParamMisc2 {
- EParamMisc1 EParms1;
- char eMultiAddr[6]; /*Multicast Address*/
- };
- #if defined(powerc) || defined(__powerc)
- #pragma options align=reset
- #endif
-
- typedef struct EParamMisc2 EParamMisc2;
-
- #if defined(powerc) || defined (__powerc)
- #pragma options align=mac68k
- #endif
- union EParamBlock {
- EParamMisc1 EParms1;
- EParamMisc2 EParms2;
- };
- #if defined(powerc) || defined(__powerc)
- #pragma options align=reset
- #endif
-
- #ifdef __cplusplus
- extern "C" {
- #endif
-
- extern pascal OSErr EWrite(EParamBlkPtr thePBptr, Boolean async);
- extern pascal OSErr EAttachPH(EParamBlkPtr thePBptr, Boolean async);
- extern pascal OSErr EDetachPH(EParamBlkPtr thePBptr, Boolean async);
- extern pascal OSErr ERead(EParamBlkPtr thePBptr, Boolean async);
- extern pascal OSErr ERdCancel(EParamBlkPtr thePBptr, Boolean async);
- extern pascal OSErr EGetInfo(EParamBlkPtr thePBptr, Boolean async);
- extern pascal OSErr ESetGeneral(EParamBlkPtr thePBptr, Boolean async);
- extern pascal OSErr EAddMulti(EParamBlkPtr thePBptr, Boolean async);
- extern pascal OSErr EDelMulti(EParamBlkPtr thePBptr, Boolean async);
- #ifdef __cplusplus
- }
- #endif
-
- #endif
-
-