/************************************************************************ ** * ** Copyright © 1996 Digital Equipment Corporation. * ** All rights reserved. * ** * ** Redistribution and use in source and binary forms are permitted * ** provided that the above copyright notice and this paragraph are * ** duplicated in all such forms and that any documentation, * ** advertising materials, and other materials related to such * ** distribution and use acknowledge that the software was developed * ** by Digital Equipment Corporation. The name of the * ** Corporation may not be used to endorse or promote products derived * ** from this software without specific prior written permission. * ** THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR * ** IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED * ** WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. * ** * ************************************************************************* **++ ** FACILITY: ** ** ppp_async.h. ** ** ABSTRACT: ** ** Constant defintions and external defs of variables in ppp_async.c ** ** AUTHORS: ** ** Patrick Crilly, Networks Engineering (Australia). ** ** CREATION DATE: ** ** 29-November-1995 ** ** MODIFICATION HISTORY: ** ** 17-December-1996 Barry W. Kierstein ** Replaced the standard Digital copyright with ** one compatible with the CMU copyright. ** ** 24-July-1996 Barry W. Kierstein ** Corrected copyright notice. ** ** 29-November-1995 Original version. ** **-- */ #ifndef _PPP_ASYNC_H_ #define _PPP_AYSNC_H_ /* ** ** import definitions: ** PPPBuffer ** */ #ifndef _PPP_BUF_H #include "ppp_buf.h" #endif /* ** ** import definitions: ** vcibdef ** */ #ifndef _VCIBDEF_H_ #define _VCIBDEF_H_ #define VCIBDEF vcibdef /* work around broken vcibdef.h in V7.1 */ #include "vcibdef.h" #endif /* ** ** import definitions: ** UCB ** */ #ifndef __UCBDEF_LOADED #include "ucbdef.h" #endif /* ** ** import definitions: ** prototype macro ** types ** */ #ifndef _PPPD_H_ #include "pppd.h" #endif /* ** Set up a macro to allocate management VCRPs. At the moment the ** async driver is the only code that needs this so it's defined ** here. */ #define MGMT_BUF_ALLOC( buf ) \ { \ (buf) = pppBufAlloc(0); \ if ((buf)) \ { \ (buf)->vcrp$v_cmn_mgmt = 1; \ } \ } #define MGMT_BUF_DEALLOC( buf ) pppBufDealloc((buf)) /* ** Definitions for accessing fields in a asnvcib structure */ #define VCIBPhysDeviceName vcib$a_phy_device_name #define VCIBAsnUCB vcib$ps_asn_ucb /* ** Define a structure for QIO items because ** this is the format the async driver expects ** lists in. */ typedef struct qioItem { u_short len; u_short code; union { u_int value; void *addr; } data; void *retAddr; } qioItem; /* ** Prototypes */ u_int deviceClose( lineId line ); char deviceDisable( lineId line ); char deviceEnable( lineId line ); u_int deviceGetUCB( char *devName, int32 devNameLen, UCB **ucbPtr ); void deviceHangup( struct VCIBDEF *vcib ); u_char deviceInit( void ); u_int deviceOpen( lineId line ); char deviceSetChar( lineId line ); void deviceTransmit( lineId line, u_short protocol, PPPBuffer *buf ); /* ** Declare linkages and prototypes */ /* Report Event */ #pragma linkage deviceHangupLnkg = (parameters(r4), preserved(r2,r3,r5), nopreserve(r0,r1)) #pragma use_linkage deviceHangupLnkg (deviceHangup) void deviceHangup( struct VCIBDEF *vcib ); /* Receive Complete */ #pragma linkage deviceReceiveLnkg = (parameters(r4,r3), preserved(r2,r5), nopreserve(r0,r1)) #pragma use_linkage deviceReceiveLnkg (deviceReceive) void deviceReceive( struct VCIBDEF *vcib, PPPBuffer *buf ); /* Transmit Complete */ #pragma linkage deviceTransmitCmplLnkg = (parameters(r4,r3), preserved(r2,r5), nopreserve(r0,r1)) #pragma use_linkage deviceTransmitCmplLnkg (deviceTransmitCmpl) void deviceTransmitCmpl( struct VCIBDEF *vcib, PPPBuffer *buf ); #endif /* _PPP_ASYNC_H */