From - Sat Mar 13 17:01:45 1999 Path: reader1.news.rcn.net!feed1.news.rcn.net!rcn!news.maxwell.syr.edu!newsfeed.nacamar.de!unlisys!news.snafu.de!newsfeed01.btx.dtag.de!newsmm00.btx.dtag.de!news.btx.dtag.de!not-for-mail From: Joerg.Spilling@t-online.de (Jörg Spilling) Newsgroups: comp.os.vms,vmsnet.internals Subject: Re: OPCOM mailbox message format Date: Sat, 13 Mar 1999 20:03:29 -0000 Lines: 109 Message-ID: <7ced2h$b2i$1@news04.btx.dtag.de> References: <36E4F36E.748B@signature.block.nospam.please> <7c50kh$sjh$1@nnrp1.dejanews.com> <36E64653.51C8@signature.block.nospam.please> <7c64lm$n8i@post.gsfc.nasa.gov> <36E9210B.18D4@signature.block.nospam.please> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Trace: news04.btx.dtag.de 921352081 11346 03641602167-0001 990313 19:08:01 X-Complaints-To: abuse@t-online.de X-Sender: 03641602167-0001@t-online.de X-Newsreader: Microsoft Outlook Express 4.72.3110.5 X-MimeOLE: Produced By Microsoft MimeOLE V4.72.3110.3 Xref: reader1.news.rcn.net comp.os.vms:224565 vmsnet.internals:5875 Trevor, first I have the code to use the OPRMBX (I have it used in another driver): /* ------------------------------------------------------------------------- -- * _AJM_WRITE_OPC_MBX - write a message into the OPC mbx * * * Inputs: * * ucb - AJM_UCB * msg - char ptr to msg * * Outputs: * * None. * */ void _ajm_write_opc_mbx (AJM_UCB *ucb, char * msg, char * user) { static OPRMSG oprmsg ; int msg_size = strlen (msg) ; int status ; struct OPC * opc ; opc = & oprmsg.opc ; if (oprmsg.hdr.msgtype == 0) { oprmsg.hdr.msgtype = MSG$_OPRQST ; oprmsg.hdr.uic = 65540 ; oprmsg.hdr.priv = -1 ; memcpy (oprmsg.hdr.account, "SYSTEM ", 8) ; oprmsg.hdr.prio = 16 ; opc->opc$b_ms_type = OPC$_RQ_RQST ; opc->opc$b_ms_target = OPC$M_NM_CENTRL | OPC$M_NM_DEVICE | OPC$M_NM_OPER1 ; opc->opc$l_ms_rqstid = 0 ; } if (user) memcpy (oprmsg.hdr.username, user, 12) ; else memcpy (oprmsg.hdr.username, "SYSTEM ", 12) ; memcpy (&opc->opc$l_ms_text, msg, msg_size) ; status = exe_std$wrtmailbox (sys$ar_oprmbx, msg_size + 8 + sizeof (SYSMSG_HDR), &oprmsg) ; if (Bad (status)) { XUCB (ucb, error) = DEV_ERR$_WRITEOPRMBX ; XUCB (ucb, sys_status) = status ; erl_std$deviceattn (0, (UCB *) ucb) ; } } /* _ajm_write_opc_mbx */ and: #pragma member_alignment save #pragma nomember_alignment /* * Define the message header for EXE_STD$WRTMAILBOX */ typedef struct _sysmsg_hdr { unsigned short msgtype ; unsigned short replymbxchan ; uint64 priv ; int uic ; char username [12] ; char account [8] ; char prio ; char unused ; } SYSMSG_HDR ; typedef struct _oprmsg_ { SYSMSG_HDR hdr ; struct OPC opc ; } OPRMSG ; #pragma member_alignment restore If you write the driver in C, you can use the kernel printf() routine (see the vms_*.h files for the definition or the driver examples) to write directly to your terminal. You can also debug a device driver on source level using the remote debug facility (is not XDELTA!) if you have questions, contact me at spi@equicon.de. I hope it helps! Joerg EQUIcon Software GmbH, Jena, Germany