|
Mac OS 9
|
Definitions for Open Transport kernel code, such as drivers and protocol modules. More...
Go to the source code of this file.
Data Structures | |
| struct | install_info |
| struct | T_MIB_req |
| struct | T_MIB_ack |
| struct | T_stream_timer |
| struct | TPortRecord |
| struct | OTPCIInfo |
Macros | |
| #define | OTKERNEL 1 |
| #define | enableok(q) ((q)->q_flag &= ~QNOENB) |
| #define | noenable(q) ((q)->q_flag |= QNOENB) |
| #define | OTHERQ(q) (((q)->q_flag & QREADR) ? WR(q) : RD(q)) |
| #define | RD(q) (&q[-1]) |
| #define | WR(q) (&q[1]) |
| #define | sprintf mi_sprintf |
| #define | printf OTKernelPrintf |
| #define | GetEError(v) ((OTUnixErr)(((v) >> 16) & 0xffff)) |
| #define | GetXTIError(v) ((OTXTIErr)((v) & 0xffff)) |
| #define | MakeTPIEError(e) ((OTError)(((((UInt16)(e)) << 16) | TSYSERR))) |
| #define | MakeDLPIEError(e) ((OTError)(((((UInt16)(e)) << 16) | DL_SYSERR))) |
| #define | MakeXTIError(xti) ((OTError)(xti)) |
| #define | MakeOTError(xti, e) ((OTError)((xti) | ((UInt16)(e)) << 16)) |
| #define | kOTModuleInterfaceID kOTModulePrefix "StrmMod" |
| #define | getmajor(x) ((major_t)(((unsigned long)(x) >> 16) & 0xffff)) |
| #define | getminor(x) ((minor_t)((x) & 0xffff)) |
| #define | makedev(x, y) ((dev_t)((((dev_t)(x)) << 16) | ((y) & 0xffff))) |
| #define | getemajor getmajor |
| #define | geteminor getminor |
| #define | makedevice makedev |
| #define | etoimajor(majnum) (majnum) |
| #define | itoemajor(majnum, j) (majnum) |
| #define | STRLOG(q, lvl, flags, str) OTStrlog(q, lvl, flags, str) |
| #define | STRLOG1(q, lvl, flags, str) |
| #define | STRLOG2(q, lvl, flags, str) |
| #define | kOTPortScannerPrefix "ot:pScnr$" |
| #define | kOTPortScannerInterfaceID kOTKernelPrefix "pScnr" |
| #define | kOTPseudoPortScannerInterfaceID kOTKernelPrefix "ppScnr" |
| #define | kOTCompatPortScannerInterfaceID kOTKernelPrefix "cpScnr" |
| #define | kOTPortScannerCFMTag kOTKernelPrefix "pScnr" |
| #define | kOTPseudoPortScannerCFMTag kOTKernelPrefix "ppScnr" |
| #define | kOTCompatPortScannerCFMTag kOTKernelPrefix "cpScnr" |
| #define | kOTScanPortsID "OTScanPorts" |
| #define | calloc (DONT_CALL * THIS_FUNCTION) |
| #define | malloc (DONT_CALL * THIS_FUNCTION) |
| #define | realloc (DONT_CALL * THIS_FUNCTION) |
| #define | free (DONT_CALL * THIS_FUNCTION) |
| #define | bcopy(s, d, l) OTMemcpy(d, s, l) |
| #define | bzero(d, l) OTMemzero(d, (OTByteCount)(l)) |
| #define | bcmp(s, d, l) mi_bcmp(s, d, l) |
| #define | BCOPY(s, d, l) bcopy((const char *)(s), (char *)(d), l) |
| #define | BZERO(d, l) bzero((char *)(d), l) |
| #define | BCMP(s, d, l) mi_bcmp((const char *)(s), (const char *)(d), l) |
| #define | HEAD_SIZE(mp) ((mp)->b_rptr - (mp)->b_datap->db_base) |
| #define | TAIL_SIZE(mp) ((mp)->b_datap->db_lim - (mp)->b_wptr) |
| #define | MBLK_SIZE(mp) ((mp)->b_wptr - (mp)->b_rptr) |
| #define | DBLK_SIZE(mp) ((mp)->b_datap->db_lim - (mp)->b_datap->db_base) |
| #define | MI_COPY_IN 1 |
| #define | MI_COPY_OUT 2 |
| #define | MI_COPY_DIRECTION(mp) (((UInt8 *)&(mp)->b_cont->b_prev)[0]) |
| #define | MI_COPY_COUNT(mp) (((UInt8 *)&(mp)->b_cont->b_prev)[1]) |
| #define | MI_COPY_RVAL(mp) (*(OTInt32 *)&(mp)->b_cont->b_next) |
| #define | MI_COPY_CASE(dir, cnt) ((OTInt32)(((cnt) << 2) | dir)) |
| #define | MI_COPY_STATE(mp) ((OTInt32)MI_COPY_CASE(MI_COPY_DIRECTION(mp), MI_COPY_COUNT(mp))) |
| #define | OTPCIServiceType(devType, framingFlags, isTPI, isDLPI) |
| #define | kDescriptorProperty "driver-descriptor" |
| #define | kDriverProperty "driver,AAPL,MacOS,PowerPC" |
| #define | kDriverPtrProperty "driver-ptr" |
| #define | kSlotProperty "AAPL,slot-name" |
Typedefs | |
| typedef long | OTError |
| typedef struct install_info | install_info |
| typedef UInt16 | major_t |
| typedef UInt16 | minor_t |
| typedef struct T_MIB_req | T_MIB_req |
| typedef struct T_MIB_ack | T_MIB_ack |
| typedef struct T_stream_timer | T_stream_timer |
| typedef struct TPortRecord | TPortRecord |
| typedef UInt8 | MPS_INTR_STATE |
| typedef mblk_t * | mp |
| typedef struct OTPCIInfo | OTPCIInfo |
Functions | |
| mblk_t * | allocb (OTByteCount size, OTInt32 pri) |
| typedef | CALLBACK_API_C (void, allocbiProc)(char *arg) |
| mblk_t * | allocbi (OTByteCount size, OTInt32 pri, allocbiProc pfv, char *arg, unsigned char *base) |
| queue_t * | allocq (void) |
| OTInt32 | adjmsg (mblk_t *mp, OTInt32 len_param) |
| queue_t * | backq (queue_t *q) |
| OTInt32 | bcanput (queue_t *q, OTUInt8Param pri) |
| OTInt32 | bcanputnext (queue_t *q, OTUInt8Param pri) |
| OTInt32 | bufcall (OTByteCount memNeeded, OTInt32 pri, bufcallp_t proc, long context) |
| OTInt32 | canput (queue_t *q) |
| OTInt32 | canputnext (queue_t *q) |
| mblk_t * | copyb (mblk_t *mp) |
| mblk_t * | copymsg (mblk_t *mp) |
| mblk_t * | dupb (mblk_t *mp) |
| mblk_t * | dupmsg (mblk_t *mp) |
| mblk_t * | esballoc (unsigned char *base, OTByteCount size, OTInt32 pri, frtn_t *freeInfo) |
| mblk_t * | esballoca (unsigned char *base, OTByteCount size, OTInt32 pri, frtn_t *freeInfo) |
| typedef | CALLBACK_API_C (void, esbbcallProc)(long arg) |
| OTInt32 | esbbcall (OTInt32 pri, esbbcallProc func, long arg) |
| void | flushband (queue_t *q, OTUInt8Param pri, OTInt32 flag) |
| void | flushq (queue_t *q, OTInt32 flag) |
| void | freeb (mblk_t *mp) |
| void | freemsg (mblk_t *mp) |
| OTInt32 | freeq (queue_t *q) |
| OTInt32 | freezestr (queue_t *q) |
| admin_t | getadmin (OTUInt16Param mid) |
| unsigned short | getmid (char *name) |
| mblk_t * | getq (queue_t *q) |
| OTInt32 | insq (queue_t *q, mblk_t *emp, mblk_t *nmp) |
| void | linkb (mblk_t *mp1, mblk_t *mp2) |
| typedef | CALLBACK_API_C (void, mpnotifyProc)(char *arg) |
| OTInt32 | mpnotify (mblk_t *mp, mpnotifyProc pfv, char *arg) |
| OTInt32 | msgdsize (const mblk_t *mp) |
| mblk_t * | msgpullup (mblk_t *mp, OTInt32 len) |
| OTInt32 | pullupmsg (mblk_t *mp, OTInt32 len) |
| OTInt32 | put (queue_t *q, mblk_t *mp) |
| OTInt32 | putbq (queue_t *q, mblk_t *mp) |
| OTInt32 | putctl (queue_t *q, OTInt32 mType) |
| OTInt32 | putnextctl (queue_t *q, OTInt32 mType) |
| OTInt32 | putctl1 (queue_t *q, OTInt32 mType, OTInt32 c) |
| OTInt32 | putnextctl1 (queue_t *q, OTInt32 mType, OTInt32 c) |
| OTInt32 | putctl2 (queue_t *q, OTInt32 mType, OTInt32 c1, OTInt32 c2) |
| OTInt32 | puthere (queue_t *q, mblk_t *mp) |
| OTInt32 | putnext (queue_t *q, mblk_t *mp) |
| OTInt32 | putq (queue_t *q, mblk_t *mp) |
| void | qenable (queue_t *q) |
| void | qprocson (queue_t *q) |
| void | qprocsoff (queue_t *q) |
| OTInt32 | qreply (queue_t *q, mblk_t *mp) |
| OTInt32 | qsize (queue_t *q) |
| mblk_t * | rmvb (mblk_t *mp, mblk_t *bp) |
| void | rmvq (queue_t *q, mblk_t *mp) |
| OTInt32 | strqget (queue_t *q, qfields_t what, OTUInt8Param pri, long *valp) |
| OTInt32 | strqset (queue_t *q, qfields_t what, OTUInt8Param pri, long val) |
| OTInt32 | testb (OTByteCount size, OTInt32 pri) |
| void | unbufcall (OTInt32 id) |
| void | unfreezestr (queue_t *q, OTInt32 oldpri) |
| mblk_t * | unlinkb (mblk_t *mp) |
| OTInt32 | strlog (OTInt32 mid, OTInt32 sid, OTInt32 level, OTUInt32 flags, char *fmt,...) |
| OTInt32 | OTKernelPrintf (OTInt32 toDo, char *fmt,...) |
| void | cmn_err (OTInt32 errType, char *fmt,...) |
| OTInt32 | mi_sprintf (char *buf, char *fmt,...) |
| OSStatus | OTErrorToOSStatus (OTError err) |
| typedef | CALLBACK_API_C (install_info *, GetOTInstallInfoProcPtr)(void) |
| typedef | CALLBACK_API_C (Boolean, InitStreamModuleProcPtr)(void *portInfo) |
| typedef | CALLBACK_API_C (void, TerminateStreamModuleProcPtr)(void *portInfo) |
| void | OTStrlog (queue_t *q, OTInt32 lvl, OTInt32 flags, const char *str) |
| OSStatus | OTRegisterPort (OTPortRecord *portInfo, void *ref) |
| OSStatus | OTUnregisterPort (const char *portName, void **refPtr) |
| OSStatus | OTChangePortState (OTPortRef portRef, OTEventCode theChange, OTResult why) |
| TPortRecord * | OTFindPort (const char *portName) |
| TPortRecord * | OTGetIndexedPort (OTItemCount index) |
| TPortRecord * | OTFindPortConflict (OTPortRef ref) |
| TPortRecord * | OTFindPortByRef (OTPortRef ref) |
| TPortRecord * | OTFindPortByDev (dev_t dev) |
| typedef | CALLBACK_API_C (void, PortScanProcPtr)(UInt32 scanType) |
| void * | OTAllocPortMem (OTByteCount size) |
| void | OTFreePortMem (void *mem) |
| void | mps_intr_disable (MPS_INTR_STATE *oldState) |
| void | mps_intr_enable (MPS_INTR_STATE *oldState) |
| mblk_t * | mi_timer_alloc (queue_t *q, OTByteCount size) |
| void | mi_timer_free (mblk_t *mp) |
| void | mi_timer (mblk_t *mp, unsigned long milliSeconds) |
| Boolean | mi_timer_cancel (mblk_t *mp) |
| Boolean | mi_timer_valid (mblk_t *mp) |
| mblk_t * | mi_timer_q_switch (mblk_t *mp, queue_t *q, mblk_t *new_mp) |
| Boolean | OTScheduleDriverDeferredTask (long dtCookie) |
| typedef | CALLBACK_API_C (void, EsbFreeProcPtr)(char *arg) |
| mblk_t * | OTAllocMsg (void *buf, OTByteCount size, EsbFreeProcPtr func, void *arg) |
| void * | OTAllocMem (OTByteCount size) |
| void | OTFreeMem (void *mem) |
| void * | OTReallocMem (void *ptr, OTByteCount newSize) |
| OTInt32 | mi_bcmp (const char *first, const char *second, OTByteCount nBytes) |
| typedef | CALLBACK_API_C (void, OTWriterProcPtr)(queue_t *q |
| void | mps_become_writer (queue_t *q, mblk_t *mp, OTWriterProcPtr proc) |
| OTInt32 | drv_priv (cred *credp) |
| queue_t * | mi_allocq (streamtab *st) |
| mblk_t * | mi_tpi_ack_alloc (mblk_t *mp, OTByteCount size, long primType) |
| mblk_t * | mi_tpi_conn_con (mblk_t *trailer_mp, char *src, OTByteCount src_length, char *opt, OTByteCount opt_length) |
| mblk_t * | mi_tpi_conn_ind (mblk_t *trailer_mp, char *src, OTByteCount src_length, char *opt, OTByteCount opt_length, OTInt32 seqnum) |
| mblk_t * | mi_tpi_conn_req (mblk_t *trailer_mp, char *dest, OTByteCount dest_length, char *opt, OTByteCount opt_length) |
| mblk_t * | mi_tpi_data_ind (mblk_t *trailer_mp, OTInt32 flags, long ptype) |
| mblk_t * | mi_tpi_data_req (mblk_t *trailer_mp, OTInt32 flags, long pttype) |
| mblk_t * | mi_tpi_discon_ind (mblk_t *trailer_mp, OTInt32 reason, OTInt32 seqnum) |
| mblk_t * | mi_tpi_discon_req (mblk_t *trailer_mp, OTInt32 seqnum) |
| mblk_t * | mi_tpi_err_ack_alloc (mblk_t *mp, OTInt32 tlierr, OTInt32 unixerr) |
| mblk_t * | mi_tpi_exdata_ind (mblk_t *trailer_mp, OTInt32 flags, long ptype) |
| mblk_t * | mi_tpi_exdata_req (mblk_t *trailer_mp, OTInt32 flags, long ptype) |
| mblk_t * | mi_tpi_info_req (void) |
| mblk_t * | mi_tpi_ok_ack_alloc (mblk_t *mp) |
| mblk_t * | mi_tpi_ordrel_ind (void) |
| mblk_t * | mi_tpi_ordrel_req (void) |
| mblk_t * | mi_tpi_uderror_ind (char *dest, OTByteCount dest_length, char *opt, OTByteCount opt_length, OTInt32 error) |
| mblk_t * | mi_tpi_unitdata_ind (mblk_t *trailer_mp, char *src, OTByteCount src_length, char *opt, OTByteCount opt_length) |
| mblk_t * | mi_tpi_unitdata_req (mblk_t *trailer_mp, char *dst, OTByteCount dst_length, char *opt, OTByteCount opt_length) |
| mblk_t * | mi_reuse_proto (mblk_t *toReuse, OTByteCount sizeDesired, OTBooleanParam keepOnError) |
| mblk_t * | mi_reallocb (mblk_t *old_mp, OTByteCount new_size) |
| Boolean | mi_set_sth_hiwat (queue_t *q, OTByteCount size) |
| Boolean | mi_set_sth_lowat (queue_t *q, OTByteCount size) |
| Boolean | mi_set_sth_maxblk (queue_t *q, OTByteCount size) |
| Boolean | mi_set_sth_wroff (queue_t *q, OTByteCount size) |
| UInt8 * | mi_offset_param (mblk_t *mp, long offset, long len) |
| UInt8 * | mi_offset_paramc (mblk_t *mp, long offset, long len) |
| char * | mi_open_detached (char **mi_opp_orig, OTByteCount size, dev_t *devp) |
| OTInt32 | mi_open_comm (char **mi_opp_orig, OTByteCount size, queue_t *q, dev_t *dev, OTInt32 flag, OTInt32 sflag, cred_t *credp) |
| OTInt32 | mi_close_comm (char **mi_opp_orig, queue_t *q) |
| void | mi_bufcall (queue_t *q, OTByteCount size, OTInt32 pri) |
| void | mi_detach (queue_t *q, char *ptr) |
| void | mi_close_detached (char **mi_opp_orig, char *ptr) |
| char * | mi_next_ptr (char *ptr) |
| void | mi_copyin (queue_t *q, mblk_t *mp, char *uaddr, OTByteCount len) |
| void | mi_copyout (queue_t *q, mblk_t *mp) |
| mblk_t * | mi_copyout_alloc (queue_t *q, mblk_t *mp, char *uaddr, OTByteCount len) |
| void | mi_copy_done (queue_t *q, mblk_t *mp, OTInt32 err) |
| void | mi_copy_set_rval (mblk_t *mp, OTInt32 rval) |
| OTInt32 | mi_copy_state (queue_t *q, mblk_t *mp, mblk_t **mpp) |
| typedef | CALLBACK_API_C (OTResult, ValidateHardwareProcPtr)(OTPCIInfo *param) |
Definitions for Open Transport kernel code, such as drivers and protocol modules.
For bug reports, consult the following page on the World Wide Web:
http://developer.apple.com/bugreporter/
| #define BCOPY | ( | s, | |
| d, | |||
| l | |||
| ) | bcopy((const char *)(s), (char *)(d), l) |
Standard STREAMS bcopy, bzero, & bcmp take char* parameters. The BCOPY, BZERO, and BCMP routines take void* so that we do not have to cast all the pointers.
| #define calloc (DONT_CALL * THIS_FUNCTION) |
Also, make sure that calling traditional "C" allocation routines will not compile.
| #define enableok | ( | q | ) | ((q)->q_flag &= ~QNOENB) |
We include "OpenTransportProtocol.h", which in turn includes "OpenTransport.h", thereby picking up all the stuff which is shared between client and kernel. Parts of "mistream.h" that are shared by the client and the kernel are in "OpenTransportProtocol.h". Re-allow a queue to be scheduled for service
| #define kDescriptorProperty "driver-descriptor" |
Some descriptors we use - these should eventually show up in system header files somewhere.
| #define kOTModuleInterfaceID kOTModulePrefix "StrmMod" |
Interface ID for STREAMS Modules for ASLM.
| #define kOTPortScannerInterfaceID kOTKernelPrefix "pScnr" |
The kOTPortScannerInterfaceID define is what you need to add to your export file for the "interfaceID = " clause.
| #define kOTPortScannerPrefix "ot:pScnr$" |
Prefix for Open Transport port scanners. Your port-scanning ASLM function set must use the prefix kOTPortScannerPrefix.
| #define noenable | ( | q | ) | ((q)->q_flag |= QNOENB) |
Prevent a queue from being scheduled
| #define OTPCIServiceType | ( | devType, | |
| framingFlags, | |||
| isTPI, | |||
| isDLPI | |||
| ) |
All PCI card drivers should have the following bits set in their install_info structure:
o kOTModIsDriver.
They should NEVER have the kOTModPushAlways or the kOTModIsModule flags set. The kOTModIsLowerMux bits should be set if the driver is a lower multiplexor, although Open Transport does nothing with the information today. The kOTModUpperIsDLPI bit should be set if the driver uses the DLPI message specification. The kOTModUpperIsTPI bit should be set if the driver uses the TPI message specification. Macro to put together the driverServices.service[x].serviceType field: xxxxxddd dddddddd ffffffff xxxxxxTD where "d" is the device type for Open Transport, the lower two bits are whether the driver is TPI or DLPI, and the "f" bits are the framing option flags. and all other bits should be 0
| #define RD | ( | q | ) | (&q[-1]) |
Get pointer to the read queue, assumes 'q' is a write queue ptr
| #define WR | ( | q | ) | (&q[1]) |
Get pointer to the write queue, assumes 'q' is a read queue ptr
| typedef long OTError |
Function to convert the "long" value that comes back in some of the netbufs as a result code to the equivalent OSStatus
| anonymous enum |
Synchronization level codes. These are supplied to modsw_install and stored in the appropriate tables. sth_osr_open and sth_ipush use these to set up synch queue subordination for new devices and modules.
| anonymous enum |
This is the first minor number that Apple OT drivers use for CLONEOPENs. Minor numbers 0 through 9 are reserved for use by the modules for various control streams. Note that Mentat drivers, which use mi_open_comm, start minor numbers from 5.
| anonymous enum |
Extra OTCommand codes that may appear on your module queue. These are extensions to the TPI specification for Open Transport. T_PRIVATE_REQ is the first available TPI message number for private use by modules (assuming you don't want to be confused by standard TPI messages).
| anonymous enum |
Your driver can return this value if it loaded correctly but wants to stay resident, presumably because it's hooked itself irrevokably into some other system service.
| anonymous enum |
Maximum # of services support by Open Transport. If your module exports more than this # of services, Open Transport will not be able to use the module.
| OTInt32 adjmsg | ( | mblk_t * | mp, |
| OTInt32 | len_param | ||
| ) |
| mblk_t* allocb | ( | OTByteCount | size, |
| OTInt32 | pri | ||
| ) |
| mblk_t* allocbi | ( | OTByteCount | size, |
| OTInt32 | pri, | ||
| allocbiProc | pfv, | ||
| char * | arg, | ||
| unsigned char * | base | ||
| ) |
| queue_t* allocq | ( | void | ) |
| OTInt32 bcanput | ( | queue_t * | q, |
| OTUInt8Param | pri | ||
| ) |
| OTInt32 bcanputnext | ( | queue_t * | q, |
| OTUInt8Param | pri | ||
| ) |
| OTInt32 bufcall | ( | OTByteCount | memNeeded, |
| OTInt32 | pri, | ||
| bufcallp_t | proc, | ||
| long | context | ||
| ) |
| typedef CALLBACK_API_C | ( | Boolean | , |
| InitStreamModuleProcPtr | |||
| ) |
Your module can optionally export this function. It will be called whenever your module is about to be loaded into a stream for the first time, or if it is about to be reloaded after having been unloaded. Return false if your module should NOT be loaded. For STREAMS modules, the void* parameter will be NULL. For drivers, it will be the same cookie parameter that was used for registering the module. For PCI card drivers, this will be a pointer to the OTPCIInfo structure, which can also be interpreted as a RegEntryIDPtr.
| typedef CALLBACK_API_C | ( | install_info * | , |
| GetOTInstallInfoProcPtr | |||
| ) |
Your module must export this function, and return a pointer to the install_info structure for the module.
| typedef CALLBACK_API_C | ( | OTResult | , |
| ValidateHardwareProcPtr | |||
| ) |
Typedef for the ValidateHardware function. This function will be called only once, at system boot time, before installing your driver into the Open Transport module registry. The param pointer will is a OTPCIInfo pointer - don't be changing the values there!
| typedef CALLBACK_API_C | ( | void | , |
| EsbFreeProcPtr | |||
| ) |
These routines are different from the similarly named routines in "OpenTransport.h" because they allocate memory in the OT kernel pool. See Technote ���� "Understanding Open Transport Memory Management" for details. This is the typedef for a function that will be called when a message created by OTAllocMsg is destroyed.
| typedef CALLBACK_API_C | ( | void | , |
| TerminateStreamModuleProcPtr | |||
| ) |
Your module can optionally export this function. It will be called whenever your module has been closed for the last time (i.e. no other outstanding instances of the module exist).
| OTInt32 canput | ( | queue_t * | q | ) |
| OTInt32 canputnext | ( | queue_t * | q | ) |
| void cmn_err | ( | OTInt32 | errType, |
| char * | fmt, | ||
| ... | |||
| ) |
| OTInt32 drv_priv | ( | cred * | credp | ) |
| OTInt32 esbbcall | ( | OTInt32 | pri, |
| esbbcallProc | func, | ||
| long | arg | ||
| ) |
| void flushband | ( | queue_t * | q, |
| OTUInt8Param | pri, | ||
| OTInt32 | flag | ||
| ) |
| void flushq | ( | queue_t * | q, |
| OTInt32 | flag | ||
| ) |
| void freeb | ( | mblk_t * | mp | ) |
| void freemsg | ( | mblk_t * | mp | ) |
| OTInt32 freeq | ( | queue_t * | q | ) |
| OTInt32 freezestr | ( | queue_t * | q | ) |
| admin_t getadmin | ( | OTUInt16Param | mid | ) |
| unsigned short getmid | ( | char * | name | ) |
| queue_t* mi_allocq | ( | streamtab * | st | ) |
| OTInt32 mi_bcmp | ( | const char * | first, |
| const char * | second, | ||
| OTByteCount | nBytes | ||
| ) |
| void mi_bufcall | ( | queue_t * | q, |
| OTByteCount | size, | ||
| OTInt32 | pri | ||
| ) |
| OTInt32 mi_close_comm | ( | char ** | mi_opp_orig, |
| queue_t * | q | ||
| ) |
| void mi_close_detached | ( | char ** | mi_opp_orig, |
| char * | ptr | ||
| ) |
| void mi_copy_set_rval | ( | mblk_t * | mp, |
| OTInt32 | rval | ||
| ) |
| void mi_detach | ( | queue_t * | q, |
| char * | ptr | ||
| ) |
| char* mi_next_ptr | ( | char * | ptr | ) |
| UInt8* mi_offset_param | ( | mblk_t * | mp, |
| long | offset, | ||
| long | len | ||
| ) |
| UInt8* mi_offset_paramc | ( | mblk_t * | mp, |
| long | offset, | ||
| long | len | ||
| ) |
| char* mi_open_detached | ( | char ** | mi_opp_orig, |
| OTByteCount | size, | ||
| dev_t * | devp | ||
| ) |
| OTInt32 mi_sprintf | ( | char * | buf, |
| char * | fmt, | ||
| ... | |||
| ) |
| void mi_timer | ( | mblk_t * | mp, |
| unsigned long | milliSeconds | ||
| ) |
| void mi_timer_free | ( | mblk_t * | mp | ) |
| mblk_t* mi_tpi_info_req | ( | void | ) |
| mblk_t* mi_tpi_ordrel_ind | ( | void | ) |
| mblk_t* mi_tpi_ordrel_req | ( | void | ) |
| mblk_t* mi_tpi_uderror_ind | ( | char * | dest, |
| OTByteCount | dest_length, | ||
| char * | opt, | ||
| OTByteCount | opt_length, | ||
| OTInt32 | error | ||
| ) |
| mblk_t* mi_tpi_unitdata_ind | ( | mblk_t * | trailer_mp, |
| char * | src, | ||
| OTByteCount | src_length, | ||
| char * | opt, | ||
| OTByteCount | opt_length | ||
| ) |
| mblk_t* mi_tpi_unitdata_req | ( | mblk_t * | trailer_mp, |
| char * | dst, | ||
| OTByteCount | dst_length, | ||
| char * | opt, | ||
| OTByteCount | opt_length | ||
| ) |
| OTInt32 mpnotify | ( | mblk_t * | mp, |
| mpnotifyProc | pfv, | ||
| char * | arg | ||
| ) |
| void mps_intr_disable | ( | MPS_INTR_STATE * | oldState | ) |
| void mps_intr_enable | ( | MPS_INTR_STATE * | oldState | ) |
| OTInt32 msgdsize | ( | const mblk_t * | mp | ) |
| void* OTAllocMem | ( | OTByteCount | size | ) |
Routines to allocate and free memory in your modules (these are interrupt-time safe!). OTAllocMem()
| mblk_t* OTAllocMsg | ( | void * | buf, |
| OTByteCount | size, | ||
| EsbFreeProcPtr | func, | ||
| void * | arg | ||
| ) |
This function creates a message which points to "size" bytes of data at "buf". When the message is freed, the EsbFreeProcPtr function "func" will be called with the argument "arg". NOTE: This function allows users of your buffer to modify the buffer. OTAllocMsg()
| void* OTAllocPortMem | ( | OTByteCount | size | ) |
Memory allocation for port persistent data, such as the memory referenced by the ref parameter you pass to OTRegisterPort. OTAllocPortMem()
| OSStatus OTChangePortState | ( | OTPortRef | portRef, |
| OTEventCode | theChange, | ||
| OTResult | why | ||
| ) |
| OSStatus OTErrorToOSStatus | ( | OTError | err | ) |
| TPortRecord* OTFindPort | ( | const char * | portName | ) |
| TPortRecord* OTFindPortByDev | ( | dev_t | dev | ) |
| TPortRecord* OTFindPortByRef | ( | OTPortRef | ref | ) |
| TPortRecord* OTFindPortConflict | ( | OTPortRef | ref | ) |
Find another port that is active and conflicts with the port described by "ref" OTFindPortConflict()
| void OTFreeMem | ( | void * | mem | ) |
| void OTFreePortMem | ( | void * | mem | ) |
| TPortRecord* OTGetIndexedPort | ( | OTItemCount | index | ) |
| OTInt32 OTKernelPrintf | ( | OTInt32 | toDo, |
| char * | fmt, | ||
| ... | |||
| ) |
| void* OTReallocMem | ( | void * | ptr, |
| OTByteCount | newSize | ||
| ) |
| OSStatus OTRegisterPort | ( | OTPortRecord * | portInfo, |
| void * | ref | ||
| ) |
These routines can be used by kernel code to register, find and iterate through the various ports on the machine. Do not confuse these with the client-side routines, defined in "OpenTransport.h". Register a port. The name the port was registered under is returned in the fPortName field. This routine allocates a TPortRecord and copies the supplied OTPortRecord into it. OTRegisterPort()
| Boolean OTScheduleDriverDeferredTask | ( | long | dtCookie | ) |
This routine is used by a driver at interrupt time to schedule a deferred task to run their interrupt processing code. OTScheduleDriverDeferredTask()
| void OTStrlog | ( | queue_t * | q, |
| OTInt32 | lvl, | ||
| OTInt32 | flags, | ||
| const char * | str | ||
| ) |
| OSStatus OTUnregisterPort | ( | const char * | portName, |
| void ** | refPtr | ||
| ) |
Unregister the port with the given name (If you re-register the port, it may get a different name - use OTChangePortState if that is not desireable). Since a single OTPortRef can be registered with several names, the API needs to use the portName rather than the OTPortRef to disambiguate. OTUnregisterPort()
| OTInt32 pullupmsg | ( | mblk_t * | mp, |
| OTInt32 | len | ||
| ) |
| OTInt32 putctl | ( | queue_t * | q, |
| OTInt32 | mType | ||
| ) |
| OTInt32 putctl1 | ( | queue_t * | q, |
| OTInt32 | mType, | ||
| OTInt32 | c | ||
| ) |
| OTInt32 putctl2 | ( | queue_t * | q, |
| OTInt32 | mType, | ||
| OTInt32 | c1, | ||
| OTInt32 | c2 | ||
| ) |
| OTInt32 putnextctl | ( | queue_t * | q, |
| OTInt32 | mType | ||
| ) |
| OTInt32 putnextctl1 | ( | queue_t * | q, |
| OTInt32 | mType, | ||
| OTInt32 | c | ||
| ) |
| void qenable | ( | queue_t * | q | ) |
| void qprocsoff | ( | queue_t * | q | ) |
| void qprocson | ( | queue_t * | q | ) |
| OTInt32 qsize | ( | queue_t * | q | ) |
| OTInt32 strlog | ( | OTInt32 | mid, |
| OTInt32 | sid, | ||
| OTInt32 | level, | ||
| OTUInt32 | flags, | ||
| char * | fmt, | ||
| ... | |||
| ) |
| OTInt32 strqget | ( | queue_t * | q, |
| qfields_t | what, | ||
| OTUInt8Param | pri, | ||
| long * | valp | ||
| ) |
| OTInt32 strqset | ( | queue_t * | q, |
| qfields_t | what, | ||
| OTUInt8Param | pri, | ||
| long | val | ||
| ) |
| OTInt32 testb | ( | OTByteCount | size, |
| OTInt32 | pri | ||
| ) |
| void unbufcall | ( | OTInt32 | id | ) |
| void unfreezestr | ( | queue_t * | q, |
| OTInt32 | oldpri | ||
| ) |