FreeBSD/Linux Kernel Cross Reference
sys/chips/nw_mk.h
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 Software.Distribution@CS.CMU.EDU
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 * HISTORY
28 * $Log: nw_mk.h,v $
29 * Revision 2.3 93/12/23 17:00:43 dbg
30 * Fixed declarations of mk_slow_sweep, mk_fast_sweep,
31 * mk_return.
32 * [93/12/23 dbg]
33 *
34 * Revision 2.2 93/08/10 15:18:50 mrt
35 * Initial check-in.
36 * [93/06/09 15:57:00 jcb]
37 *
38 *
39 */
40
41 #ifndef _NW_MK_H_
42 #define _NW_MK_H_ 1
43
44 #ifndef STUB
45 #include <chips/nw.h>
46 #include <kern/sched_prim.h>
47 #include <kern/thread.h>
48 #else
49 #include "nw.h"
50 #include "stub.h"
51 #endif
52
53 /*** NETWORK INTERFACE -- WRAPPER FOR MACH KERNEL ***/
54
55 /*** User-trappable functions ***/
56
57 extern nw_result mk_update(mach_port_t master_port, nw_update_type up_type,
58 int *up_info);
59
60 extern nw_result mk_lookup(nw_lookup_type lt, int *look_info);
61
62 extern nw_result mk_endpoint_allocate(nw_ep_t epp, nw_protocol protocol,
63 nw_acceptance accept, u_int buffer_size);
64
65 extern nw_result mk_endpoint_deallocate(nw_ep ep);
66
67 extern nw_buffer_t mk_buffer_allocate(nw_ep ep, u_int size);
68
69 extern nw_result mk_buffer_deallocate(nw_ep ep, nw_buffer_t buffer);
70
71 extern nw_result mk_connection_open(nw_ep local_ep, nw_address_1 rem_addr_1,
72 nw_address_2 rem_addr_2, nw_ep remote_ep);
73
74 extern nw_result mk_connection_accept(nw_ep ep, nw_buffer_t msg,
75 nw_ep_t new_epp);
76
77 extern nw_result mk_connection_close(nw_ep ep);
78
79 extern nw_result mk_multicast_add(nw_ep local_ep, nw_address_1 rem_addr_1,
80 nw_address_2 rem_addr_2, nw_ep remote_ep);
81
82 extern nw_result mk_multicast_drop(nw_ep local_ep, nw_address_1 rem_addr_1,
83 nw_address_2 rem_addr_2, nw_ep remote_ep);
84
85 extern nw_result mk_endpoint_status(nw_ep ep, nw_state_t state,
86 nw_peer_t peer);
87
88 extern nw_result mk_send(nw_ep ep, nw_buffer_t msg, nw_options options);
89
90 extern nw_buffer_t mk_receive(nw_ep ep, int time_out);
91
92 extern nw_buffer_t mk_rpc(nw_ep ep, nw_buffer_t send_msg,
93 nw_options options, int time_out);
94
95 extern nw_buffer_t mk_select(u_int nep, nw_ep_t epp, int time_out);
96
97
98 /*** System-dependent support ***/
99
100 extern void mk_endpoint_collect(task_t task);
101
102 extern void mk_waited_collect(thread_t thread);
103
104 extern no_return mk_return(void);
105
106 extern boolean_t mk_deliver_result(thread_t thread, int result);
107
108 extern void mk_fast_sweep();
109
110 extern void mk_slow_sweep();
111
112 #endif /* _NW_MK_H_ */
Cache object: a70c447e31d79f7ebdb42ea11c877e35
|