]> git.saurik.com Git - apple/xnu.git/blob - osfmk/man/norma_set_special_port.html
xnu-2050.48.11.tar.gz
[apple/xnu.git] / osfmk / man / norma_set_special_port.html
1 <h2>norma_set_special_port</h2>
2 <hr>
3 <p>
4 <strong>Function</strong> - Set node-specific special port.
5 <h3>SYNOPSIS</h3>
6 <pre>
7 <strong>kern_return_t norma_set_special_port</strong>
8 <strong>(host_priv_t</strong> <var>host_priv</var>,
9 <strong>int</strong> <var>which_port</var>,
10 <strong>mach_port_t</strong> <var>special_port</var><strong>);</strong>
11
12 </pre>
13 <h4>Macro forms:</h4>
14 <pre>
15
16 <strong>#include&ltmach/norma_special_ports.h&gt</strong>
17
18 <strong>kern_return_t norma_set_device_port</strong>
19 <strong>(host_priv_t</strong> <var>host_priv</var>,
20 <strong>mach_port_t</strong> <var>special_port</var><strong>);</strong>
21
22 <strong>kern_return_t norma_set_host_port</strong>
23 <strong>(host_priv_t</strong> <var>host_priv</var>,
24 <strong>mach_port_t</strong> <var>special_port</var><strong>);</strong>
25
26 <strong>kern_return_t norma_set_host_priv_port</strong>
27 <strong>(host_priv_t</strong> <var>host_priv</var>,
28 <strong>int</strong> <var>node</var>,
29 <strong>mach_port_t</strong> <var>special_port</var><strong>);</strong>
30
31 <strong>kern_return_t norma_set_nameserver_port</strong>
32 <strong>(host_priv_t</strong> <var>host_priv</var>,
33 <strong>mach_port_t</strong> <var>special_port</var><strong>);</strong>
34 </pre>
35
36 <h3>PARAMETERS</h3>
37 <dl>
38 <dt> <var>host_priv</var>
39 <dd>
40 [in host-control send right]
41 The host for which to set the special port.
42 Currently, this must be the per-node host control port.
43 <p>
44 <dt> <var>node</var>
45 <dd>
46 [in scalar]
47 The index of the node for which the port is to be set.
48 <p>
49 <dt> <var>which_port</var>
50 <dd>
51 [in scalar]
52 The index of the special port to be set. Valid values are:
53 <dl>
54 <p>
55 <dt> <strong>NORMA_DEVICE_PORT</strong>
56 <dd>
57 [device-master send right] The device master port for the
58 node.
59 <p>
60 <dt> <strong>NORMA_HOST_PORT</strong>
61 <dd>
62 [host-name send right] The host name port for the node.
63 <p>
64 <dt> <strong>NORMA_HOST_PRIV_PORT</strong>
65 <dd>
66 [host-control send right] The host control port for the node.
67 <p>
68 <dt> <strong>NORMA_NAMESERVER_PORT</strong>
69 <dd>
70 [name-server send right] The registered name server port for
71 the node.
72 </dl>
73 <p>
74 <dt> <var>special_port</var>
75 <dd>
76 [in norma-special send right]
77 Send right to the new special port.
78 </dl>
79 <h3>DESCRIPTION</h3>
80 <p>
81 The <strong>norma_set_special_port</strong> function sets the special
82 port belonging to <var>node</var> on <var>host_priv</var>.
83 <p>
84 Each node maintains a (small) set of node specific ports. The device master
85 port, host name, and host control ports are maintained by the kernel.
86 The kernel also permits
87 a small set of server specified
88 node specific ports; the name server port is an example and is given (by
89 convention) an assigned special port index.
90 <h3>RETURN VALUES</h3>
91 <p>
92 Only generic errors apply.
93 <h3>RELATED INFORMATION</h3>
94 <p>
95 Functions:
96 <a href="mach_host_self.html"><strong>mach_host_self</strong></a>,
97 <a href="norma_get_special_port.html"><strong>norma_get_special_port</strong></a>.