|
|
1.1 root 1: /*
2: * Mach device emulation definitions (i386at version).
3: *
4: * Copyright (c) 1996 The University of Utah and
5: * the Computer Systems Laboratory at the University of Utah (CSL).
6: * All rights reserved.
7: *
8: * Permission to use, copy, modify and distribute this software is hereby
9: * granted provided that (1) source code retains these copyright, permission,
10: * and disclaimer notices, and (2) redistributions including binaries
11: * reproduce the notices in supporting documentation, and (3) all advertising
12: * materials mentioning features or use of this software display the following
13: * acknowledgement: ``This product includes software developed by the
14: * Computer Systems Laboratory at the University of Utah.''
15: *
16: * THE UNIVERSITY OF UTAH AND CSL ALLOW FREE USE OF THIS SOFTWARE IN ITS "AS
17: * IS" CONDITION. THE UNIVERSITY OF UTAH AND CSL DISCLAIM ANY LIABILITY OF
18: * ANY KIND FOR ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
19: *
20: * CSL requests users of this software to return to [email protected] any
21: * improvements that they make and grant CSL redistribution rights.
22: *
23: * Author: Shantanu Goel, University of Utah CSL
24: */
25:
26: #ifndef _I386AT_DEVICE_EMUL_H_
27: #define _I386AT_DEVICE_EMUL_H_
28:
29: #include <mach/notify.h>
30: #include <device/net_status.h>
31:
32: /* Each emulation layer provides these operations. */
33: struct device_emulation_ops
34: {
35: void (*reference) (void *);
36: void (*dealloc) (void *);
37: ipc_port_t (*dev_to_port) (void *);
38: io_return_t (*open) (ipc_port_t, mach_msg_type_name_t,
39: dev_mode_t, char *, device_t *);
40: io_return_t (*close) (void *);
41: io_return_t (*write) (void *, ipc_port_t, mach_msg_type_name_t,
42: dev_mode_t, recnum_t, io_buf_ptr_t, unsigned, int *);
43: io_return_t (*write_inband) (void *, ipc_port_t, mach_msg_type_name_t,
44: dev_mode_t, recnum_t, io_buf_ptr_inband_t,
45: unsigned, int *);
46: io_return_t (*read) (void *, ipc_port_t, mach_msg_type_name_t,
47: dev_mode_t, recnum_t, int, io_buf_ptr_t *, unsigned *);
48: io_return_t (*read_inband) (void *, ipc_port_t, mach_msg_type_name_t,
49: dev_mode_t, recnum_t, int, char *, unsigned *);
50: io_return_t (*set_status) (void *, dev_flavor_t, dev_status_t,
51: mach_msg_type_number_t);
52: io_return_t (*get_status) (void *, dev_flavor_t, dev_status_t,
53: mach_msg_type_number_t *);
54: io_return_t (*set_filter) (void *, ipc_port_t, int, filter_t [], unsigned);
55: io_return_t (*map) (void *, vm_prot_t, vm_offset_t,
56: vm_size_t, ipc_port_t *, boolean_t);
57: void (*no_senders) (mach_no_senders_notification_t *);
58: io_return_t (*write_trap) (void *, dev_mode_t,
59: recnum_t, vm_offset_t, vm_size_t);
60: io_return_t (*writev_trap) (void *, dev_mode_t,
61: recnum_t, io_buf_vec_t *, vm_size_t);
62: };
63:
64: #endif /* _I386AT_DEVICE_EMUL_H_ */
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.