1:
2: #if defined(TARGET_MIPS)
3:
4:
5:
6:
7:
8:
9:
10: #define TARGET_SOL_SOCKET 0xffff
11:
12: #define TARGET_SO_DEBUG 0x0001
13: #define TARGET_SO_REUSEADDR 0x0004
14: #define TARGET_SO_KEEPALIVE 0x0008
15:
16: #define TARGET_SO_DONTROUTE 0x0010
17: #define TARGET_SO_BROADCAST 0x0020
18:
19: #define TARGET_SO_LINGER 0x0080
20:
21: #define TARGET_SO_OOBINLINE 0x0100
22: #if 0
23: To add: #define TARGET_SO_REUSEPORT 0x0200
24: #endif
25:
26: #define TARGET_SO_TYPE 0x1008
27: #define TARGET_SO_STYLE SO_TYPE
28: #define TARGET_SO_ERROR 0x1007
29: #define TARGET_SO_SNDBUF 0x1001
30: #define TARGET_SO_RCVBUF 0x1002
31: #define TARGET_SO_SNDLOWAT 0x1003
32: #define TARGET_SO_RCVLOWAT 0x1004
33: #define TARGET_SO_SNDTIMEO 0x1005
34: #define TARGET_SO_RCVTIMEO 0x1006
35: #define TARGET_SO_ACCEPTCONN 0x1009
36:
37:
38: #define TARGET_SO_NO_CHECK 11
39: #define TARGET_SO_PRIORITY 12
40: #define TARGET_SO_BSDCOMPAT 14
41:
42: #define TARGET_SO_PASSCRED 17
43: #define TARGET_SO_PEERCRED 18
44:
45:
46: #define TARGET_SO_SECURITY_AUTHENTICATION 22
47: #define TARGET_SO_SECURITY_ENCRYPTION_TRANSPORT 23
48: #define TARGET_SO_SECURITY_ENCRYPTION_NETWORK 24
49:
50: #define TARGET_SO_BINDTODEVICE 25
51:
52:
53: #define TARGET_SO_ATTACH_FILTER 26
54: #define TARGET_SO_DETACH_FILTER 27
55:
56: #define TARGET_SO_PEERNAME 28
57: #define TARGET_SO_TIMESTAMP 29
58: #define SCM_TIMESTAMP SO_TIMESTAMP
59:
60: #define TARGET_SO_PEERSEC 30
61: #define TARGET_SO_SNDBUFFORCE 31
62: #define TARGET_SO_RCVBUFFORCE 33
63:
64:
65:
66:
67:
68:
69:
70:
71:
72:
73:
74:
75:
76:
77:
78: enum sock_type {
79: TARGET_SOCK_DGRAM = 1,
80: TARGET_SOCK_STREAM = 2,
81: TARGET_SOCK_RAW = 3,
82: TARGET_SOCK_RDM = 4,
83: TARGET_SOCK_SEQPACKET = 5,
84: TARGET_SOCK_DCCP = 6,
85: TARGET_SOCK_PACKET = 10,
86: };
87:
88: #define TARGET_SOCK_MAX (SOCK_PACKET + 1)
89:
90: #else
91:
92:
93: #define TARGET_SOL_SOCKET 1
94:
95: #define TARGET_SO_DEBUG 1
96: #define TARGET_SO_REUSEADDR 2
97: #define TARGET_SO_TYPE 3
98: #define TARGET_SO_ERROR 4
99: #define TARGET_SO_DONTROUTE 5
100: #define TARGET_SO_BROADCAST 6
101: #define TARGET_SO_SNDBUF 7
102: #define TARGET_SO_RCVBUF 8
103: #define TARGET_SO_SNDBUFFORCE 32
104: #define TARGET_SO_RCVBUFFORCE 33
105: #define TARGET_SO_KEEPALIVE 9
106: #define TARGET_SO_OOBINLINE 10
107: #define TARGET_SO_NO_CHECK 11
108: #define TARGET_SO_PRIORITY 12
109: #define TARGET_SO_LINGER 13
110: #define TARGET_SO_BSDCOMPAT 14
111:
112: #if defined(TARGET_PPC)
113: #define TARGET_SO_RCVLOWAT 16
114: #define TARGET_SO_SNDLOWAT 17
115: #define TARGET_SO_RCVTIMEO 18
116: #define TARGET_SO_SNDTIMEO 19
117: #define TARGET_SO_PASSCRED 20
118: #define TARGET_SO_PEERCRED 21
119: #else
120: #define TARGET_SO_PASSCRED 16
121: #define TARGET_SO_PEERCRED 17
122: #define TARGET_SO_RCVLOWAT 18
123: #define TARGET_SO_SNDLOWAT 19
124: #define TARGET_SO_RCVTIMEO 20
125: #define TARGET_SO_SNDTIMEO 21
126: #endif
127:
128:
129: #define TARGET_SO_SECURITY_AUTHENTICATION 22
130: #define TARGET_SO_SECURITY_ENCRYPTION_TRANSPORT 23
131: #define TARGET_SO_SECURITY_ENCRYPTION_NETWORK 24
132:
133: #define TARGET_SO_BINDTODEVICE 25
134:
135:
136: #define TARGET_SO_ATTACH_FILTER 26
137: #define TARGET_SO_DETACH_FILTER 27
138:
139: #define TARGET_SO_PEERNAME 28
140: #define TARGET_SO_TIMESTAMP 29
141: #define TARGET_SCM_TIMESTAMP TARGET_SO_TIMESTAMP
142:
143: #define TARGET_SO_ACCEPTCONN 30
144:
145: #define TARGET_SO_PEERSEC 31
146:
147: #endif