blob: 4ab638cb94c7adc5570c342ff4398d40b899907d (
plain)
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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
|
// Copyright 2020 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
//go:build zos && s390x
// +build zos,s390x
// Hand edited based on ztypes_linux_s390x.go
// TODO: auto-generate.
package unix
const (
SizeofPtr = 0x8
SizeofShort = 0x2
SizeofInt = 0x4
SizeofLong = 0x8
SizeofLongLong = 0x8
PathMax = 0x1000
)
const (
SizeofSockaddrAny = 128
SizeofCmsghdr = 12
SizeofIPMreq = 8
SizeofIPv6Mreq = 20
SizeofICMPv6Filter = 32
SizeofIPv6MTUInfo = 32
SizeofLinger = 8
SizeofSockaddrInet4 = 16
SizeofSockaddrInet6 = 28
SizeofTCPInfo = 0x68
)
type (
_C_short int16
_C_int int32
_C_long int64
_C_long_long int64
)
type Timespec struct {
Sec int64
Nsec int64
}
type Timeval struct {
Sec int64
Usec int64
}
type timeval_zos struct { //correct (with padding and all)
Sec int64
_ [4]byte // pad
Usec int32
}
type Tms struct { //clock_t is 4-byte unsigned int in zos
Utime uint32
Stime uint32
Cutime uint32
Cstime uint32
}
type Time_t int64
type Utimbuf struct {
Actime int64
Modtime int64
}
type Utsname struct {
Sysname [65]byte
Nodename [65]byte
Release [65]byte
Version [65]byte
Machine [65]byte
Domainname [65]byte
}
type RawSockaddrInet4 struct {
Len uint8
Family uint8
Port uint16
Addr [4]byte /* in_addr */
Zero [8]uint8
}
type RawSockaddrInet6 struct {
Len uint8
Family uint8
Port uint16
Flowinfo uint32
Addr [16]byte /* in6_addr */
Scope_id uint32
}
type RawSockaddrUnix struct {
Len uint8
Family uint8
Path [108]int8
}
type RawSockaddr struct {
Len uint8
Family uint8
Data [14]uint8
}
type RawSockaddrAny struct {
Addr RawSockaddr
_ [112]uint8 // pad
}
type _Socklen uint32
type Linger struct {
Onoff int32
Linger int32
}
type Iovec struct {
Base *byte
Len uint64
}
type IPMreq struct {
Multiaddr [4]byte /* in_addr */
Interface [4]byte /* in_addr */
}
type IPv6Mreq struct {
Multiaddr [16]byte /* in6_addr */
Interface uint32
}
type Msghdr struct {
Name *byte
Iov *Iovec
Control *byte
Flags int32
Namelen int32
Iovlen int32
Controllen int32
}
type Cmsghdr struct {
Len int32
Level int32
Type int32
}
type Inet4Pktinfo struct {
Addr [4]byte /* in_addr */
Ifindex uint32
}
type Inet6Pktinfo struct {
Addr [16]byte /* in6_addr */
Ifindex uint32
}
type IPv6MTUInfo struct {
Addr RawSockaddrInet6
Mtu uint32
}
type ICMPv6Filter struct {
Data [8]uint32
}
type TCPInfo struct {
State uint8
Ca_state uint8
Retransmits uint8
Probes uint8
Backoff uint8
Options uint8
Rto uint32
Ato uint32
Snd_mss uint32
Rcv_mss uint32
Unacked uint32
Sacked uint32
Lost uint32
Retrans uint32
Fackets uint32
Last_data_sent uint32
Last_ack_sent uint32
Last_data_recv uint32
Last_ack_recv uint32
Pmtu uint32
Rcv_ssthresh uint32
Rtt uint32
Rttvar uint32
Snd_ssthresh uint32
Snd_cwnd uint32
Advmss uint32
Reordering uint32
Rcv_rtt uint32
Rcv_space uint32
Total_retrans uint32
}
type _Gid_t uint32
type rusage_zos struct {
Utime timeval_zos
Stime timeval_zos
}
type Rusage struct {
Utime Timeval
Stime Timeval
Maxrss int64
Ixrss int64
Idrss int64
Isrss int64
Minflt int64
Majflt int64
Nswap int64
Inblock int64
Oublock int64
Msgsnd int64
Msgrcv int64
Nsignals int64
Nvcsw int64
Nivcsw int64
}
type Rlimit struct {
Cur uint64
Max uint64
}
// { int, short, short } in poll.h
type PollFd struct {
Fd int32
Events int16
Revents int16
}
type Stat_t struct { //Linux Definition
Dev uint64
Ino uint64
Nlink uint64
Mode uint32
Uid uint32
Gid uint32
_ int32
Rdev uint64
Size int64
Atim Timespec
Mtim Timespec
Ctim Timespec
Blksize int64
Blocks int64
_ [3]int64
}
type Stat_LE_t struct {
_ [4]byte // eye catcher
Length uint16
Version uint16
Mode int32
Ino uint32
Dev uint32
Nlink int32
Uid int32
Gid int32
Size int64
Atim31 [4]byte
Mtim31 [4]byte
Ctim31 [4]byte
Rdev uint32
Auditoraudit uint32
Useraudit uint32
Blksize int32
Creatim31 [4]byte
AuditID [16]byte
_ [4]byte // rsrvd1
File_tag struct {
Ccsid uint16
Txtflag uint16 // aggregating Txflag:1 deferred:1 rsvflags:14
}
CharsetID [8]byte
Blocks int64
Genvalue uint32
Reftim31 [4]byte
Fid [8]byte
Filefmt byte
Fspflag2 byte
_ [2]byte // rsrvd2
Ctimemsec int32
Seclabel [8]byte
_ [4]byte // rsrvd3
_ [4]byte // rsrvd4
Atim Time_t
Mtim Time_t
Ctim Time_t
Creatim Time_t
Reftim Time_t
_ [24]byte // rsrvd5
}
type Statvfs_t struct {
ID [4]byte
Len int32
Bsize uint64
Blocks uint64
Usedspace uint64
Bavail uint64
Flag uint64
Maxfilesize int64
_ [16]byte
Frsize uint64
Bfree uint64
Files uint32
Ffree uint32
Favail uint32
Namemax31 uint32
Invarsec uint32
_ [4]byte
Fsid uint64
Namemax uint64
}
type Statfs_t struct {
Type uint32
Bsize uint64
Blocks uint64
Bfree uint64
Bavail uint64
Files uint32
Ffree uint32
Fsid uint64
Namelen uint64
Frsize uint64
Flags uint64
}
type Dirent struct {
Reclen uint16
Namlen uint16
Ino uint32
Extra uintptr
Name [256]byte
}
type FdSet struct {
Bits [64]int32
}
// This struct is packed on z/OS so it can't be used directly.
type Flock_t struct {
Type int16
Whence int16
Start int64
Len int64
Pid int32
}
type Termios struct {
Cflag uint32
Iflag uint32
Lflag uint32
Oflag uint32
Cc [11]uint8
}
type Winsize struct {
Row uint16
Col uint16
Xpixel uint16
Ypixel uint16
}
type W_Mnth struct {
Hid [4]byte
Size int32
Cur1 int32 //32bit pointer
Cur2 int32 //^
Devno uint32
_ [4]byte
}
type W_Mntent struct {
Fstype uint32
Mode uint32
Dev uint32
Parentdev uint32
Rootino uint32
Status byte
Ddname [9]byte
Fstname [9]byte
Fsname [45]byte
Pathlen uint32
Mountpoint [1024]byte
Jobname [8]byte
PID int32
Parmoffset int32
Parmlen int16
Owner [8]byte
Quiesceowner [8]byte
_ [38]byte
}
|