|
|
1.1 root 1: /*
2: * Mach Operating System
3: * Copyright (c) 1991,1990,1989,1988,1987 Carnegie Mellon University
4: * All Rights Reserved.
5: *
6: * Permission to use, copy, modify and distribute this software and its
7: * documentation is hereby granted, provided that both the copyright
8: * notice and this permission notice appear in all copies of the
9: * software, derivative works or modified versions, and any portions
10: * thereof, and that both notices appear in supporting documentation.
11: *
12: * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
13: * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR
14: * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
15: *
16: * Carnegie Mellon requests users of this software to return to
17: *
18: * Software Distribution Coordinator or [email protected]
19: * School of Computer Science
20: * Carnegie Mellon University
21: * Pittsburgh PA 15213-3890
22: *
23: * any improvements or extensions that they make and grant Carnegie Mellon
24: * the rights to redistribute these changes.
25: */
26:
27: #ifndef _NW_MK_H_
28: #define _NW_MK_H_ 1
29:
30: #ifndef STUB
31: #include <chips/nw.h>
32: #include <kern/thread.h>
33: #else
34: #include "nw.h"
35: #include "stub.h"
36: #endif
37:
38: /*** NETWORK INTERFACE -- WRAPPER FOR MACH KERNEL ***/
39:
40: /*** User-trappable functions ***/
41:
42: extern nw_result mk_update(mach_port_t master_port, nw_update_type up_type,
43: int *up_info);
44:
45: extern nw_result mk_lookup(nw_lookup_type lt, int *look_info);
46:
47: extern nw_result mk_endpoint_allocate(nw_ep_t epp, nw_protocol protocol,
48: nw_acceptance accept, u_int buffer_size);
49:
50: extern nw_result mk_endpoint_deallocate(nw_ep ep);
51:
52: extern nw_buffer_t mk_buffer_allocate(nw_ep ep, u_int size);
53:
54: extern nw_result mk_buffer_deallocate(nw_ep ep, nw_buffer_t buffer);
55:
56: extern nw_result mk_connection_open(nw_ep local_ep, nw_address_1 rem_addr_1,
57: nw_address_2 rem_addr_2, nw_ep remote_ep);
58:
59: extern nw_result mk_connection_accept(nw_ep ep, nw_buffer_t msg,
60: nw_ep_t new_epp);
61:
62: extern nw_result mk_connection_close(nw_ep ep);
63:
64: extern nw_result mk_multicast_add(nw_ep local_ep, nw_address_1 rem_addr_1,
65: nw_address_2 rem_addr_2, nw_ep remote_ep);
66:
67: extern nw_result mk_multicast_drop(nw_ep local_ep, nw_address_1 rem_addr_1,
68: nw_address_2 rem_addr_2, nw_ep remote_ep);
69:
70: extern nw_result mk_endpoint_status(nw_ep ep, nw_state_t state,
71: nw_peer_t peer);
72:
73: extern nw_result mk_send(nw_ep ep, nw_buffer_t msg, nw_options options);
74:
75: extern nw_buffer_t mk_receive(nw_ep ep, int time_out);
76:
77: extern nw_buffer_t mk_rpc(nw_ep ep, nw_buffer_t send_msg,
78: nw_options options, int time_out);
79:
80: extern nw_buffer_t mk_select(u_int nep, nw_ep_t epp, int time_out);
81:
82:
83: /*** System-dependent support ***/
84:
85: extern void mk_endpoint_collect(task_t task);
86:
87: extern void mk_waited_collect(thread_t thread);
88:
89: extern void mk_return();
90:
91: extern boolean_t mk_deliver_result(thread_t thread, int result);
92:
93: extern int mk_fast_sweep();
94:
95: extern int mk_slow_sweep();
96:
97: #endif /* _NW_MK_H_ */
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.