Everhart, Glenn From: system@SendSpamHere.ORG Sent: Wednesday, September 09, 1998 4:29 PM To: Info-VAX@Mvb.Saic.Com Subject: Re: Telnet pseudoterminals (TNA) creation. In article <35F69D8C.317671A5@fordNO.SPAMcom>, Steve Spires writes: >Is there any way in which I can force UCX to create TNA terminals from a >specific number? Near as I can figure, a little kernel mode hackery to modify the UCB field UCB$W_UNIT_SEED of TNA0: (the telnet device template) would do the trick. The following will "hack" this field on VAX or Alpha and set the "SEED" to 500. It should ONLY be called once and, preferably, just after the TNA0 device is created. ;++ ; Copyright c. 1998 Brian Schenkenebrger and TMESIS All rights reserved. ; ; The author hereby licenses this code to Steve Spires for his use at Ford. ;-- .TITLE TNASEED ; quick and dirty ditty to set the TNA device seed .IDENT /V01.0 %8.252 bs/ .LIBRARY "SYS$LIBRARY:LIB.MLB" $UCBDEF .PSECT DATA,WRT,NOEXE,LONG DEVDSC: .ASCID /TNA0:/ .PSECT CODE,NOWRT,EXE,LONG .ENTRY TNASEED,0 $CMKRNL_S ROUTIN=MODSEED RET .ENTRY MODSEED,^M ;++ ; jsb sch$iolockr ; input: r4 : pcb address ; output: I/O mutex locked ;-- MOVL @#CTL$GL_PCB,R4 JSB @#SCH$IOLOCKR ;++ ; jsb ioc$searchdev ; input: r1 : device name ; output: r1 : device UCB ; r2 : device DDB ;-- MOVAL DEVDSC,R1 JSB @#IOC$SEARCHDEV BLBC R0,10$ MOVW #500,UCB$W_UNIT_SEED(R1) 10$: PUSHL R0 ;++ ; jsb sch$iounlock ; input: r4 : pcb address ; output: I/O mutex locked ;-- MOVL @#CTL$GL_PCB,R4 JSB @#SCH$IOUNLOCK POPL R0 RET .END TNASEED -- VAXman- OpenVMS APE certification number: AAA-0001 VAXman@TMESIS.COM