G From:	CSBVAX::MRGATE!info-vax-request@kl.sri.com@SMTP  5-MAY-1988 03:49  To:	ARISIA::EVERHART& Subj:	Re: Trapping broadcast messages.    U Received: from ucbvax.Berkeley.EDU by KL.SRI.COM with TCP; Sat 30 Apr 88 14:43:01-PDT , Received: by ucbvax.Berkeley.EDU (5.59/1.28)( 	id AA25341; Sat, 30 Apr 88 06:38:46 PDT9 Received: from USENET by ucbvax.Berkeley.EDU with netnews . 	for info-vax@kl.sri.com (info-vax@kl.sri.com); 	(contact usenet@ucbvax.Berkeley.EDU if you have questions)  Date: 30 Apr 88 06:07:51 GMT@ From: bsu-cs!cfchiesa@iuvax.cs.indiana.edu  (Christopher Chiesa)1 Organization: CS Dept, Ball St U, Muncie, Indiana ) Subject: Re: Trapping broadcast messages.  Message-Id: <2819@bsu-cs.UUCP>/ References: <880424153816.20a00215@NMFECC.ARPA> # Sender: info-vax-request@kl.sri.com  To: info-vax@kl.sri.com     = I tried to e-mail this response, but it bounced.  So be it...   L > I'm using smg$set_broadcast_trapping and smg$get_broadcast_message to trap= > and redirect broadcast messages.  Two questions about this:  > M > (1) Is there a way of doing this without involving SMG?  (I'm not using SMG 
 > otherwise.)  > M > (2) How you I determine the class of the broadcast message (OPER, SHUTDOWN, C > MAIL, GENERAL, etc.)?  I want to pass this information along too.  >   I You can trap broadcast messages, and select/deselect classes of them, by  J passing the appropriate parameters to the $QIO system service.  I've been K writing a program lately, part of which does precisely this.  I'll hold off M posting the source (MACRO assembler; SO THERE, Michael [sorry; inside comment K from the LAST time I posted MACRO code]) until/unless there's a request for  it.   ( Basically, you have to do the following:  8       *  Create a mailbox (using $CREMBX system service)  H       *  Assign a channel to the terminal, with associated mailbox (the <           one created above) (using $ASSIGN system service).  D       *  Set the BRDCSTMBX terminal-mode characteristic ON, and the G           BROADCAST terminal-mode characteristic OFF (using $QIO system            service).   G       *  Optionally, select the broadcast-message classes you wish the  +           terminal to receive, using $QIO .   M    -- after doing all this, any broadcast messages that would normally appear L       on the terminal screen, will be directed to the mailbox instead.  WhatN       you do with them once this is set up, is your business.  Options includeK       reading the mailbox whenever YOU are ready to look at the broadcasts, N       and setting a "write-attention AST" on the mailbox so that a routine youN       specify can be executed IMMEDIATELY when data is written to the mailbox.  N    -- and don't forget to "clean up" all this jazz when your program executes;N       that means saving the original terminal characteristics for later resto-M       ration, for one thing...  Terminal characteristics will NOT be automat- G       ically restored by VMS exit handlers when your image terminates.   --  7 UUCP: <backbones>!{iuvax,pur-ee,uunet}!bsu-cs!cfchiesa  ? cfchiesa@bsu-cs.UUCP                                            