1// Copyright 2020 The Go Authors. All rights reserved.
2// Use of this source code is governed by a BSD-style
3// license that can be found in the LICENSE file.
4
5// Hand edited based on zerrors_zos_s390x.go
6// TODO(Bill O'Farrell): auto-generate.
7
8package ipv4
9
10const (
11	sysIP_ADD_MEMBERSHIP         = 5
12	sysIP_ADD_SOURCE_MEMBERSHIP  = 12
13	sysIP_BLOCK_SOURCE           = 10
14	sysIP_DEFAULT_MULTICAST_LOOP = 1
15	sysIP_DEFAULT_MULTICAST_TTL  = 1
16	sysIP_DROP_MEMBERSHIP        = 6
17	sysIP_DROP_SOURCE_MEMBERSHIP = 13
18	sysIP_MAX_MEMBERSHIPS        = 20
19	sysIP_MULTICAST_IF           = 7
20	sysIP_MULTICAST_LOOP         = 4
21	sysIP_MULTICAST_TTL          = 3
22	sysIP_OPTIONS                = 1
23	sysIP_PKTINFO                = 101
24	sysIP_RECVPKTINFO            = 102
25	sysIP_TOS                    = 2
26	sysIP_UNBLOCK_SOURCE         = 11
27
28	sysMCAST_JOIN_GROUP         = 40
29	sysMCAST_LEAVE_GROUP        = 41
30	sysMCAST_JOIN_SOURCE_GROUP  = 42
31	sysMCAST_LEAVE_SOURCE_GROUP = 43
32	sysMCAST_BLOCK_SOURCE       = 44
33	sysMCAST_UNBLOCK_SOURCE     = 45
34
35	sizeofIPMreq          = 8
36	sizeofSockaddrInet4   = 16
37	sizeofSockaddrStorage = 128
38	sizeofGroupReq        = 136
39	sizeofGroupSourceReq  = 264
40	sizeofInetPktinfo     = 8
41)
42
43type sockaddrInet4 struct {
44	Len    uint8
45	Family uint8
46	Port   uint16
47	Addr   [4]byte
48	Zero   [8]uint8
49}
50
51type inetPktinfo struct {
52	Addr    [4]byte
53	Ifindex uint32
54}
55
56type sockaddrStorage struct {
57	Len      uint8
58	Family   byte
59	ss_pad1  [6]byte
60	ss_align int64
61	ss_pad2  [112]byte
62}
63
64type groupReq struct {
65	Interface uint32
66	reserved  uint32
67	Group     sockaddrStorage
68}
69
70type groupSourceReq struct {
71	Interface uint32
72	reserved  uint32
73	Group     sockaddrStorage
74	Source    sockaddrStorage
75}
76
77type ipMreq struct {
78	Multiaddr [4]byte /* in_addr */
79	Interface [4]byte /* in_addr */
80}
81