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
407
408
|
#ifndef _socket_server_
#define _socket_server_
/* Module socket */
#include <mach/kern_return.h>
#include <mach/port.h>
#include <mach/message.h>
#include <mach/std_types.h>
#include <mach/mach_types.h>
#include <device/device_types.h>
#include <device/net_status.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <sys/statfs.h>
#include <sys/resource.h>
#include <sys/utsname.h>
#include <hurd/hurd_types.h>
#include "pfinet.h"
/* Routine socket_create */
#ifdef mig_external
mig_external
#else
extern
#endif
kern_return_t S_socket_create
#if defined(LINTLIBRARY)
(server, sock_type, protocol, sock, sockPoly)
trivfs_protid_t server;
int sock_type;
int protocol;
mach_port_t *sock;
mach_msg_type_name_t *sockPoly;
{ return S_socket_create(server, sock_type, protocol, sock, sockPoly); }
#else
(
trivfs_protid_t server,
int sock_type,
int protocol,
mach_port_t *sock,
mach_msg_type_name_t *sockPoly
);
#endif
/* Routine socket_listen */
#ifdef mig_external
mig_external
#else
extern
#endif
kern_return_t S_socket_listen
#if defined(LINTLIBRARY)
(sock, queue_limit)
sock_user_t sock;
int queue_limit;
{ return S_socket_listen(sock, queue_limit); }
#else
(
sock_user_t sock,
int queue_limit
);
#endif
/* Routine socket_accept */
#ifdef mig_external
mig_external
#else
extern
#endif
kern_return_t S_socket_accept
#if defined(LINTLIBRARY)
(sock, conn_sock, conn_sockPoly, peer_addr, peer_addrPoly)
sock_user_t sock;
mach_port_t *conn_sock;
mach_msg_type_name_t *conn_sockPoly;
mach_port_t *peer_addr;
mach_msg_type_name_t *peer_addrPoly;
{ return S_socket_accept(sock, conn_sock, conn_sockPoly, peer_addr, peer_addrPoly); }
#else
(
sock_user_t sock,
mach_port_t *conn_sock,
mach_msg_type_name_t *conn_sockPoly,
mach_port_t *peer_addr,
mach_msg_type_name_t *peer_addrPoly
);
#endif
/* Routine socket_connect */
#ifdef mig_external
mig_external
#else
extern
#endif
kern_return_t S_socket_connect
#if defined(LINTLIBRARY)
(sock, addr)
sock_user_t sock;
sock_addr_t addr;
{ return S_socket_connect(sock, addr); }
#else
(
sock_user_t sock,
sock_addr_t addr
);
#endif
/* Routine socket_bind */
#ifdef mig_external
mig_external
#else
extern
#endif
kern_return_t S_socket_bind
#if defined(LINTLIBRARY)
(sock, addr)
sock_user_t sock;
sock_addr_t addr;
{ return S_socket_bind(sock, addr); }
#else
(
sock_user_t sock,
sock_addr_t addr
);
#endif
/* Routine socket_name */
#ifdef mig_external
mig_external
#else
extern
#endif
kern_return_t S_socket_name
#if defined(LINTLIBRARY)
(sock, addr, addrPoly)
sock_user_t sock;
mach_port_t *addr;
mach_msg_type_name_t *addrPoly;
{ return S_socket_name(sock, addr, addrPoly); }
#else
(
sock_user_t sock,
mach_port_t *addr,
mach_msg_type_name_t *addrPoly
);
#endif
/* Routine socket_peername */
#ifdef mig_external
mig_external
#else
extern
#endif
kern_return_t S_socket_peername
#if defined(LINTLIBRARY)
(sock, addr, addrPoly)
sock_user_t sock;
mach_port_t *addr;
mach_msg_type_name_t *addrPoly;
{ return S_socket_peername(sock, addr, addrPoly); }
#else
(
sock_user_t sock,
mach_port_t *addr,
mach_msg_type_name_t *addrPoly
);
#endif
/* Routine socket_connect2 */
#ifdef mig_external
mig_external
#else
extern
#endif
kern_return_t S_socket_connect2
#if defined(LINTLIBRARY)
(sock1, sock2)
sock_user_t sock1;
sock_user_t sock2;
{ return S_socket_connect2(sock1, sock2); }
#else
(
sock_user_t sock1,
sock_user_t sock2
);
#endif
/* Routine socket_create_address */
#ifdef mig_external
mig_external
#else
extern
#endif
kern_return_t S_socket_create_address
#if defined(LINTLIBRARY)
(server, sockaddr_type, sockaddr, sockaddrCnt, addr, addrPoly)
mach_port_t server;
int sockaddr_type;
data_t sockaddr;
mach_msg_type_number_t sockaddrCnt;
mach_port_t *addr;
mach_msg_type_name_t *addrPoly;
{ return S_socket_create_address(server, sockaddr_type, sockaddr, sockaddrCnt, addr, addrPoly); }
#else
(
mach_port_t server,
int sockaddr_type,
data_t sockaddr,
mach_msg_type_number_t sockaddrCnt,
mach_port_t *addr,
mach_msg_type_name_t *addrPoly
);
#endif
/* Routine socket_fabricate_address */
#ifdef mig_external
mig_external
#else
extern
#endif
kern_return_t S_socket_fabricate_address
#if defined(LINTLIBRARY)
(server, sockaddr_type, addr, addrPoly)
mach_port_t server;
int sockaddr_type;
mach_port_t *addr;
mach_msg_type_name_t *addrPoly;
{ return S_socket_fabricate_address(server, sockaddr_type, addr, addrPoly); }
#else
(
mach_port_t server,
int sockaddr_type,
mach_port_t *addr,
mach_msg_type_name_t *addrPoly
);
#endif
/* Routine socket_whatis_address */
#ifdef mig_external
mig_external
#else
extern
#endif
kern_return_t S_socket_whatis_address
#if defined(LINTLIBRARY)
(addr, sockaddr_type, sockaddr, sockaddrCnt)
sock_addr_t addr;
int *sockaddr_type;
data_t *sockaddr;
mach_msg_type_number_t *sockaddrCnt;
{ return S_socket_whatis_address(addr, sockaddr_type, sockaddr, sockaddrCnt); }
#else
(
sock_addr_t addr,
int *sockaddr_type,
data_t *sockaddr,
mach_msg_type_number_t *sockaddrCnt
);
#endif
/* Routine socket_shutdown */
#ifdef mig_external
mig_external
#else
extern
#endif
kern_return_t S_socket_shutdown
#if defined(LINTLIBRARY)
(sock, direction)
sock_user_t sock;
int direction;
{ return S_socket_shutdown(sock, direction); }
#else
(
sock_user_t sock,
int direction
);
#endif
/* Routine socket_getopt */
#ifdef mig_external
mig_external
#else
extern
#endif
kern_return_t S_socket_getopt
#if defined(LINTLIBRARY)
(sock, level, option, optval, optvalCnt)
sock_user_t sock;
int level;
int option;
data_t *optval;
mach_msg_type_number_t *optvalCnt;
{ return S_socket_getopt(sock, level, option, optval, optvalCnt); }
#else
(
sock_user_t sock,
int level,
int option,
data_t *optval,
mach_msg_type_number_t *optvalCnt
);
#endif
/* Routine socket_setopt */
#ifdef mig_external
mig_external
#else
extern
#endif
kern_return_t S_socket_setopt
#if defined(LINTLIBRARY)
(sock, level, option, optval, optvalCnt)
sock_user_t sock;
int level;
int option;
data_t optval;
mach_msg_type_number_t optvalCnt;
{ return S_socket_setopt(sock, level, option, optval, optvalCnt); }
#else
(
sock_user_t sock,
int level,
int option,
data_t optval,
mach_msg_type_number_t optvalCnt
);
#endif
/* Routine socket_send */
#ifdef mig_external
mig_external
#else
extern
#endif
kern_return_t S_socket_send
#if defined(LINTLIBRARY)
(sock, addr, flags, data, dataCnt, ports, portsCnt, control, controlCnt, amount)
sock_user_t sock;
sock_addr_t addr;
int flags;
data_t data;
mach_msg_type_number_t dataCnt;
portarray_t ports;
mach_msg_type_number_t portsCnt;
data_t control;
mach_msg_type_number_t controlCnt;
vm_size_t *amount;
{ return S_socket_send(sock, addr, flags, data, dataCnt, ports, portsCnt, control, controlCnt, amount); }
#else
(
sock_user_t sock,
sock_addr_t addr,
int flags,
data_t data,
mach_msg_type_number_t dataCnt,
portarray_t ports,
mach_msg_type_number_t portsCnt,
data_t control,
mach_msg_type_number_t controlCnt,
vm_size_t *amount
);
#endif
/* Routine socket_recv */
#ifdef mig_external
mig_external
#else
extern
#endif
kern_return_t S_socket_recv
#if defined(LINTLIBRARY)
(sock, addr, addrPoly, flags, data, dataCnt, ports, portsPoly, portsCnt, control, controlCnt, outflags, amount)
sock_user_t sock;
mach_port_t *addr;
mach_msg_type_name_t *addrPoly;
int flags;
data_t *data;
mach_msg_type_number_t *dataCnt;
portarray_t *ports;
mach_msg_type_name_t *portsPoly;
mach_msg_type_number_t *portsCnt;
data_t *control;
mach_msg_type_number_t *controlCnt;
int *outflags;
vm_size_t amount;
{ return S_socket_recv(sock, addr, addrPoly, flags, data, dataCnt, ports, portsPoly, portsCnt, control, controlCnt, outflags, amount); }
#else
(
sock_user_t sock,
mach_port_t *addr,
mach_msg_type_name_t *addrPoly,
int flags,
data_t *data,
mach_msg_type_number_t *dataCnt,
portarray_t *ports,
mach_msg_type_name_t *portsPoly,
mach_msg_type_number_t *portsCnt,
data_t *control,
mach_msg_type_number_t *controlCnt,
int *outflags,
vm_size_t amount
);
#endif
#endif /* not defined(_socket_server_) */
|