• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..03-May-2022-

autoconf/H25-Sep-2017-17,91414,987

crypto/H25-Sep-2017-8,9826,678

decNumber/H03-May-2022-11,5087,341

html/H03-May-2022-727628

m4/H25-Sep-2017-3,1192,861

man/H25-Sep-2017-960818

msvc.makefile.includes/H25-Sep-2017-1,4761,237

softfloat/H03-May-2022-8,3626,123

util/H03-May-2022-9,9279,443

COPYRIGHTH A D26-Mar-2017351 139

INSTALLH A D26-Mar-20177.7 KiB188146

Makefile.amH A D26-Mar-201722.2 KiB753553

Makefile.inH A D03-May-202296.7 KiB2,2972,066

README.COMMADPTH A D26-Mar-20175.6 KiB150112

README.DYNMODH A D26-Mar-20174.3 KiB12673

README.ECPSVMH A D26-Mar-20176.4 KiB173113

README.HDLH A D26-Mar-201721.6 KiB698502

README.HERCLOGOH A D26-Mar-20172.4 KiB7149

README.NETWORKINGH A D26-Mar-201715.8 KiB417290

README.OSXH A D26-Mar-20172.6 KiB5846

README.SUNH A D26-Mar-20174.3 KiB11888

README.TAPEH A D26-Mar-20179.6 KiB238178

README.WIN32H A D26-Mar-20171.5 KiB3927

README.WIN64H A D26-Mar-20172.1 KiB5539

RELEASE.NOTESH A D26-Mar-201716.6 KiB357255

aclocal.m4H A D23-Sep-201738.1 KiB1,090982

assist.cH A D26-Mar-201723.6 KiB627314

awstape.cH A D26-Mar-201728.8 KiB802450

bldcfg.cH A D26-Mar-201764.1 KiB1,8271,388

bootstrap.cH A D26-Mar-201715.7 KiB511336

build_pch.cH A D26-Mar-2017166 51

cache.cH A D26-Mar-201715.6 KiB563471

cache.hH A D26-Mar-201717 KiB380171

cardpch.cH A D26-Mar-201712.4 KiB371233

cardrdr.cH A D26-Mar-201728.5 KiB917576

cckdcdsk.cH A D26-Mar-20174.9 KiB131100

cckdcomp.cH A D26-Mar-20174.5 KiB13598

cckddasd.cH A D26-Mar-2017197.4 KiB5,7674,278

cckddiag.cH A D26-Mar-201726.9 KiB674516

cckdfix.cH A D26-Mar-20173.3 KiB11719

cckdswap.cH A D26-Mar-20176 KiB169129

cckdutil.cH A D26-Mar-201796.2 KiB2,7171,928

cgibin.cH A D26-Mar-201743.1 KiB1,257928

channel.cH A D26-Mar-2017132.9 KiB3,8072,493

chsc.cH A D26-Mar-20177.2 KiB255156

chsc.hH A D26-Mar-20173.4 KiB7449

ckddasd.cH A D26-Mar-2017218.3 KiB5,9463,872

clock.cH A D23-Sep-201717.9 KiB678466

clock.hH A D26-Mar-20174.1 KiB12291

cmdtab.cH A D26-Mar-201712.9 KiB433314

cmdtab.hH A D26-Mar-201735.7 KiB715557

cmpsc.cH A D26-Mar-201779.3 KiB2,0131,401

codepage.cH A D26-Mar-201771.1 KiB1,107957

codepage.hH A D26-Mar-2017680 2516

comm3705.cH A D26-Mar-201783 KiB2,3991,834

comm3705.hH A D26-Mar-20173.3 KiB7763

commadpt.cH A D26-Mar-2017141.9 KiB3,5622,812

commadpt.hH A D26-Mar-20178.1 KiB146123

con1052c.cH A D26-Mar-201714.4 KiB436270

config.cH A D26-Mar-201741.4 KiB1,369961

config.h.inH A D26-Mar-201718.4 KiB695474

configureH A D03-May-2022859.4 KiB28,10421,887

configure.acH A D23-Sep-201770 KiB1,9491,557

console.cH A D26-Mar-2017125.4 KiB3,7222,487

conspawn.cH A D26-Mar-20177.7 KiB20494

control.cH A D26-Mar-2017264.4 KiB7,3674,602

cpu.cH A D26-Mar-201767.6 KiB1,9851,395

cpuint.hH A D26-Mar-201725.4 KiB741519

crypto.cH A D26-Mar-20179 KiB278187

crypto.hH A D26-Mar-20171.5 KiB2821

ctc_ctci.cH A D26-Mar-201749.2 KiB1,553949

ctc_lcs.cH A D26-Mar-201790 KiB2,7111,731

ctcadpt.cH A D23-Apr-2017132.9 KiB3,5982,261

ctcadpt.hH A D26-Mar-201727.2 KiB719414

dasdblks.hH A D26-Mar-201722.8 KiB393296

dasdcat.cH A D26-Mar-20177.3 KiB349269

dasdconv.cH A D26-Mar-201736 KiB905597

dasdcopy.cH A D26-Mar-201723.8 KiB685586

dasdinit.cH A D26-Mar-201710.6 KiB286189

dasdisup.cH A D26-Mar-201726.8 KiB721469

dasdload.cH A D26-Mar-2017203.9 KiB5,1603,320

dasdls.cH A D26-Mar-201716.5 KiB498354

dasdpdsu.cH A D26-Mar-201713 KiB368222

dasdseq.cH A D26-Mar-201748.9 KiB1,188801

dasdtab.cH A D23-Apr-201729.6 KiB597380

dasdtab.hH A D26-Mar-20177.9 KiB155108

dasdutil.cH A D26-Mar-201784.7 KiB2,2401,560

dat.cH A D26-Mar-2017710 3318

dat.hH A D23-Apr-2017100.5 KiB2,4471,345

decimal.cH A D26-Mar-201753.8 KiB1,427821

devtype.hH A D26-Mar-20172.8 KiB7662

dfp.cH A D26-Mar-2017193.6 KiB5,0862,917

diagmssf.cH A D26-Mar-201731.1 KiB758459

diagnose.cH A D26-Mar-201724.3 KiB680360

dmap2hrc.cH A D26-Mar-20177.6 KiB211149

dyngui.cH A D26-Mar-201767.4 KiB2,1521,447

dyninst.cH A D26-Mar-201714.8 KiB471367

ecpsvm.cH A D23-Sep-201798.1 KiB3,0402,301

ecpsvm.hH A D23-Sep-201710.8 KiB391292

esa390.hH A D26-Mar-2017129.8 KiB2,2461,774

esame.cH A D26-Mar-2017318.7 KiB8,9025,270

external.cH A D26-Mar-201720.3 KiB610369

faketape.cH A D26-Mar-201729.5 KiB793442

fbadasd.cH A D26-Mar-201756.1 KiB1,5921,070

feat370.hH A D26-Mar-20172.7 KiB6920

feat390.hH A D26-Mar-20173.6 KiB9984

feat900.hH A D26-Mar-20177.2 KiB150124

featall.hH A D26-Mar-201712 KiB240207

featchk.hH A D26-Mar-201716.5 KiB621468

feature.hH A D26-Mar-201722 KiB817690

fillfnam.cH A D26-Mar-20176.3 KiB203148

fillfnam.hH A D26-Mar-2017252 104

float.cH A D26-Mar-2017268.4 KiB8,0364,989

fthreads.cH A D26-Mar-201758.7 KiB1,8251,090

fthreads.hH A D26-Mar-201713.5 KiB419226

general1.cH A D31-May-2017161.7 KiB4,7023,003

general2.cH A D26-Mar-201796.9 KiB2,9041,879

general3.cH A D26-Mar-2017149.3 KiB3,8522,048

getopt.cH A D26-Mar-201719.1 KiB519336

getopt.hH A D26-Mar-20173.4 KiB11158

hao.cH A D26-Mar-201721.3 KiB704441

hbyteswp.hH A D26-Mar-20173.8 KiB12791

hchan.cH A D26-Mar-20177.6 KiB224153

hchan.hH A D26-Mar-2017570 206

hconsole.cH A D26-Mar-201734.4 KiB1,066612

hconsole.hH A D26-Mar-20174.5 KiB11661

hconsts.hH A D26-Mar-201711.1 KiB318244

hdl.cH A D26-Mar-201730 KiB1,249894

hdl.hH A D26-Mar-201711.8 KiB344253

hdlmain.cH A D26-Mar-201710 KiB272202

hdteq.cH A D26-Mar-20172.7 KiB11566

herc_getopt.hH A D26-Mar-20171.2 KiB4528

hercifc.cH A D26-Mar-20177.3 KiB248187

hercifc.hH A D03-May-20223.2 KiB10577

herclin.cH A D26-Mar-20173.4 KiB12762

hercules.cnfH A D26-Mar-20175.2 KiB127107

hercules.hH A D26-Mar-20174.1 KiB13372

hercver.rcH A D26-Mar-20173.3 KiB10985

hercwind.hH A D26-Mar-20176.8 KiB225144

hetget.cH A D26-Mar-201717.2 KiB825492

hetinit.cH A D26-Mar-20174.5 KiB229169

hetlib.cH A D26-Mar-201753.6 KiB2,362721

hetlib.hH A D26-Mar-20178.3 KiB193120

hetmap.cH A D26-Mar-20179.5 KiB412317

hettape.cH A D26-Mar-201718 KiB530324

hetupd.cH A D26-Mar-20178.6 KiB381285

hextapi.hH A D26-Mar-2017992 3719

hexterns.hH A D26-Mar-201715.1 KiB432350

history.cH A D26-Mar-20175.3 KiB220172

history.hH A D26-Mar-2017463 1913

hmacros.hH A D26-Mar-201722.9 KiB747509

hostinfo.cH A D26-Mar-20174.5 KiB11283

hostinfo.hH A D26-Mar-20171.6 KiB4929

hostopts.hH A D26-Mar-201714.6 KiB370165

hsccmd.cH A D26-Mar-2017221.4 KiB7,5715,867

hscmisc.cH A D26-Mar-201748 KiB1,4951,074

hscutl.cH A D03-May-202223.5 KiB911668

hscutl.hH A D26-Mar-20177 KiB21092

hscutl2.cH A D26-Mar-20178.3 KiB234121

hsocket.cH A D26-Mar-20173.5 KiB14358

hsocket.hH A D26-Mar-20175.7 KiB154114

hstdinc.hH A D26-Mar-20175.4 KiB230192

hstdint.hH A D26-Mar-20171.4 KiB3822

hstructs.hH A D23-Apr-201788.6 KiB1,6371,248

hsys.cH A D26-Mar-20171.4 KiB4130

hthreads.hH A D26-Mar-20179.3 KiB237183

httpmisc.hH A D26-Mar-20172.8 KiB12382

httpserv.cH A D26-Mar-201724.6 KiB812574

htypes.hH A D26-Mar-20179.1 KiB254190

ieee.cH A D26-Mar-2017126.6 KiB4,2622,673

impl.cH A D26-Mar-201722 KiB692440

inline.hH A D26-Mar-201730.7 KiB739372

io.cH A D26-Mar-201737.6 KiB1,260744

ipl.cH A D26-Mar-201720.2 KiB631394

linklist.hH A D26-Mar-201711.1 KiB42079

loadparm.cH A D26-Mar-201710.8 KiB325185

logger.cH A D26-Mar-201718.3 KiB618433

logger.hH A D26-Mar-20171.6 KiB6746

logmsg.cH A D26-Mar-20177.7 KiB318245

losc.cH A D26-Mar-20172.1 KiB8369

ltdl.cH A D26-Mar-2017100.5 KiB4,5043,355

ltdl.hH A D26-Mar-201712.4 KiB367206

machchk.cH A D26-Mar-201712.8 KiB409288

machdep.hH A D26-Mar-201723.1 KiB805580

makefile-dllmod.msvcH A D26-Mar-20172.6 KiB6955

makefile.msvcH A D26-Mar-2017326 111

memrchr.cH A D26-Mar-20171 KiB4024

memrchr.hH A D26-Mar-20171 KiB3922

omatape.cH A D26-Mar-201744.9 KiB1,253763

opcode.cH A D26-Mar-2017248.8 KiB6,9086,482

opcode.hH A D26-Mar-2017152.5 KiB4,1733,538

panel.cH A D26-Mar-2017103.4 KiB3,0582,440

parser.cH A D26-Mar-20174.1 KiB15146

parser.hH A D26-Mar-2017576 2819

pfpo.cH A D26-Mar-201711.9 KiB580487

plo.cH A D26-Mar-201746 KiB1,6581,149

printer.cH A D26-Mar-201748.1 KiB1,4701,042

pttrace.cH A D26-Mar-201719.3 KiB665564

pttrace.hH A D26-Mar-20175 KiB11698

qdio.cH A D26-Mar-20173 KiB13586

qeth.cH A D26-Mar-201712.1 KiB353200

scedasd.cH A D26-Mar-201724.7 KiB881639

scsitape.cH A D26-Mar-201778.1 KiB2,2221,155

scsitape.hH A D26-Mar-20175.6 KiB10237

service.cH A D26-Mar-201768.1 KiB1,9271,282

service.hH A D26-Mar-201725 KiB526384

shared.cH A D26-Mar-201798.1 KiB3,0602,240

shared.hH A D26-Mar-201724.3 KiB507157

sie.cH A D26-Mar-201746.4 KiB1,394999

sllib.cH A D26-Mar-201740.2 KiB1,723679

sllib.hH A D26-Mar-20177.9 KiB287197

sockdev.cH A D26-Mar-201716.9 KiB614402

sockdev.hH A D26-Mar-20172.4 KiB5320

sr.cH A D26-Mar-201744.4 KiB1,3551,183

sr.hH A D26-Mar-201722.2 KiB640468

stack.cH A D26-Mar-201756 KiB1,436779

strsignal.cH A D26-Mar-201710.3 KiB391249

tapeccws.cH A D26-Mar-2017171.1 KiB4,4542,352

tapecopy.cH A D26-Mar-201730.8 KiB876628

tapedev.cH A D26-Mar-201788.9 KiB2,5451,608

tapedev.hH A D26-Mar-201741.7 KiB796507

tapemap.cH A D26-Mar-20177.4 KiB217149

tapesplt.cH A D26-Mar-201710.3 KiB285199

timer.cH A D26-Mar-20179.5 KiB285176

trace.cH A D26-Mar-201739 KiB1,184859

tt32api.hH A D26-Mar-201712 KiB244152

tuntap.cH A D03-May-202228.4 KiB995599

tuntap.hH A D26-Mar-201712.2 KiB292197

vector.cH A D26-Mar-201725.8 KiB936500

version.cH A D26-Mar-20176.8 KiB270207

version.hH A D26-Mar-20171.6 KiB4629

vm.cH A D26-Mar-201761.1 KiB1,7121,170

vmd250.cH A D26-Mar-201783.4 KiB2,2971,522

vmd250.hH A D26-Mar-20171.2 KiB2514

vstore.cH A D26-Mar-2017759 3518

vstore.hH A D26-Mar-201751.2 KiB1,092596

w32chan.cH A D26-Mar-201725.2 KiB643335

w32chan.hH A D26-Mar-20171.8 KiB4319

w32ctca.cH A D26-Mar-201715 KiB440299

w32ctca.hH A D26-Mar-20171.6 KiB4424

w32dl.hH A D26-Mar-2017575 2314

w32mtio.hH A D26-Mar-201715.6 KiB367238

w32stape.cH A D26-Mar-201739.3 KiB1,222759

w32stape.hH A D26-Mar-20171.4 KiB4322

w32util.cH A D26-Mar-2017101.6 KiB2,9411,609

w32util.hH A D26-Mar-20178.7 KiB235125

xstore.cH A D26-Mar-201721.5 KiB624407

README.COMMADPT

1Preliminary 2703 BSC Support
2
3Only allows Point to Point connection.
4
5
6Hercules device statement :
7
8CCUU 2703 lport=port lhost=host rhost=host rport=port dial=IN|OUT|INOUT|NO
9          [pto=nnn|0|-1] [rto=nnn|0|-1] [eto=nnn|0|-1]
10
11lport : the local TCP port number or service name on which the line will listen
12        for incoming TCP calls
13        This parameter is irrelevant and is ignored for DIAL=OUT
14        for DIAL=IN|INOUT|NO, this parameter is mandatory
15
16cwlhost : The local interface IP address on which to listen.
17        if not specified, all interfaces will be used.
18        ex:
19        lhost=127.0.0.1 : Only accept calls from local host
20        lhost=192.168.0.1 : Only accept calls from hosts
21                that can be routed through the interface
22                that has an IP address of 192.168.0.1
23                If there is no 192.168.0.1 local IP address,
24                this will fail.
25        This parameter is irrelevant and is ignored for DIAL=OUT
26        for DIAL=IN|INOUT|NO, this parameter is mandatory
27
28
29rhost : the remote host ip address or name
30        This parameter is irrelevant and is ignored for DIAL=IN
31        for DIAL=OUT|INOUT|NO, this parameter is mandatory
32
33rport : the remote port number or service name
34        This parameter is irrelevant and is ignored for DIAL=IN
35        for DIAL=OUT|INOUT|NO, this parameter is mandatory
36
37rto, pto, eto : Read, Poll and Enable Timeout values in miliseconds.
38        specifying 0 means No Timeout (infinite wait). -1 Means immediate
39        timeout.
40
41        The read timeout is how long the handler will wait for an ending
42        character after the last character was received or the I/O initiated.
43        The read timeout default is 3000 Miliseconds (3 Seconds)
44
45        The poll timeout is how long the handler will wait for a polled
46        station to respond to a poll request.
47        The poll timeout default is 3000 Miliseconds (3 Seconds)
48
49        The enable timeout is how long the handler will wait for the TCP
50        connection to be established.
51        The enable timeout default is 10000 Miliseconds (10 Seconds), except
52        if DIAL=NO is also specified, in which case the enable timeout defaults
53        to 0.
54
55        Note : the ETO parameter is ignored if DIAL=NO is not specified.
56               for a dialed line, there is no enable timeout. If the eto
57               parameter is specified and DIAL is not "NO", then a warning message
58               is issued and the parameter is ignored.
59
60
61dial=IN|OUT|INOUT|NO
62        Indicate call direction (if any).
63        This parameter also modifies the behaviour of certain CCWS
64        as well as TCP incoming call handling :
65
66        ENABLE :
67                DIAL=IN|DIAL=INOUT
68                        Wait forever for an incoming call
69
70                DIAL=NO
71                        Completes immediatelly if a call
72                        is already present
73                        Otherwise, attemps connecting to the
74                        remote end
75                        if the call fails, ENABLE exits with
76                        Int Req status
77                DIAL=OUT
78                        Enable is not a valid CCW for a DIALOUT
79                        only line
80        DIAL :
81                DIAL=IN|DIAL=NO
82                        DIAL is not a valid CCW for a DIAL IN
83                        or non-switched line
84                DIAL=OUT|DIAL=INOUT
85                        The outgoing call is attempted
86
87        Incomming TCP call :
88                In any case, if a call is already present, the
89                call is rejected.
90
91                DIAL=NO :
92                        The call is accepted, even if no CCW is
93                        currently executing
94
95                DIAL=OUT :
96                        The call is rejected
97
98                DIAL=IN|DIAL=INOUT
99                        The call is accepted if the line is currently
100                        executing an ENABLE ccw.
101
102
103The communication protocol :
104
105        The communication protocol is basic. Every character written
106        by the guest program with a WRITE CCW is transfered to the
107        remote end, untranslated and untouched (except for Transparent
108        BSC rules which deem that DLE characters are doubled when the
109        program has previously written a DLE/STX sequence).
110
111
112Dial data format
113
114        Dial data is originally as follows :
115                x x x x 0 0 0 0 : Dial # 0
116                  .........
117                x x x x 1 0 0 1 : Dial # 9
118                x x x x 1 1 0 0 : EON
119                x x x x 1 1 0 1 : SEP
120
121        In order to perform an outgoing call,
122        the data must follow these specifications :
123
124        N[N[N]]SEPN[N[N]]SEPN[N[N]]SEPN[N[N]]]SEPN[..[N]][EON]
125
126        Where N is any dialing number from 0 to 9 and SEP
127        is the separator.
128
129        The 4 first group of digits represet the IP address.
130        The last group represent a TCP port number.
131
132        For example (* is the SEP character representation) :
133
134        192*168*0*1*8888 : will issue a TCP connection to
135                           192.168.0.1 port 8888
136
137        The EON is optional. If it is present, it must be the
138        last character of the dial data.
139
140Bugs, Caveats
141
142        The Address Prepare is not implemented
143        The POLL CCW Has not been tested
144        Group DIAL IN is not implemented
145        DIAL CCW Not tested
146        There is 1 thread per line, when there should be 1 thread for ALL lines.
147        MAXDEVT may have to be adjusted under WINDOWS to accomodate for a large number of lines
148            (because some I/O may take an undefinite amount of time).
149        There is no 'REAL' Bsc line support yet.
150

README.DYNMOD

1-------------------------------------------------------------------------------
2
3                       Hercules Dynamic Modules
4
5                             (on Windows)
6
7-------------------------------------------------------------------------------
8
9                             Required Files
10
11
12Required files:
13
14  makefile:       "{modname}.msvc"    defines module name and source file(s)
15  resource file:  "{modname}.rc"      the module's version resource file
16
17-------------------------------------------------------------------------------
18
19                            makefile stub format
20
21
22Required makefile format:
23
24    # Module name:
25
26    DYNMOD = {modname}
27
28    # Source files:
29
30    DYNOBJ = \
31        $(O){srcfile1}.obj \
32        $(O){srcfile2}.obj \
33        $(O){srcfile3}.obj
34        ... etc...
35
36  Your makefile is !INCLUDEd as part of Hercules's main makefile and
37  thus your dynamic module gets built along with the rest of Hercules.
38
39-------------------------------------------------------------------------------
40
41                          The MAKE/BUILD command
42
43
44Building (making):
45
46
47    dynmake.bat {projdir} {modname} {build_type} {num_cpus} [-a|clean]
48
49  e.g.:
50
51   "X:\Hercules\dynmake.bat"  "$(SolutionDir)"  {modname}  RETAIL  32  -a
52
53
54  The {projdir} value you pass MUST be a fully qualified path to your
55  dynamic module's project directory where all of your files are. The
56  dynamke.bat command you invoke should also be a fully qualifed path
57  to the desired Hercules dynmake.bat file. The other arguments (i.e.
58  {build_type}, {num_cpus}, etc) are identical to the values normally
59  specified for the main Hercules "makefile.bat" command used to build
60  Hercules with. Refer to makefile.bat for details.
61
62-------------------------------------------------------------------------------
63
64             Pre-Build event and Post-Build event callbacks
65
66
67Optional files:
68
69    prebuild.bat   Called before the main Hercules makefile.bat is called.
70    postbld.bat    Called after  the main Hercules makefile.bat is called.
71
72  During the build process, dynmake.bat checks if the file exists in your
73  specified project directory and if it does, calls it with the following
74  parameters:
75
76        {hercdir}  {modname}  {build_type}  {num_cpus}  [-a|clean]
77
78  The {hercdir} value is the fully qualified path the main Hercules source
79  code directory. The other parameters are the same values that you passed
80  to the dynmake.bat command.
81
82-------------------------------------------------------------------------------
83
84                            Resource Compiler
85
86
87For your convenience the following #defines are also passed to the resource
88compiler on the command-line during the actual build process:
89
90    VERSION              The Hercules version string  (e.g. "3.06-svn-5602")
91    TARGETFILENAME       Your module name string      (e.g. "{modname}.dll")
92    MAX_CPU_ENGINES_STR  Number of CPUs as a string   (e.g. "32")
93
94  Use them in your .rc resource file's VERSIONINFO structure as needed.
95
96-------------------------------------------------------------------------------
97
98                            The Build Process
99
100
101Dynmake.bat first creates a work subdirectory beneath Hercules's main source
102code directory using the same name as the {modname} you passed to it.
103
104It then calls your prebuild.bat file if it exists. Use this callback to
105perform any pre-build adjustments to your source files that may be necessary
106before the actual build process begins.
107
108When your prebuild.bat returns, it then copys all *.c, *.h, *.rc, *.rc2 and
109*.msvc files from your project directory into its {modname} subdirectory and
110invokes Hercules's primary "makefile.bat" script to perform the actual build.
111
112When the build is done it then calls your postbld.bat callback if it exists.
113You can use this callback to copy the resulting binary from Hercules's output
114directory to your project directory or whatever other post-build processing
115your product may require.
116
117-------------------------------------------------------------------------------
118
119                            More Information
120
121
122For additional information regarding dynamic modules please see the "Hercules
123Dynamic Loader" readme document called "README.HDL".
124
125-------------------------------------------------------------------------------
126

README.ECPSVM

1ECPS:VM : Extended Control Program Support : VM/370
2               - AND -
3Extended VM Assists - Partial Privop Simulation And Virtual Interval Timer
4
5************ CHANGE LOG ****************
607/07/03 : Changed description for configuration and commands
7           ECPS:VM changed to ECPSVM (config)
8           ecpsvm changed to ecpsvm (command)
9
10     - PARTIAL IMPLEMENTATION DOCUMENTATION -
11
12*************************
13
14Affected operating systems :
15
16VM/370 Release 6 (PTFs required - PLC 029 works fine)
17
18up to
19
20VM/SP 6 (with or without HPO option)
21
22--- VM/XA SF, VM/XA SP, VM/ESA and z/VM do NOT use these Assists,
23    but rely on the SIE instruction to perform some of these functions.
24
25A VM/SP Guest (or VM/370 Guest with 4K Storage key updates) running under
26[z/]VM[/[XA|ESA]] will NOT have access to either the CP assists or VM Assists.
27The ECPS:VM Feature is disabled when running under SIE.
28
29************************
30
31How to enable VM Assists :
32
33In the HERCULES.CNF file, in the configuration section :
34
35ECPSVM YES|NO|LEVEL n (where n is the requested level.)
36
37If "YES" is specified, the most appropriate level is returned (Level 20)
38
39n Doesn't affect the operations of the assist but what level is reported to
40        the program.
41
42    - CAUTION - Use the 'n' form is not recommended, and is only provided
43                for engineering use.
44
45**********
46
47New panel command : 'ecpsvm'
48
49Subcommands :
50
51ecpsvm stats : Shows ECPS:VM Call/Hit statistics
52ecpsvm enable/disable feature : Enable/Disable named feature
53ecpsvm help : (guess)
54ecpsvm debug [feature|ALL|CPASSIST|VMASSIST] : Turn on debugging messages for a specific feature
55ecpsvm nodebug [feature|ALL|CPASSIST|VMASSIST] : Turn off...
56ecpsvm level [nn] : Force ECPS:VM to report a certain support level
57        (or display the current support level)
58
59NOTE : ecpsvm disable does NOT entirelly disables CP ASSISTS. If it did (i.e. generate a program interrupt whenever a E6xx instruction is invoked) VM would abend immediatelly. Rather, ommit the ECPSVM statement in the configuration file.
60
61To determine the feature names, type "ecpsvm enable ALL".
62        All the enabled features will be listed.
63
64the ecpsvm command is NOT case sensitive
65
66**********
67
68Determining if the assist is used by VM :
69
70Use the 2 following CLASS A commands :
71
72CP QUERY CPASSIST
73CP QUERY SASSIST
74
75Both queries should return 'ON'.
76
77Also use the following CLASS G Command :
78
79CP QUERY SET
80
812nd line should indicate :
82
83ASSIST ON SVC TMR
84
85***********
86
87Technical information
88
89the CP Assists provides The VM SCP with various microcoded instructions to shorten the supervisor pathlength. All microcoded instructions are priviledged instructions and have an opcode of E6xx. They are native representation of what the SCP would do in a similar case. For all cases where the assist is not able to resolve a situation, the E6XX instructions resolve to a no-op, thus leaving the responsability of the task to the original CP Code.
90
91The VM Assists alters the behaviour of certain priviledged instructions when executed in problem state (controled by the Problem State bit in the PSW) either by completely simulating the instruction (when feasable), Branching directly to the CP support module for that instruction (therefore bypassing Program interruption processing and instruction decoding), or generating a Program interruption otherwise.
92
93The VM Virtual Interval Timer assist allows updating of a Virtual Machine virtual interval timer directly by the microcode.
94
95Both CP And VM Assists are controled by real Control Register 6 which control availability, and behaviour of the assists.
96
97************
98
99Troubleshooting
100
101In the event that a certain CP or VM Assist disrupts normal operations, it is possible to selectivelly disable each discrete component. The best method is to disable ALL VM and CP Assists (Except STEVL and SSM if done prior to IPL) and to enable each feature until the problem occurs. If it is unknown whether the problem lies in the VM or CP Assist, it is also possible to enable/disable the entire group of assists.
102
103See the EVM ENA|DISA Commands.
104
105EVM STA allows to see how often each assist is invoked. The hit and hit ration makes it possible to determine how effective the assists are.
106
107A Low hit ratio may be normal in some situations (for example, the LPSW Hit ration will be very low when running VM under VM, because most PSW switches cannot be resolved by the assist)
108
109A Low invocation count simply shows that in THAT particular situation, the related assist is not used often (For example, there are very few LCTLs when running CMS).
110
111Some assists are just invoked once at IPL (STEVL). This is normal behaviour.
112
113************
114
115Implemented Assists :
116
117CP ASSISTS :
118FREEX, FRETX (CP Free Storage management)
119DISP0, DISP1, DISP2 (CP Dispatching)
120PGLOCK, PGULOCK (Real frame locking/unlocking)
121TRANBRNG, TRANLOCK (Virtual frame addressing/locking)
122SCNRU, SCNVU (Real/Virtual Device control block scan)
123STEVL (Store ECPS:VM support level)
124
125VM ASSISTS :
126Virtual Interval Timer
127LPSW Simulation
128SSM Simulation
129SVC Simulation
130LCTL Simulation
131
132Non-Implemented assists :
133
134CP ASSISTS :
135FREE/FRET : (Original (up to level 19)
136            CP Storage Management - replaced by FREEX/FRETX)
137CCWGN, DFCCW, DNCCW, UXCCW : CCW/CSW Translation assists (Soon)
138LCSPG : Locate Changed Shared Page (Soon)
139VIPT, VIST : Virtual Translation Page/Segment Invalidation (Soon)
140LINK/RETURN (SVC 8/SVC 12) (Soon)
141Prefered Machine Assists (Insufficient information)
142.. Maybe others ...
143
144VM ASSISTS :
145V=R Shadow Table Bypass assists (Including LRA instruction)
146        (note : The V=R Shadow Table Bypass assist is a feature which requires the guest program
147        to be aware of the feature (Page 0 Relocation))
148SIO (In progress - Partial sim)
149DIAG (In progress - Partial sim)
150IUCV (In Progress - Partial sim - VM/SP4 or later only)
151STxSM (Almost never invoked - ECMODE Only)
152ISK/SSK/ISKE/SSKE/IVSK (Extended Key Ops assist)
153VM Assists for MVS
154.. Maybe others ...
155
156*****************
157BUGS & Caveats :
158
159ECPS:VM will NOT work in an AP or MP system. An AP or MP generated system
160locks the control blocks being manipulated by the assisted functions
161(VMBLOK, RDEVBLOK, VDEVBLOK, etc..). However, the current ECPS:VM
162implementation doesn't lock any of those structures. Therefore, CP will
163fairly quickly abend because it will find some of the control blocks
164to not have been locked when they should (various LOKXXX abends).
165
166Consequently, ECPS:VM must be disabled when a AP or MP system is used.
167
168*****************
169
170Have Fun,
171
172--Ivan
173

README.HDL

1/*
2                     Hercules Dynamic Loader
3
4    The dynamic loader is intended to supply a loading and linking
5    mechanism, whereby routines, commands, instructions and functions
6    can be dynamically added to hercules, without the need to rebuild
7    or even restart hercules.
8
9    The loader can be controlled by the following hercules commands:
10
11        ldmod <module list>    - Load modules named in module list
12        rmmod <module list>    - Unload modules named in list
13        lsmod                  - List all modules and entry points
14        lsdep                  - List all dependencies
15
16        The ldmod statement may also appear in the hercules
17        configuration file.
18
19        configuration statement:
20        modpath <pathname>     - Specifies where modules are loaded from
21
22
23    The loader has 2 basic functions module load and module unload.
24
25    Module load:
26
27    int hdl_load(char *name, int flags);
28
29        Where name is the module name, this name may include the
30        path.  If no path is given then the module is loaded from
31        the default library search order.  Note that this is
32        different from the standard search order.
33
34        flags may be one of the following:
35
36         HDL_LOAD_DEFAULT or 0  -  Default load
37         HDL_LOAD_MAIN          -  Reserved for hercules use
38         HDL_LOAD_NOUNLOAD      -  Module cannot be unloaded
39         HDL_LOAD_FORCE         -  Override dependency check
40         HDL_LOAD_NOMSG         -  Do not issue any error messages
41
42        This function returns a zero value when the load is successful.
43
44
45    Module unload:
46
47    int hdl_dele(char *name);
48
49        Where name is the name of the module that is to be unloaded.
50
51        This function returns a zero value when the unload is successful.
52
53
54    Resolving Symbols:
55
56    void * HDL_FINDSYM(char *symbolname);
57
58        This function will return the entry point of symbolname or
59        zero when the symbol cannot be resolved.
60
61    void * HDL_FINDNXT(current_entry point);
62
63        This function will return the previous entry point.
64        That is, the entry point which was current before the entry point
65        as identified by current_entry point was registered.
66
67        This function is intended to allow a module to call the original
68        routine.  An example of this is given in the panel_command entry
69        as listed below.
70
71
72    There are some special considerations for systems that do not support
73    the concept of back-linking.  Back-linking is the operating system
74    support of dynamically resolving unresolved external references in
75    a dynamic module, with the main module, or other loaded modules.
76    Cygwin does not support back-linking and Cygwin specials are listed
77    in this example with #if defined(WIN32).
78
79
80    Some additional notes:
81
82    Unload will remove all references to a specific module, but currently
83    it will not actually remove the loaded module from memory.  This is
84    because there is no safe way (yet) to synchronize unloading of code
85    and, besides, it may still be in use.  This should however pose no
86    practical limitations.
87
88    When a module lists a new dependency, that dependency will be regis-
89    tered.  Unloading the module does not remove the dependency, this is
90    to be consistent with the previous note about unloading.
91
92
93
94    Diagnose F14 - dll interface
95
96    Purpose:
97
98    Allow external routines to be called from OS running under hercules
99    external routines must reside in hercules dll's
100
101
102    Instruction:
103
104      Format:
105
106      83 r1 r3 d2(b2)
107
108      r1: register containing real address of external routine name to be
109          called this routine name is defined as CL32, and is subject to
110          EBCDIC to ASCII translation under control of hercules codepages.
111          This parameter must be 32 byte aligned.
112
113      r3: register containing user parameter.
114
115      d2(b2): 0xF14
116
117
118    External routine:
119
120      void xxxx_diagf14_routine_name(int r1, int r3, REGS *regs);
121
122      xxxx_diagf14_ prefix to routine_name
123      xxxx being either s370, s390 or z900 depending on architecture mode.
124
125      The instruction is subject to machine malfunction checking.
126      The external routine may be interrupted when an extended wait or loop
127      occurs.
128
129
130*/
131
132#include "hercules.h"
133#include "devtype.h"
134#include "opcode.h"
135
136
137/*   Local definitions   */
138
139
140static void *gui_cpu_state(REGS *regs)
141{
142    void *(*prev_cpu_state)(REGS *);
143
144    /* CPU status update processing */
145
146    /* Call higher level routine if one exists */
147    if((prev_cpu_state = HDL_FINDNXT(gui_cpu_state)))
148        return prev_cpu_state(regs);
149
150    return NULL;
151}
152
153
154void  *ProcessCommand (char *command)
155{
156void * (*prev_panel_command)(char *);
157
158    if (strncasecmp(command,"ourcmd",6) == 0)
159    {
160        logmsg ("This is our command\n");
161    }
162    else
163        /* Call higher level command handler */
164        if((prev_panel_command = HDL_FINDNXT(ProcessCommand)))
165            return prev_panel_command(command);
166
167    return NULL;
168}
169
170
171/*
172    The dependency section is - for all intents and purposes - called
173    before the module is loaded.  Its function is to check that there
174    are no incompatibilities between this module and the version of
175    hercules that we are running.  Dependencies are identified by
176    name, this name is given on the HDL_DEPENDENCY statement.
177
178    Each dependency then has a version code, and a size code, where
179    the version code is a character string, and the size code an
180    integer value.  If the version or size codes do not match with
181    those in the hercules main module, the module cannot be loaded.
182    The version is usually a character string that identifies the
183    version of the component, and the size is to be the size of
184    the component in the case of structures or unions.
185
186    Version and size should be coded as following:
187
188      #define HDL_VERS_SOMETHING  "1.0"
189      #define HDL_SIZE_SOMETHING  sizeof(SOMETHING)
190
191    where SOMETHING can be a structure or other component.
192
193    the associated dependency statement:
194
195      HDL_DEPENDENCY(SOMETHING);
196
197    When a dependency is given that has not yet been registered,
198    it will be registered, such that it can be checked in subsequent
199    module loads.
200
201    The dependency section is mandatory.
202
203*/
204
205HDL_DEPENDENCY_SECTION;
206{
207     /* Define version dependencies that this module requires */
208     HDL_DEPENDENCY ( HERCULES );
209     HDL_DEPENDENCY ( SYSBLK   );
210     HDL_DEPENDENCY ( REGS     );
211     HDL_DEPENDENCY ( DEVBLK   );
212}
213END_DEPENDENCY_SECTION;
214
215
216/*
217    The registration exports labels and their associated entry points
218    to hercules, such that the symbols and associated entry points may
219    be known to hercules and any other module that may have been loaded.
220    The registration section is called once during module load.
221
222    If we have registered a function that is also called from this DLL,
223    then it must also be listed in the resolver section.  This to ensure
224    that the symbol is properly resolved when other modules are loaded.
225
226    The registration section is optional.
227
228*/
229
230
231HDL_REGISTER_SECTION;
232{
233    /* These are the entry points we export to Hercules
234       All functions and labels used this dll must be static
235       and non exportable, this to ensure that no foreign
236       names are included by the system loader on systems
237       that provide back-link support (mostly *nix systems)
238    */
239
240    HDL_REGISTER ( daemon_task, external_gui_interface );
241    HDL_REGISTER ( debug_cpu_state, gui_cpu_state );
242    HDL_REGISTER ( panel_command, ProcessCommand );
243}
244END_REGISTER_SECTION;
245
246
247/*
248    The resolver section imports the entry points of symbols that
249    have been previously registered.
250
251    When a symbol is requested that has not been previously registered
252    then the resolve function will search the loaded modules for
253    that symbol, and register it implicitly.  This latter function
254    is mainly provided to support systems that do not have back-link
255    support (most notably Cygwin).
256
257    Entry points that are resolved should be indirect pointers, for
258    example the panel_command routine is defined as:
259
260       void *(*panel_command)(char *)
261
262    The resolver may be called multiple times, the first time it is
263    called is during module load, immediately after the registration
264    section is called.  It is subsequently called when other modules
265    are loaded or unloaded.
266
267    When a symbol cannot be resolved it will be set to NULL.
268
269    The resolver section is optional.
270
271*/
272
273
274HDL_RESOLVER_SECTION;
275{
276    /* These are Hercules's entry points that we need access to
277       these may be updated by other loadable modules, so we need
278       to resolve them here.
279    */
280
281    HDL_RESOLVE ( panel_command );
282    HDL_RESOLVE ( debug_cpu_state );
283
284    HDL_RESOLVE_PTRVAR ( my_sysblk_ptr, sysblk );
285}
286END_RESOLVER_SECTION;
287
288
289/*
290    The device section is to register device drivers with hercules.
291    It associates device types with device handlers
292
293    If a device handler is not registered for a specific device type
294    then and a loadable mode with the name of "hdtxxxx" (where xxxx
295    is the device type) exists then that module is loaded
296
297    Search order:
298        1) The most recently registered (ie loaded) device of the
299           requested device type.
300        2) Device driver in external loadable module, where the
301           module name is hdtxxxx (where xxxx is the device type
302           ie module name hdtlcs for device type LCS or hdt2703
303           for device type 2703)
304        3) If the device is listed in the alias table (hdteq.c)
305           then external module hdtyyyy will be loaded, where
306           yyyy is the base name as listed in hdteq.c.
307        The device name is always mapped to lower case when searching
308        for loadable modules.
309
310    The device section is optional
311*/
312
313HDL_DEVICE_SECTION;
314{
315    HDL_DEVICE(1052,constty_device_hndinfo);
316    HDL_DEVICE(3215,constty_device_hndinfo);
317}
318END_DEVICE_SECTION;
319
320/*  The instruction section registers inserts optional instructions,
321    or modifies existing instructions.
322
323    Instructions are generally defined with DEF_INST(instname) which results
324    in an external reference of s370_instname, s390_instname and z900_instname.
325    If an instruction is not defined for a certain architecture mode then
326    UNDEF_INST(instname) must be used for that given architecture mode.
327
328    The instruction section is optional
329*/
330
331HDL_INSTRUCTION_SECTION;
332{
333    HDL_DEFINST(HDL_INSTARCH_370,0xB2FE,new_B2FE_inst_doing_something);
334    HDL_DEFINST(HDL_INSTARCH_390|HDL_INSTARCH_900,0xB2FD,new_B2FD_inst_doing_something_else);
335}
336END_INSTRUCTION_SECTION;
337
338
339/*
340    The final section is called once, when the module is unloaded
341    or when hercules terminates.
342
343    A dll can reject being unloaded by returning a non-zero value
344    in the final section.
345
346    The final section is intended to be used to perform cleanup or
347    indicate cleanup action to be taken.  It may set a shutdown
348    flag that is used within this dll that all local functions
349    must now terminate.
350
351    The final section is optional
352*/
353
354HDL_FINAL_SECTION;
355{
356
357}
358END_FINAL_SECTION;
359
360
361
362
363Below is Fish's sample code...
364
365
366/*   Define version dependencies that this module requires...
367**
368** The following are the various Hercules structures whose layout your
369** module depends on. The layout of the following structures (size and
370** version) MUST match the layout that was used to build Hercules with.
371** If the size/version of any of the following structures changes (and
372** a new version of Hercules is built using the new layout), then YOUR
373** module must also be built with the new layout as well. The layout of
374** the structures as they were when your module is built MUST MATCH the
375** layout as it was when the version of Hercules you're using was built.
376** Further note that the below HDL_DEPENDENCY_SECTION is actually just
377** a function that the hdl logic calls, and thus allows you to insert
378** directly into the below section any specialized 'C' code you need.
379*/
380HDL_DEPENDENCY_SECTION;
381{
382     HDL_DEPENDENCY(HERCULES);
383     HDL_DEPENDENCY(REGS);
384     HDL_DEPENDENCY(DEVBLK);
385     HDL_DEPENDENCY(SYSBLK);
386     HDL_DEPENDENCY(WEBBLK);
387}
388END_DEPENDENCY_SECTION;
389
390
391/*  Register re-bindable entry point with resident version, or UNRESOLVED
392**
393** The following section defines the entry points within Hercules that
394** your module is overriding (replacing). Your module's functions will
395** be called by Hercules instead of the normal Hercules function (if any).
396** The functions defined below thus provide additional/new functionality
397** above/beyond the functionality normally provided by Hercules. Be aware
398** however that it is entirely possible for other dlls to subsequently
399** override the same functions that you've overridden such that they end
400** up being called before your override does and your override may thus
401** not get called at all (depending on how their override is written).
402** Note that the "entry-point name" does not need to correspond to any
403** existing variable or function (i.e. the entry-point name is just that:
404** a name, and nothing more. There does not need to be a variable defined
405** anywhere in your module with that name). Further note that the below
406** HDL_REGISTER_SECTION is actually just a function that the hdl logic
407** calls, thus allowing you to insert directly into the below section
408** any specialized 'C' code that you may need.
409*/
410HDL_REGISTER_SECTION;
411{
412    /*            register this       as the address of
413                  entry-point name,   this var or func
414    */
415    HDL_REGISTER( panel_command,      my_panel_command );
416    HDL_REGISTER( panel_display,      my_panel_display );
417    HDL_REGISTER( some_exitpoint,     UNRESOLVED       );
418}
419END_REGISTER_SECTION;
420
421
422/*   Resolve re-bindable entry point on module load or unload...
423**
424** The following entries "resolve" entry points that your module
425** needs. These entries define the names of registered entry points
426** that you need "imported" into your dll so that you may call them
427** directly yourself. The HDL_RESOLVE_PTRVAR macro is used to auto-
428** matically set one of your own pointer variables to the registered
429** entry point's currently registered value (usually an address of
430** a function or variable). Note that the HDL_RESOLVER_SECTION is
431** actually just a function that the hdl logic calls, thus allowing
432** you to insert directly into the below section any specialized 'C'
433** code that you may need.
434*/
435HDL_RESOLVER_SECTION;
436{
437    /*           Herc's registered
438                 entry points that
439                 you need to call
440                 directly yourself
441    */
442    HDL_RESOLVE( config_command          );
443    HDL_RESOLVE( some_exitpoint          );
444    HDL_RESOLVE( debug_cpu_state         );
445    HDL_RESOLVE( debug_program_interrupt );
446    HDL_RESOLVE( debug_diagnose          );
447
448    /* The following illustrates how to use HDL_RESOLVE_PTRVAR
449       macro to retrieve the address of one of Herc's registered
450       entry points.
451
452                         Your pointer-   Herc's registered
453                         variable name   entry-point name
454    */
455    HDL_RESOLVE_PTRVAR(  my_sysblk_ptr,  sysblk         );
456}
457END_RESOLVER_SECTION;
458
459
460/* The following section defines what should be done just before
461** your module is unloaded. It is nothing more than a function that
462** is called by hdl logic just before your module is unloaded, and
463** nothing more. Thus you can place any 'C' code here that you want.
464*/
465HDL_FINAL_SECTION;
466{
467    my_cleanup();
468}
469END_FINAL_SECTION;
470
471
472
473
474/* DYNDIAG.C    (c) Copyright Jan Jaeger, 2003                       */
475/*              Hercules Dynamic Loader                              */
476
477/*              Sample diagf14 dll routine                           */
478
479/*                                                                   */
480/*   Assembler to call routine:                                      */
481/*                                                                   */
482/*              LRA  R1,=CL32'test'                                  */
483/*              LRA  R2,=X'01020304'  USERPARM                       */
484/*              DC   X'83120F14'   DIAG R1,R2,X'F14'                 */
485/*                                                                   */
486
487
488#include "hercules.h"
489
490#include "opcode.h"
491
492#include "inline.h"
493
494
495void ARCH_DEP(diagf14_test) (int r1, int r3, REGS *regs)
496{
497U32 r3loc;
498
499    logmsg("diagf14:  r3 = %8.8X\n",regs->GR_L(r3));
500    r3loc = ARCH_DEP(vfetch4) (regs->GR_L(r3), USE_REAL_ADDR, regs);
501    logmsg("diagf14: *r3 = %8.8X\n",r3loc);
502}
503
504
505
506#if !defined(_GEN_ARCH)
507
508#if defined(_ARCHMODE2)
509 #define  _GEN_ARCH _ARCHMODE2
510 #include "dyndiag.c"
511#endif
512
513#if defined(_ARCHMODE3)
514 #undef   _GEN_ARCH
515 #define  _GEN_ARCH _ARCHMODE3
516 #include "dyndiag.c"
517#endif
518
519
520HDL_DEPENDENCY_SECTION;
521{
522     HDL_DEPENDENCY (HERCULES);
523     HDL_DEPENDENCY (REGS);
524     HDL_DEPENDENCY (DEVBLK);
525     HDL_DEPENDENCY (SYSBLK);
526
527} END_DEPENDENCY_SECTION;
528
529
530HDL_REGISTER_SECTION;
531{
532
533    HDL_REGISTER(s370_diagf14_test,s370_diagf14_test);
534    HDL_REGISTER(s390_diagf14_test,s390_diagf14_test);
535    HDL_REGISTER(z900_diagf14_test,z900_diagf14_test);
536
537} END_REGISTER_SECTION;
538
539
540HDL_RESOLVER_SECTION;
541{
542
543} END_RESOLVER_SECTION;
544
545HDL_FINAL_SECTION;
546{
547
548} END_FINAL_SECTION;
549
550
551#endif /*!defined(_GEN_ARCH)*/
552
553/* END DYNDIAG.C */
554
555
556
557/* DYNCGI.C     (c)Copyright Jan Jaeger, 2002-2003                   */
558/*              HTTP cgi-bin routines                                */
559
560/* This file contains cgi routines that may be executed on the      */
561/* server (ie under control of a hercules thread)                    */
562/*                                                                   */
563/*                                                                   */
564/* Dynamically loaded cgi routines must be registered under the      */
565/* pathname that they are accessed with (ie /cgi-bin/test)           */
566/* All cgi pathnames must start with /cgi-bin/                       */
567/*                                                                   */
568/*                                                                   */
569/* The cgi-bin routines may call the following HTTP service routines */
570/*                                                                   */
571/* char *cgi_variable(WEBBLK *webblk, char *name);                   */
572/*   This call returns a pointer to the cgi variable requested       */
573/*   or a NULL pointer if the variable is not found                  */
574/*                                                                   */
575/* char *cgi_cookie(WEBBLK *webblk, char *name);                     */
576/*   This call returns a pointer to the cookie requested             */
577/*   or a NULL pointer if the cookie is not found                    */
578/*                                                                   */
579/* char *cgi_username(WEBBLK *webblk);                               */
580/*   Returns the username for which the user has been authenticated  */
581/*   or NULL if not authenticated (refer to auth/noauth parameter    */
582/*   on the HTTPPORT configuration statement)                        */
583/*                                                                   */
584/* char *cgi_baseurl(WEBBLK *webblk);                                */
585/*   Returns the url as requested by the user                        */
586/*                                                                   */
587/* void html_header(WEBBLK *webblk);                                 */
588/*   Sets up the standard html header, and includes the              */
589/*   html/header.htmlpart file.                                      */
590/*                                                                   */
591/* void html_footer(WEBBLK *webblk);                                 */
592/*   Sets up the standard html footer, and includes the              */
593/*   html/footer.htmlpart file.                                      */
594/*                                                                   */
595/* int html_include(WEBBLK *webblk, char *filename);                 */
596/*   Includes an html file                                           */
597/*                                                                   */
598/*                                                                   */
599/*                                           Jan Jaeger - 28/03/2002 */
600
601#include "hstdinc.h"
602#include "hercules.h"
603#include "devtype.h"
604#include "opcode.h"
605#include "httpmisc.h"
606
607#if defined(OPTION_HTTP_SERVER)
608
609void cgibin_test(WEBBLK *webblk)
610{
611    html_header(webblk);
612    hprintf(webblk->hsock, "<H2>Sample cgi routine</H2>\n");
613    html_footer(webblk);
614}
615
616
617HDL_DEPENDENCY_SECTION;
618{
619     HDL_DEPENDENCY(HERCULES);
620//   HDL_DEPENDENCY(REGS);
621//   HDL_DEPENDENCY(DEVBLK);
622//   HDL_DEPENDENCY(SYSBLK);
623     HDL_DEPENDENCY(WEBBLK);
624}
625END_DEPENDENCY_SECTION;
626
627
628HDL_REGISTER_SECTION;
629{
630    HDL_REGISTER( /cgi-bin/test, cgibin_test );
631}
632END_REGISTER_SECTION;
633
634
635HDL_RESOLVER_SECTION;
636{
637}
638END_RESOLVER_SECTION;
639
640
641HDL_FINAL_SECTION;
642{
643}
644END_FINAL_SECTION;
645
646#endif /*defined(OPTION_HTTP_SERVER)*/
647
648
649
650/* TESTINS.C    Test instruction                                     */
651
652#include "hercules.h"
653
654#include "opcode.h"
655
656/*-------------------------------------------------------------------*/
657/* 0000 BARF  - Barf                                            [RR] */
658/*-------------------------------------------------------------------*/
659DEF_INST(barf)
660{
661int r1, r2;                                     /* register values   */
662
663    RR(inst, regs, r1, r2)
664
665    logmsg("Barf\n");
666
667    ARCH_DEP(program_interrupt)(regs, PGM_OPERATION_EXCEPTION);
668}
669
670
671#if !defined(_GEN_ARCH)
672
673#if defined(_ARCHMODE2)
674 #define  _GEN_ARCH _ARCHMODE2
675 #include "testins.c"
676#endif
677
678#if defined(_ARCHMODE3)
679 #undef   _GEN_ARCH
680 #define  _GEN_ARCH _ARCHMODE3
681 #include "testins.c"
682#endif
683
684
685HDL_DEPENDENCY_SECTION;
686{
687
688} END_DEPENDENCY_SECTION;
689
690
691HDL_INSTRUCTION_SECTION;
692{
693    HDL_DEFINST(HDL_INSTARCH_ALL,0x00,barf);
694
695} END_INSTRUCTION_SECTION;
696
697#endif /*!defined(_GEN_ARCH)*/
698

README.HERCLOGO

1Customizable hercules 3270 Logo
2
3The initial welcome screen presented when a TN 3270 terminal connects
4to a hercules 3270 device can now be customized.
5
6The customized logo is stored in a plain text file which contains
7positioning orders, attributes and variable substitutions.
8
9hercules also contains a built-in logo should no suitable file be found.
10
11Upon startup, hercules will first look for a file named "herclogo.txt" in
12the current directory.
13
14The name of the logo file can also be specified as a startup option by
15using the '-b' flag.
16
17Additionally, the file may also be specified by using the 'HERCLOGO'
18configuration statement.
19
20(NOTE : The statement was previously LOGOFILE, but LOGOFILE has been
21 deprecated).
22
23The file may also be specified by using the 'HERCLOGO' environment
24variable.
25
26The file to be used can also be specified at run time using the
27'HERCLOGO' panel command.
28
29Each line in the file represent either an order or a plain text line.
30
31The orders are as follows :
32
33@SBA X,Y
34Position the current buffer position to Row X col Y (X and Y start at 0)
35
36@SF [H][P]
37Set the Highlight and/or Protected attribute
38
39@NL
40Forces going to the next line
41
42@ALIGN NONE|LEFT|RIGHT|CENTER
43Specified the text alignement (relative to the left and right borders of the
44terminal). When ALIGN is other than "NONE", a new line is automatically
45inserted after each line of text. If ALIGN is "NONE", then the text will
46be written without skipping to the next line.
47
48It is also possible to embbed substitution variables in outgoing text.
49Substition is indicated by enclosing the variable name between $( and )
50
51The following variables are defined in that environment :
52
53VERSION : The hercules version
54HOSTNAME : The host name on which hercules is running
55HOSTOS : The host operating system
56HOSTOSREL : The Host operating system release
57HOSTOSVER : The host operating system version
58HOSTARCH : The host architecture
59HOSTNUMCPUS : UP (for 1) or MP=X (for more than 1)
60LPARNAME : The LPAR name specified in the configuration file
61CCUU,ccuu,CUU,cuu : Various forms of the device number of the terminal
62CSS : The Logical Channel Subsystem Set or Channel Set for the terminal
63SUBCHAN : The Subchannel number for the terminal
64
65Additionally, it is also possible to specify environment variable names.
66
67The file 'herclogo.txt' is provided in the distribution as a sample template.
68It reflects the contents of the built-in logo.
69
70Ivan Warren 3/1/2006
71

README.NETWORKING

1-----------------------------------------------------------------
2                    Hercules Networking
3-----------------------------------------------------------------
4
5    *** Please read herctcp.html as Roger explains how ***
6    *** to set up TCP/IP networking with Hercules.     ***
7
8All of the communications emulation implemented within Hercules
9use a CTCA (Channel to Channel Adapter) type device. Depending on
10the "flavor", the CTCA device will provide either a
11point-to-point or a virtual network adapter interface to the
12driving system's TCP/IP stack or in the case of CTCT, a "true"
13CTCA connection to another instance of Hercules via a TCP/IP
14connection.
15
16All current emulations, with the exception of VMNET, CTCT and CTCE use
17the Universal TUN/TAP driver on *nix and TunTap32 (WinPCap) on
18the Windows platforms which creates a network interface on the
19driving system which allow Hercules to present frames to, and
20receive frames from the TCP/IP stack. This network interface is
21configured on *nix platforms by the hercifc program which is
22invoked by Hercules after the TUN/TAP device is opened. The
23hercifc program runs as root. Please read herctcp.html for more
24information on the security implications of the hercifc program.
25
26Now for the gory details:
27
28---------------------------------------------------------------
29
30    *** Important information about changes to the ***
31    *** Hercules configuration files - PLEASE READ ***
32
33The format of the Hercules configuration file statements for all
34of the networking emulations have changed from the previous
35releases of Hercules. The older format will still be accepted
36to maintain compatibility, however it is the recommendation
37of the maintainer that the new format be used. Also note that
38there is no distinction between the CTCI and CTCI-W32 modes any
39more, in fact CTCI-W32 does not exist in this release (other
40than to maintain compatibility with previous configuration files).
41
42---------------------------------------------------------------
43
44    *** Important information about changes to the ***
45    *** Hercules configuration files - PLEASE READ ***
46
47In releases prior to Hercules version 3.00, all of the TCP/IP
48emulations required two addresses to be defined in the Hercules
49configuration file: one address for the read subchannel and the
50other for write.
51
52---------------------------------------------------------------
53
54    *** Important information about changes to the ***
55    *** Hercules configuration files - PLEASE READ ***
56
57Hercules release version 3.00, however, [temporarily] changed
58the rules: With [ONLY!] version 3.00 of Hercules, only the FIRST
59address address need be specified in the configuration file.
60Hercules version 3.00 automatically creates the second address.
61Care must be taken to NOT define the second address [with Hercules
62version 3.00 ONLY!] or a configuration error will occur.
63
64---------------------------------------------------------------
65
66    *** Important information about changes to the ***
67    *** Hercules configuration files - PLEASE READ ***
68
69Starting with Hercules version 3.01 however, we've gone back to
70doing things the way we ORIGINALLY were (and the way most users
71are used to (i.e. the way most users EXPECT things to work)):
72
73With Hercules version 3.01 you need to define BOTH addresses!
74
75Both the even numbered read device AS WELL AS the odd numbered
76write device must BOTH be defined in your Hercules configuration
77file starting with Hercules version 3.01. We apologize for the
78mess, but we thought having Herc automatically define the write
79device for you (as it does in version 3.00) would be easier for
80everyone. Turns out it caused a lot of problems with a lot of
81people, so we decided to go back to the original way. Again, we
82apologize for whatever headaches this may have caused anyone.
83
84---------------------------------------------------------------
85
86    *** Important information about changes to the ***
87    *** Hercules configuration files - PLEASE READ ***
88
89Note that the VMNET and CTCT protocols have ALWAYS required BOTH
90addresses to be defined (i.e. ALL versions of Hercules, including
91version 3.00 as well, require BOTH even/odd read/write devices to
92be defined separately [in your Hercules configuration file]).
93
94---------------------------------------------------------------
95
96The currently supported emulation modes are:
97
98     CTCT     - CTCA Emulation via TCP connection
99     CTCE     - Enhanced CTCA Emulation via CTP connection
100     CTCI     - Point-to-point connection to the host IP stack.
101     LCS      - LAN Channel Station (3172/OSA)
102     VMNET    - Point-to-point link via SLIP/VMNET
103
104-----------------------------------------------------------------
105CTCT - Channel to Channel Emulation via TCP connection
106-----------------------------------------------------------------
107
108This emulation mode provides protocol-independent communication
109with another instance of this driver via a TCP connection.
110
111This mode appears to the operating system running in the Hercules
112machine as an IBM 3088 Channel to Channel Adapter and can operate
113in either Basic or Extended mode.
114
115The configuration statement for CTCT is as follows:
116
117     <devnum> 3088 CTCT <lport> <raddress> <rport> <mtu>
118
119where:
120
121     <devnum>   is the address of the CTCT device.
122
123     <lport>    is the TCP/IP port on the local system.
124
125     <raddress> is the IP address on the remote.
126
127     <rport>    is the TCP/IP port on the remote system.
128
129-----------------------------------------------------------------
130CTCI     - Channel to Channel link to Linux TCP/IP stack
131-----------------------------------------------------------------
132
133This is a point-to-point link to the driving system's TCP/IP
134stack. From the point of view of the operating system running
135in the Hercules machine it appears to be a CTC link to a machine
136running TCP/IP for MVS or VM.
137
138CTCI uses the Universal TUN/TAP driver on *nix and Politecnico
139di Torino's WinPCap packet driver as well as Fish's TunTap32
140and FishPack DLLs on Windows[1].
141
142The configuration statement for CTCI is as follows:
143
144     <devnum1-devnum2> CTCI [options] <guestip> <hostip>
145
146where:
147
148     <devnum1-devnum2>   is the address pair of the CTCI device.
149
150     <guestip>  is the IP address of the Hercules (guest OS) side.
151
152     <hostip>   is the IP address on the driving system.
153
154     [options]  can be any of the following:
155
156         -n <devname> or --dev <devname>
157
158             where <devname> is:
159
160             [*nix] the name of the TUN/TAP special character
161             device, normally /dev/net/tun.
162
163             [Windows] is either the IP or MAC address of the
164             driving systems network card. TunTap32 will
165             automatically select the first network card it
166             finds if this option is omitted, this may not be
167             desirable for some users.
168
169         -t <mtu> or --mtu <mtu>
170
171             [*nix only] where <mtu> is the maximum transmission
172             unit size, normally 1500
173
174         -s <netmask> or --netmask <netmask>
175
176             [*nix only] where <netmask> is the netmask to
177             be configured on the link. Note: Since this is a
178             point-to-point link netmask is meaningless from
179             the perspective of the actual network device.
180
181         -m <MAC Address> or --mac <MAC address>
182
183             [Windows only] where <MAC Address> is the optional
184             hardware address of the interface in the format of
185             either xx:xx:xx:xx:xx:xx or xx-xx-xx-xx-xx-xx.
186
187         -k <kbuff> or --kbuff <kbuff>
188
189             [Windows only] where <kbuff> is the size of the
190             WinPCap kernel buffer size, normally 1024.
191
192         -i <ibuff> or --ibuff <ibuff>
193
194             [Windows only] where <ibuff> is the size of the
195             WinPCap I/O buffer size, normally 64.
196
197         -d or --debug
198
199             this will turn on the internal debugging routines.
200             Warning: This will produce a tremendous amount of
201             output to the Hercules console. It is suggested that
202             you only enable this at the request of the maintainers.
203
204-----------------------------------------------------------------
205LCS - LAN Channel Station
206-----------------------------------------------------------------
207
208This emulation mode appears to the operating system running in
209the Hercules machine as an IBM 8232 LCS device, an IBM 2216
210router, a 3172 running ICP (Interconnect Communications Program),
211the LCS3172 driver of a P/390, or an IBM Open Systems Adapter.
212
213Rather than a point-to-point link, this emulation creates a
214virtual ethernet adapter through which the guest operating system
215running in the Hercules machine can communicate. As such, this
216mode is not limited to TCP/IP traffic, but in fact will handle
217any ethernet frame.
218
219The configuration statement for LCS is as follows:
220
221     <devnum1-devnum2> LCS [options] [<guestip>]
222
223where:
224
225     <devnum1-devnum2>   is the address pair of the LCS device.
226                This pair must be an even-odd address.
227
228     [<guestip>] is an optional IP address of the Hercules
229                (guest OS) side. Note: This is only used to
230                establish a point-to-point routing table entry
231                on driving system. If you use the --oat option,
232                do not specify an address here.
233
234There are no required parameters for the LCS emulation, however
235there are several options that can be specified on the config
236statement:
237
238     -n <devname> or --dev <devname>
239
240         where <devname> is:
241
242         [*nix] the name of the TUN/TAP special character device,
243         normally /dev/net/tun.
244
245         [Windows] is either the IP or MAC address of the driving
246         systems network card. TunTap32 will automatically select
247         the first network card it finds if this option is
248         omitted, this may not be desirable for some users.
249
250     -o <filename> or --oat <filename>
251
252         where <filename> specifies the filename of the Address
253         Translation file. If this option is specified, the optional
254         <guestip> and --mac entries are ignored in preference to
255         statements in the OAT. (See below for the format of the OAT)
256
257     -m <MAC Address> or --mac <MAC address>
258
259         where <MAC Address> is the optional hardware address of
260         the interface in the format: xx:xx:xx:xx:xx:xx
261
262     -d or --debug
263
264         this will turn on the internal debugging routines.
265         Warning: This will produce a tremendous amount of
266         output to the Hercules console. It is suggested that
267         you only enable this at the request of the maintainers.
268
269
270If no Address Translation file is specified, the emulation module
271will create the following:
272
273     An ethernet adapter (port 0) for TCP/IP traffic only.
274     Two device addresses will be defined (devnum and devnum + 1).
275
276
277The syntax for the Address Translation file is as follows:
278
279*********************************************************
280* Dev Mode Port Entry specific information              *
281*********************************************************
282  0400  IP   00  PRI 172.021.003.032
283  0402  IP   00  SEC 172.021.003.033
284  0404  IP   00  NO  172.021.003.038
285  0406  IP   01  NO  172.021.002.016
286  040E  SNA  00
287
288  HWADD 00 02:00:FE:DF:00:42
289  HWADD 01 02:00:FE:DF:00:43
290  ROUTE 00 172.021.003.032 255.255.255.224
291
292where:
293
294     Dev   is the base device address
295     Mode  is the operation mode - IP or SNA
296     Port  is the virtual (relative) adapter number.
297
298When the device is specifies the odd address of the pair,
299then the read/write functions of the pair will be swapped.
300
301For IP modes, the entry specific information is as follows:
302
303     PRI|SEC|NO  specifies where a packet with an unknown IP
304                 address is forwarded to. PRI is the primary
305                 default entry, SEC specifies the entry to use
306                 when the primary is not available, and NO
307                 specifies that this is not a default entry.
308
309     nnn.nnn.nnn.nnn specifies the home IP address
310
311When the operation mode is IP, specify only the even (read)
312address. The odd (write) address will be create automatically.
313
314Note: SNA mode does not currently work.
315
316Additionally, two other statements can be included in the
317address translation file. The HWADD and ROUTE statements.
318
319Use the HWADD to specify a hardware (MAC) address for a
320virtual adapter. The first parameter after HWADD specifies
321with relative adapter for which the address is applied.
322
323The ROUTE statement is included for convenience. This allows the
324hercifc program to create a network route for this specified
325virtual adapter. Please note that it is not necessary to include
326point-to-point routes for each IP address in the table. This is
327done automatically by the emulation module.
328
329Up to 4 virtual (relative) adapters 00-03 are currently supported.
330
331-----------------------------------------------------------------
332SLIP/VMNET  - Channel to Channel link to TCP/IP via SLIP/VMNET
333-----------------------------------------------------------------
334
335If the emulation mode is not specified on the configuration
336statement, it is assumed to be a point-to-point link to the
337driving system's TCP/IP stack using Willem Konynenberg's VMNET
338package.  This provides the same function as the CTCI mode of
339operation, except that it uses a virtual SLIP interface instead
340of the TUN/TAP driver.
341
342Refer to http://www.kiyoinc.com/herc3088.html for more details.
343
344-----------------------------------------------------------------
345CTCE - Enhanced Channel to Channel Emulation via TCP connection
346-----------------------------------------------------------------
347
348The CTCE device type will emulate a real 3088 Channel to Channnel
349Adapter also for non-IP traffic, enhancing the CTCT capabilities.
350CTCE connections are also based on TCP/IP between two (or more)
351Hercules instances, and requires an even-odd pair of port numbers
352per device side. Only the even port numbers are to be configured;
353the odd numbers are just derived by adding 1 to the (configured)
354even port numbers.  The socket connection pairs cross-connect,
355the arrows showing the send->receive direction :
356
357   x-lport-even -> y-rport-odd
358   x-lport-odd  <- y-rport-even
359
360The configuration statement for CTCE is as follows :
361
362     <devnum> CTCE <lport> <raddress> <rport> [[<mtu>] <sml>]
363
364where:
365
366     <devnum>   is the address of the CTCT device.
367
368     <lport>    is the even TCP/IP port on the local system.
369
370     <raddress> is the IP address on the remote.
371
372     <rport>    is the even TCP/IP port on the remote system.
373
374     <mtu>      optional mtu buffersize, defaults to 32778
375
376     <sml>      optional small minimum for mtu, defaults to 8
377
378A sample CTCE device configuration is shown below:
379
380   Hercules PC Host A with IP address 192.168.1.100 :
381
382      0E40  CTCE  30880  192.168.1.200  30880
383      0E41  CTCE  30882  192.168.1.200  30882
384
385   Hercules PC Host B with IP address 192.168.1.200 :
386
387      0E40  CTCE  30880  192.168.1.100  30880
388      0E41  CTCE  30882  192.168.1.100  30882
389
390CTCE connected Hercules instances can be hosted on either Unix
391or Windows platforms, both sides do not need to be the same.
392
393
394
395=================================================================
396[1] The TunTap32.dll and FishPack.dll are part of Fish's CTCI-W32
397http://www.softdevlabs.com/Hercules/ctci-w32-index.html
398package, but the required WinPCap packet driver must be installed
399separately from http://www.winpcap.org  See Fish's web page for
400details.
401
402ALSO NOTE that it is HIGHLY RECOMMENDED that you stick with using
403only the current RELEASE version of WinPCap and NOT any type of
404'alpha' OR 'beta' version! Alpha and Beta versions of WinPCap are
405NOT SUPPORTED! Only official *release* version are supported!
406
407When you visit the WinPCap download web page, you need need to
408scroll down the page a bit to reach the OFFICIAL RELEASE VERSION
409of WinPcap. They usually put their Beta versions at the top of the
410page, and BETA versions ARE NOT SUPPORTED. *Please* scroll down
411the page and use and official RELEASE version. Thanks.
412
413You may, if you want, use a beta version of WinPCap, but if you do,
414then you're on your own if you have any problems with it.
415
416  -- Fish, May 2004.
417

README.OSX

1(The previous contents of this file were removed, as they haven't applied in
2years.)
3
4To compile on OS X for another architecture than the one running, or another
5OS version, you have to supply several arguments to the configure command.
6
7To force a particular architecture, you need to specify the machine
8architecture to the gcc command with the "-arch <architecture>" operand. You
9also need to tell configure what environment you're building for, with
10--host.
11
12ARCHITECTURE    -arch   --host
1332-bit Intel    i386    i686
1464-bit Intel    x86_64  x86_64
1532-bit PowerPC  ppc     powerpc
1664-bit PowerPC  ppc64   powerpc64
17
18The argument for --host is the first part of a build triplet, specified as
19<architecture>-<vendor>-<OS>. The vendor is apple for all OS X builds. OS is
20"darwin8.8.0" for OS X 10.4 (Tiger), and "darwin9.6.0" for OS X 10.5
21(Leopard). This makes, for example, building for 64-bit Intel on Leopard use
22"--host x86_64-apple-darwin9.6.0". The -arch argument is specified by
23overriding the CC (C compiler) value and adding it to the end, as in CC="gcc
24-arch x86_64".
25
26If you're building for an OS that's not the one you're running on, you also
27need to tell the build environment that you're doing so. For building for
28Tiger on Leopard, you need to add two arguments to the configure
29invocation: "CFLAGS='-isysroot /Developer/SDKs/MacOSX10.4u.sdk'
30LDFLAGS='-isysroot/Developer/SDKs/MacOSX10.4u.sdk
31-Wl,-syslibroot,/Developer/SDKs/MacOSX10.4u.sdk'". (All on one line, of
32course.) You also need to add an environment variable that's passed to gcc
33upon invocation, and this takes adding it to the beginning of the CC value,
34as in CC="/usr/bin/env MACOSX_DEPLOYMENT_TARGET=10.4 gcc -arch ix86_64".
35
36This makes a complete invocation for building for 32-bit Intel for Tiger on
37Leopard (again, all on one line):
38
39CC="/usr/bin/env MACOSX_DEPLOYMENT_TARGET=10.4 gcc -arch i386"
40CFLAGS='-isysroot /Developer/SDKs/MacOSX10.4u.sdk' LDFLAGS='-isysroot
41/Developer/SDKs/MacOSX10.4u.sdk
42-Wl,-syslibroot,/Developer/SDKs/MacOSX10.4u.sdk' ./configure
43--enable-setuid-hercifc --host=i686-apple-darwin8.8.0
44
45Building 32-bit Intel for Leopard on Leopard is easier:
46
47CC="gcc -arch i386" ./configure --enable-setuid-hercifc
48--host=i686-apple-darwin9.6.0
49
50(Note that building a 64-bit Intel version on a Mac with a 64-bit Intel
51processor still requires explicitly setting the architecture. If you don't,
52you'll get a 32-bit Intel version.)
53
54Once you have the various architectures built, you can combine them into one
55binary with lipo. This is done by saying "lipo <input-files> -output
56<output-file> -create". The best approach is to automate this with a shell
57script; I've done this for my own use.
58

README.SUN

1HOW TO BUILD HERCULES FROM SVN UNDER SOLARIS
2
31. DOWNLOAD AND INSTALL THE GNU COMPILER AND TOOLS
4
5  (a) You can obtain all the required tools from
6      http://www.sunfreeware.com
7
8      To download the tools you will need wget which is
9      installed in /usr/sfw/bin on Solaris 9 and 10.
10
11      First add this directory to your path using the command:
12      PATH=${PATH}:/usr/sfw/bin
13
14  (b) Follow instructions on http://www.blastwave.org/pkg-get.php
15      to install the pkg-get package.
16      Choose /opt/csw as the package base directory.
17
18      Choose a local mirror site from the list at
19      http://www.blastwave.org/mirrors.html
20      and update /opt/csw/etc/pkg-get.conf to point to the /stable
21      directory at the mirror site, for example:
22      url=http://blastwave.informatik.uni-erlangen.de/csw/stable
23
24      Add /opt/csw/bin to your path using the command:
25      PATH=/opt/csw/bin:${PATH}
26
27  (c) Then install the GNU compiler and tools using these commands:
28
29      pkg-get install textutils
30      pkg-get install automake
31      pkg-get install autoconf
32      pkg-get install subversion
33      pkg-get install flex
34      pkg-get install gmake
35      pkg-get install ggrep
36      pkg-get install gcc3
37
38  (d) Check that all the required tools are installed:
39
40      pkg-get compare subversion autoconf automake flex gawk gcc3
41      pkg-get compare ggrep libiconv gm4 gmake perl gsed
42
43      which should produce output something like this:
44
45       software                    localrev                   remoterev
46     subversion        1.4.5,REV=2007.11.18                        SAME
47       autoconf         2.61,REV=2007.07.13                        SAME
48       automake                       1.9.6                        SAME
49           flex        2.5.4,REV=2005.10.03                        SAME
50           gawk                       3.1.5                        SAME
51           gcc3                       3.4.5                        SAME
52          ggrep          2.5,REV=2004.12.01                        SAME
53       libiconv                       1.9.2                        SAME
54            gm4        1.4.5,REV=2006.07.27                        SAME
55          gmake                        3.81                        SAME
56           perl        5.8.8,REV=2007.10.05                        SAME
57           gsed                       4.1.4                        SAME
58
59  (e) Finally, add symbolic links to allow certain GNU tools to be
60      invoked using standard Unix names:
61
62      cd /opt/csw/bin
63      ln -s /opt/csw/gcc3/bin/gcc gcc
64      ln -s /opt/csw/bin/ggrep grep
65      ln -s /opt/csw/bin/gm4 m4
66      ln -s /opt/csw/bin/gmake make
67      ln -s /opt/csw/bin/gsed sed
68
692. DOWNLOAD THE HERCULES SOURCE FROM SVN
70
71      Add the following line to your .profile file:
72      PATH=/opt/csw/bin:${PATH}
73
74      From your home directory issue this command:
75
76      svn checkout svn://svn.hercules-390.org/hercules/trunk hercules
77
78      Note: svn will fail if you do not have libuuid installed on your system
79      ld.so.1: svn: fatal: libuuid.so.1: open failed: No such file or directory
80
81      If you get this message, you will need to install a patch from Sun:
82      1. Go to sunsolve.sun.com and select "Patch Finder"
83      2. Scroll down to "Download Product Specific Patches" and select your
84         version of Solaris (for example, Solaris 2.9 SPARC)
85      3. Look for a patch which contains libuuid (for example, 114129-02)
86      4. Download the patch and unzip it into /var/spool/patch
87      5. patchadd /var/spool/patch/114129-02
88
893. CHECK THAT THE REQUIRED LEVELS OF TOOLS ARE INSTALLED
90
91      From your home directory issue these commands:
92
93      cd hercules
94      util/bldlvlck
95
96      which should produce output something like this:
97
98       OK      SVN (informational), found x.yy.zz
99       OK      autoconf requires 2.5, found 2.61
100       OK      automake requires 1.9, found 1.9.6
101       OK      flex requires 2.5, found 2.5.4
102       OK      gawk requires 3.0, found 3.1.5
103       OK      gcc requires 2.95, found 3.4.5
104       OK      grep requires 0, found 2.5
105       OK      libiconv requires 1.8, found 1.9
106       OK      m4 requires 0.0, found 1.4
107       OK      make requires 3.79, found 3.81
108       OK      perl requires 5.6, found 5.8.8
109       OK      sed requires 3.02, found 4.1.4
110
1114. BUILD HERCULES
112
113      In the hercules directory issue these commands:
114
115      sh ./autogen.sh
116      ./configure
117      make
118

README.TAPE

1-------------------------------------------------------------------------------
2*        Hercules Tape Support Enhancements SPE/Fixes                         *
3*        V1.0 - By Ivan S. Warren                                             *
4-------------------------------------------------------------------------------
5
60 - Version History
7    * 08 Mar 2003 : ISW : Initial Release
8
9I - Supported Device Type emulations :
10
11Device Types supported as of yet :
123410/3411, 3420, 3480, 3490, 9347
13Upcoming Device type support :
143422, 3424, 3490E, 3590, 3430, 8809
15
16II - Basic ACF support
17
18The ACF (Automatic Cartridge Feeder) is a feature on Cartridge type tape
19drives (3480, 3490, etc..) that automatically loads a new tape when a tape
20is removed from the drive. There is no real control over this device by the
21host, as it just keeps on feeding tapes one after the other.
22Although the ACF feature is unique to cartridge type systems, the emulation
23accepts to use the same technique for emulated 1/2 inch tapes reel drives
24as well.
25
26ACF is supported as follows :
27
28hercules.cnf syntax :
29CUU DEVT @filename <options..>
30devinit syntax :
31devinit CUU @filename <options..>
32
33the 'filename' (without the prefixing @) contains a list of files that will
34be loaded one after the other. The filenames contained in the file list cannot
35describe another ACF file nor an SCSI tape handle (/dev/stX). However, the
36files may be standard AWS, HET or OMA files.
37
38To manually reset the ACF to the top of the stack, the devinit can be used
39to 'reload' the ACF feature.
40
41If the filename in the ACF description file contains a '*', any option(s) that
42follow(s) the '*' (is)are applied to each file, followed by the option(s)
43specified on the devinit or hercules.cnf entry, followed by the option(s)
44specified on each individual entry.
45
46Example :
47
48hercules.cnf:
49180 3420 @newstack compress=1
50
51newstack:
52# Sample file
53* maxsizeM=16 eotmargin=131072
54tape01.aws compress=0
55tape02.het maxsizeM=32 eotmargin=65536
56tape03.het maxsize=0
57
58This is equivalent to issuing (one at the start and one after each tape unload
59event)
60
61180 3420 tape01.aws maxsizeM=16 eotmargin=131072 compress=1 compress=0
62devinit 180 tape02.het maxsizeM=16 eotmargin=131072 compress=1 maxsizeM=32 eotmargin=65536
63devinit 180 tape03.het maxsizeM=16 eotmargin=131072 compress=1 maxsize=0
64
65Options are processed in the order in which they appear.
66Any conflicting parameter overrides the previous one.
67For example, on the 1st entry, the resuling "compress" will be 0.
68
69Care must be taken that '*' line entries are all proecessed at once.
70For example :
71
72* compress=0
73tape01.aws
74* compress=1
75tape02.aws
76
77is EQUIVALENT to
78
79* compress=0 compress=1
80tape01.aws
81tape02.aws
82
83NOTE : This may change in the future though, so ACF description files should not rely on this feature.
84
85III - Multivolume support - End of tape indication, Tape file size limitation
86
87Numerous requests have been made in order to support multi-volume tape
88handling, as well as limiting the file size generated by any individual
89tape file.
90
91Because multivolume support is not necesserally VOL1-HDR1/EOV/EOF based,
92a certain number of new features have to be implemented in order to let
93the guest program manage the multivolume on it's own.
94(ex: VM/DDR, DOS Tape Spooled output, etc..)
95
96Multivolume support resides in the capacity of a drive to indicate to the
97controling program that it is about to reach the end of the physical tape
98and that measures have to be taken to close the current volume and
99request a new media.
100
1013 new options are introduced :
102maxsize[K|M]=nnnn :
103        The resulting file size is limited to the amount specified. maxsize
104        specifies bytes, maxsizeK specifies a multiple of 10$24 bytes and
105        maxsizeM specifies a multiple of 1024*1024 bytes. specifying a size
106        of 0 indicates that there is no limit on the size of the file.
107
108        the default is 0 (unlimited file size)
109
110strictsize=0|1 :
111        Upon reaching the tape file size limit, depending on strictsize,
112        the tape file will or will not be truncated to enforce the maxsize
113        limit. The limit is only enforced during a write type operation
114        (that is : if the file already exists and the program only reads
115        the file, then the file will NOT be truncated, regardless of the
116        strictsize setting).
117        This affects any write that starts BELOW the limit, but that would
118        extend BEYOND the limit.
119        This parameter only affects compress HET files. On AWS tapes, the
120        limit is always enforced, but the file is not truncated (i.e. the
121        write does not occur, because 1) AWS tapes are never truncated, 2)
122        the effects of the write are known in advance (no compression)).
123        Regardless of strictsize, any write operation (Write, Write TM)
124        will return a Unit Check with Equip Check to the program if the file
125        size exceeds the predefined limit. If strictsize is 0, the write will
126        actually have been performed on the tape file. If strictsize is 1,
127        the file will be truncated on the preceeding tape block boundary.
128        If an attempt is made to write beyond the maxsize li
129
130        Care must be taken that regardless of the 'strictsize' setting,
131        the tape may become unusable for the guest program should such an
132        event occur (absence of a Tape Mark for example).
133
134        This option has no effect if maxsize is 0
135        This option only affects HET file tapes
136        The default is 0 (do not truncate)
137
138eotmargin=nnnn :
139        This option specifies, in bytes, the threshold before reaching maxsize
140        during which an indication will be returned to the program to indicate
141        that an EOT marker has been reached for a write type operation.
142        The indication of reaching near-capacity is indicated to the program
143        by presenting Unit Exception in the CSW on a Write type operation,
144        along with Channel End and Device End.
145        For certain device types, sense information may also indicate this
146        information independently of a write operation.
147        The purpose of this option is to allow the program to determine that
148        it is time to change to ask for a new tape. For example :
149
150        maxsizeM=2 eotmargin=131072
151        all writes up to 2Mb - 128Kb will occur normally
152        All writes between 2Mb-128Kb and 2Mb will receive Unit Exception
153        All writes beyond 2Mb will receive Unit Check
154
155        This option has no effect if maxsize is 0
156        The default is 131072 (128Kb)
157
158Caveats :
159
160If the emulated tape file resides on a disk media that reaches full capacity
161before the tape image exceeds it's size limit, the tape emulation will not
162detect that situation and will simulate reaching physical end of tape BEFORE
163reaching the EOT marker.
164This behaviour may be changed at a later time.
165
166IV - Various other changes / Corrections
167
168IV.1 : Device End Suppression for Tape motion CCWs on a non-ready tape drive
169
170IV.2 : Control Unit End is presented on Rewind Unload status
171
172IV.3 : Sense Pending status support
173        When certain conditions arise during an I/O operation, A sense is
174        built and Unit Check is presented to the program.
175        The program is then responsible for retrieving the sense information.
176        However, if the sense is not the result of a previously occuring
177        Unit Check, a new sense is built to reflect the current device status.
178        Also, this management is a necessary step in order to eventually
179        implement multipath operations (Contengency Allegiance status).
180
181IV.4 : readonly=0|1 :
182        force an emulated tape device read only.
183        (1/2 Inch tape ring or 38k Cartridge Protect tab)
184        (support for this feature is incomplete)
185
186
187--Ivan
188
1898 Mar 2003
190
191-------------------------------------------------------------------------------
192*                          AUTOMOUNT support                                  *
193-------------------------------------------------------------------------------
194
195Starting with Hercules version 3.06 a new AUTOMOUNT option is available
196that allows guest operating systems to directly mount, unmount and query
197tape device filenames for themselves, without any intervention on the part
198of the Hercules operator.
199
200Automount support is enabled via the AUTOMOUNT configuration file statement.
201
202An example guest automount program for VSE called "TMOUNT" is provided in
203the util subdirectory of the Hercules source code distribution.
204
205Briefly, the 0x4B (Set Diagnose) CCW is used to mount (or unmount) a file
206onto a tape drive, and the 0xE4 (Sense Id) CCW opcode is used to query the
207name of the currently mounted file.
208
209For mounts, the 0x4B CCW specifies the filename of the file to be mounted
210onto the drive. The file MUST reside in the specified AUTOMOUNT directory
211or the automount request will be rejected. To unmount the currently mounted
212file, simply do a mount of the special filename "OFFLINE".
213
214To query the name of the currently mounted file, the 0xE4 CCW is used. Note
215however that the 0xE4 (Sense Id) CCW opcode cannot be used by itself since
216the drive may also already natively support the Sense Id CCW opcode. Instead,
217it must be preceded by (command-chained from) a 0x4B CCW with a data transfer
218length of one byte. The following 0xE4 command is the one that then specifies
219the i/o buffer and buffer length of where the query function is to place the
220device's currently mounted host filename.
221
222In summary:
223
224
225    MOUNT:      X'4B', <filename>, X'20', <length>
226
227    UNMOUNT:    (same thing but use filename "OFFLINE" instead)
228
229    QUERY:      X'4B', <buffer>, X'60', 1
230                X'E4', <buffer>, X'20', <buffersize>
231
232
233Again, please refer to the provided TMOUNT sample for a simple example.
234
235
236-- Fish
23728 May 2008
238

README.WIN32

1HERCULES FOR WIN32 README FILE
2
3HOW TO COMPILE HERCULES FOR WINDOWS 32 BIT MSVC x86
4
51. Install Visual C++ 2010 Express from the Visual Studio 2010 Express page:
6   http://www.microsoft.com/visualstudio/en-us/products/2010-editions/express
7
82. Install Visual Studio 2010 Service Pack 1 (VS10sp1-KB983509) from:
9   http://www.microsoft.com/en-us/download/details.aspx?id=23691
10
113. Go to the start menu and choose "All Programs"
12   - "Microsoft Visual Studio 2010 Express" - "Visual Studio Command Prompt (2010)"
13
144. Change to the directory where you unpacked the Hercules source
15
165. If you require gzip or bzip2 for disk or tape compression, or if you
17   require PCRE for the Hercules Automatic Operator facility, you should
18   install the WIN32 versions of these programs in winbuild\zlib\
19   winbuild\bzip2\ and winbuild\pcre\ under the Hercules directory.
20   You may override these default directory locations by setting
21   environment variables, for example:
22   SET ZLIB_DIR=c:\packages\zlib
23   SET BZIP2_DIR=c:\packages\bzip2
24   SET PCRE_DIR=c:\packages\pcre
25
266. copy makefile.msvc makefile
27
287. nmake clean
29   nmake
30
318. The binaries will be installed into subfolder "msvc.dllmod.bin"
32
339. If you copy the binaries to a machine which does not have Visual
34   Studio 2010 (VS10) installed, then you must also install the
35   Microsoft Visual C++ 2010 Redistributable Package (x86)
36   on the target machine. This package can be downloaded from
37   http://www.microsoft.com/en-us/download/details.aspx?id=5555
38
39

README.WIN64

1HERCULES FOR WIN64 README FILE
2
3There are two 64-bit architectures supported by 64-bit Windows:
4- x64 also known as x86_64 (for AMD64 and Intel EM64T processors)
5- ia64 (for Intel Itanium processors)
6
7This document covers only the x64 architecture.
8
9HOW TO COMPILE HERCULES FOR AMD64
10
111. Install Visual C++ 2010 Express from the Visual Studio 2010 Express page:
12   http://www.microsoft.com/visualstudio/en-us/products/2010-editions/express
13
142. Install Microsoft Windows SDK 7.1 from:
15   http://www.microsoft.com/en-us/download/details.aspx?id=8279
16   IMPORTANT: select all components *except* the Visual C++ Compilers
17
183. Install Visual Studio 2010 Service Pack 1 (VS10sp1-KB983509) from:
19   http://www.microsoft.com/en-us/download/details.aspx?id=23691
20
214. Install Visual C++ 2010 Service Pack 1 Compiler Update
22   for the Windows SDK 7.1 (VC-Compiler-KB2519277) from:
23   http://www.microsoft.com/en-us/download/details.aspx?id=4422
24
255. Go to the start menu and choose "All Programs"
26   - "Microsoft Windows SDK v7.1" - "Microsoft Windows SDK 7.1 Command Prompt"
27
286. Change to the directory where you unpacked the Hercules source
29
307. If you require gzip or bzip2 for disk or tape compression, or if you
31   require PCRE for the Hercules Automatic Operator facility, you should
32   install the AMD64 versions of these programs in winbuild\zlib\x64
33   winbuild\bzip2\x64 and winbuild\pcre\x64 under the Hercules directory.
34   You may override these default directory locations by setting
35   environment variables, for example:
36   SET ZLIB_DIR=c:\packages\zlib
37   SET BZIP2_DIR=c:\packages\bzip2
38   SET PCRE_DIR=c:\packages\pcre
39
408. copy makefile.msvc makefile
41
429. nmake clean
43   nmake
44
4510. The binaries will be installed into subfolder "msvc.AMD64.bin"
46   If you compiled on a 32-bit Windows system, copy this folder
47   to your target 64-bit Windows machine.
48
4911. If you copy the binaries to a machine which does not have Visual
50   Studio 2010 (VS10) installed, then you must also install the
51   Microsoft Visual C++ 2010 Redistributable Package (x64)
52   on the target machine. This package can be downloaded from
53   http://www.microsoft.com/en-us/download/details.aspx?id=14632
54
55