-
Notifications
You must be signed in to change notification settings - Fork 71
/
Copy pathhdiagf18.h
67 lines (59 loc) · 2.89 KB
/
hdiagf18.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
/* HDIAGF18.H (c) Copyright, Harold Grovesteen, 2010-2012 */
/* Hercules DIAGNOSE code X'F18' */
/* */
/* Released under "The Q Public License Version 1" */
/* (http://www.hercules-390.org/herclic.html) as modifications to */
/* Hercules. */
#if !defined(__HDIAGF18_H__)
#define __HDIAGF18_H__
/*-------------------------------------------------------------------*/
/* DIAGNOSE X'F18' Capability Parameter Block (CPB) */
/*-------------------------------------------------------------------*/
typedef struct _CPB
{
BYTE ipv6; /* IPv6 Native Mode Socket Types */
BYTE ipv4; /* IPv4 Native Mode Socket Types */
BYTE resources; /* Resources and Modes Supported */
BYTE platform; /* Platform and Large File Support */
HWORD comptopt; /* Compatibility Operation Options */
HWORD nativopt; /* Native Operation Options */
HWORD maxnshsk; /* Maximum Guest Native Shadow Sockets */
BYTE r1;
BYTE r2;
BYTE r3;
BYTE r4;
BYTE r5;
BYTE r6;
} CPB;
/* Socket Type Masks */
#define STREAM_SOCKET 0x01
#define DATAGRAM_SOCKET 0x02
/* Option related values */
#define DF18_VER 0x0001 /* Version of DIAGNOSE X'F18' */
#define VER_MASK 0x000F /* Mask for version in options */
#define AMODE_MASK 0x0070 /* Mask for addressing options */
#define OPTIONS_MASK 0xFFF0 /* Mask for options only */
#define SPACE_MASK 0x0070
#define NATIVE_OPTIONS 0x0000
#define NATIVE_INVALID (~NATIVE_OPTIONS)
#define COMPAT_OPTIONS 0x0060
#define COMPAT_INVALID (~COMPAT_OPTIONS)
#define DF18_REAL_SPACE 0x0040
#define DF18_PRIMARY_SPACE 0x0020
#define DF18_AR_SPACE 0x0010
/*-------------------------------------------------------------------*/
/* DIAGNOSE X'F18' Compatibility Mode Parameter Block (CMPB) */
/*-------------------------------------------------------------------*/
/* Note: The same parameter block is used for socket functions and */
/* file operations. It is always accessed directly from */
/* guest storage by the DIAGNOSE to maintain state for restart.*/
/* Each of the elements of the array correspond to a guest */
/* register originally used by NFILE and TCPIP to manage state */
/* and access guest parameters supplied in registers. This */
/* design allows a program converting from NFILE or TCPIP */
/* usage to simply use the CMPB as a register save area. */
typedef struct _CMPB
{
FWORD ps_regs[16]; /* Pseudo registers */
} CMPB;
#endif /* !defined(__HDIAGF18_H__) */