From:	CRDGW2::CRDGW2::MRGATE::"SMTP::CRVAX.SRI.COM::RELAY-INFO-VAX"  2-NOV-1989 20:17
To:	MRGATE::"ARISIA::EVERHART"
Subj:	V5.x MONITOR ETHERNET Patch

Received: From hac2arpa.hac.com ([192.48.33.2]) by CRVAX.SRI.COM with TCP; Wed,  1 NOV 89 15:58:24 PDT
Received: by hac2arpa.hac.com (5.59/SMI-DDN)
	id AA21174; Wed, 1 Nov 89 16:00:32 PST
Date: Wed, 1 Nov 89 16:00:32 PST
From: MNK@RDAC.hac.com
Message-Id: <8911020000.AA21174@hac2arpa.hac.com>
Received: by DnaMail (v1.1); Wed Nov  1 16:00:17 1989 PDT
To: "info-vax@sri.com"@hac2arpa.hac.com@ARPA.DECNET
Subject: V5.x MONITOR ETHERNET Patch


I have not seen anyone else post a VAX/VMS V5.x patch for MONITOR so I'm
going to post one.  MONITOR has some classes it can monitor that have been
disabled in the image.  The classes are:

	ETHERNET, JDEVICE, VMS1, VMS2, and VMS3

Patches have been posted in the past to enable these classes on V4.4 and
later V4.6/7 of VAX/VMS.  The code in NI_FIND_COUNTER has some bugs that
only show up if the counter specified is not present.  The DEBNA under
V4.x no longer returned the counter NMA$C_CTLIN_LBE and now under V5.x
none of the ethernet controllers returns this counter.  If a counter is
not found the display will end up displaying all zeros (0's).  This
patch makes NI_FIND_COUNTER return success and a value of 0 if the
counter specified is not found so that MONITOR ETHERNET will work.

To make all this work, extract the following patch into a file called
MONITOR.PAT.  Then do the following:

$ set default sys$login			! Pick some directory
$ copy sys$system:monitor.exe sys$login	! Create a copy of monitor.exe
$ @monitor.pat				! Patch your copy
$ define monitor sys$login:monitor.exe	! define logical name for CLI
$ set proc/priv=phy_io			! Need PHY_IO privilege
$ define ni$device ETA0:		! Your ethernet device name, not
					! 	needed for XEA0: or XQA0:
$ monitor ethernet			! Monitor Ethernet

Mike
----------------------------------------------------------------------------
Michael Kimura			Internet:	mnk@rdac.hac.com
Hughes Aircraft Company (RSG)	BITnet:		mnk@rdac.hac.com
P.O. Box 92426	  MS: R2/9A37	EDEN:		rdac::mnk
Los Angeles,  CA  90009		Telephone:	(213) 615-9775
----------------------------------------------------------------------------

			8< Cut on the dotted line
...............................................................................
$!===========================================================================
$! VAX/VMS V5.0 - V5.1-1 patch for MONITOR to enable the disabled classes:
$!
$!	ETHERNET, JDEVICE, VMS1, VMS2, and VMS3
$!
$! Copy the image SYS$SYSTEM:MONITOR.EXE into your working directory,
$! execute this file as a command file (@ it), define the logical name
$! MONITOR to specify the name of your copy of MONITOR and then you're
$! ready to go.
$!
$! Note: MONITOR ETHERNET uses promiscuous mode and therefore requires
$!	 PHY_IO privilege and only ONE user can MONITOR ETHERNET at a time.
$!
$! To connect to the ethernet device, the codes uses the first successful
$! channel it gets from the following:
$!	1) translation of NI$DEVICE
$!	2) XEA0:
$!	3) XQA0:
$!
$! 29-Mar-88 Simon Hackett
$!		modified for version V4.6 of VMS (and works fine for V4.7)
$! 11-Oct-89 Michael Kimura (mnk@rdac.hac.com)
$!		modified for version V5.1-1 of VMS
$!===========================================================================
$!
$ patch monitor.exe
!
! Enable class VMS2
!
replace 6070+348
211
exit
11
exit
!
! Enable class VMS3
!
replace 6070+39c
211
exit
11
exit
!
! Enable class JDEVICE
!
replace 6070+498
235
exit
35
exit
!
! Enable class VMS1
!
replace 6070+594
211
exit
11
exit
!
! Enable class ETHERNET
!
replace 6070+63c
211
exit
11
exit
!
! Make protocol valid (6006) reserved for customer use
!
replace 251fc+9e
0
exit
0660
exit
!
! Make NI_FIND_COUNTER return success even if counter is not found.
!
! NI_FIND_COUNTER erroneously scans CTRBUF too far since it uses
! CTRDSC.DSC$W_LENGTH (which is fixed at 512) as CTRLEN instead of
! the length returned in the IOSB in the call to $QIOW in
! NI_CONVERT_DEVICE_COUNTERS.  Counter NMA$C_CTLIN_LBE is not returned
! in the buffer so NI_FIND_COUNTER scans too far and runs into a
! counter ID of 0 which it sees as having a 0 width counter and exits
! with failure.
!
replace/ins 24760+2d9+38
'beql 24ab1'
exit
'beql 24a9d'
exit
!
replace/ins 24760+2d9+6a
'brb 24ab1'
exit
'brb 24aad'
exit
!
update
exit
$ exit

