1 /*
2 * Mach Operating System
3 * Copyright (c) 1991 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: norma_special_ports.h,v $
29 * Revision 2.5 93/01/14 17:46:10 danner
30 * Cleanup.
31 * [92/06/10 pds]
32 *
33 * Revision 2.4 92/03/10 16:27:08 jsb
34 * Define MAX_SPECIAL_KERNEL_ID.
35 * [92/01/04 18:16:44 jsb]
36 *
37 * Revision 2.3 91/12/13 13:47:36 jsb
38 * Moved MAX_SPECIAL_ID here from ipc/ipc_node.h.
39 *
40 * Revision 2.2 91/08/03 18:19:11 jsb
41 * First checkin.
42 * [91/07/25 07:52:36 jsb]
43 *
44 */
45 /*
46 * File: mach/norma_special_ports.h
47 *
48 * Defines codes for remote access to special ports. These are NOT
49 * port identifiers - they are only used for the norma_get_special_port
50 * and norma_set_special_port routines.
51 */
52
53 #ifndef _MACH_NORMA_SPECIAL_PORTS_H_
54 #define _MACH_NORMA_SPECIAL_PORTS_H_
55
56 #define MAX_SPECIAL_KERNEL_ID 3
57 #define MAX_SPECIAL_ID 32
58
59 /*
60 * Provided by kernel
61 */
62 #define NORMA_DEVICE_PORT 1
63 #define NORMA_HOST_PORT 2
64 #define NORMA_HOST_PRIV_PORT 3
65
66 /*
67 * Not provided by kernel
68 */
69 #define NORMA_NAMESERVER_PORT (1 + MAX_SPECIAL_KERNEL_ID)
70
71 /*
72 * Definitions for ease of use.
73 *
74 * In the get call, the host parameter can be any host, but will generally
75 * be the local node host port. In the set call, the host must the per-node
76 * host port for the node being affected.
77 */
78
79 #define norma_get_device_port(host, node, port) \
80 (norma_get_special_port((host), (node), NORMA_DEVICE_PORT, (port)))
81
82 #define norma_set_device_port(host, port) \
83 (norma_set_special_port((host), NORMA_DEVICE_PORT, (port)))
84
85 #define norma_get_host_port(host, node, port) \
86 (norma_get_special_port((host), (node), NORMA_HOST_PORT, (port)))
87
88 #define norma_set_host_port(host, port) \
89 (norma_set_special_port((host), NORMA_HOST_PORT, (port)))
90
91 #define norma_get_host_priv_port(host, node, port) \
92 (norma_get_special_port((host), (node), NORMA_HOST_PRIV_PORT, (port)))
93
94 #define norma_set_host_priv_port(host, port) \
95 (norma_set_special_port((host), NORMA_HOST_PRIV_PORT, (port)))
96
97 #define norma_get_nameserver_port(host, node, port) \
98 (norma_get_special_port((host), (node), NORMA_NAMESERVER_PORT, (port)))
99
100 #define norma_set_nameserver_port(host, port) \
101 (norma_set_special_port((host), NORMA_NAMESERVER_PORT, (port)))
102
103 #endif /* _MACH_NORMA_SPECIAL_PORTS_H_ */
Cache object: c7e3439b1bd284e68e4a122fbdbc6a7a
|