xref: /illumos-gate/usr/src/man/man9f/mac_private_minor.9f (revision 20a7641f9918de8574b8b3b47dbe35c4bfc78df1)
1.\"
2.\" This file and its contents are supplied under the terms of the
3.\" Common Development and Distribution License ("CDDL"), version 1.0.
4.\" You may only use this file in accordance with the terms of version
5.\" 1.0 of the CDDL.
6.\"
7.\" A full copy of the text of the CDDL should have accompanied this
8.\" source.  A copy of the CDDL is also available via the Internet at
9.\" http://www.illumos.org/license/CDDL.
10.\"
11.\"
12.\" Copyright 2023 Oxide Computer Company
13.\"
14.Dd January 30, 2023
15.Dt MAC_PRIVATE_MINOR 9F
16.Os
17.Sh NAME
18.Nm mac_private_minor
19.Nd return the first minor number that is available for driver private use
20.Sh SYNOPSIS
21.In sys/mac_provider.h
22.Ft minor_t
23.Fo mac_private_minor
24.Fa "void"
25.Fc
26.Sh INTERFACE LEVEL
27illumos DDI specific
28.Sh PARAMETERS
29None.
30.Sh DESCRIPTION
31The
32.Fn mac_private_minor
33function is used by MAC device drivers to determine the lower bound of the
34minor number space that is available for driver private use.
35The driver is free to use any minor number greater than or equal to the
36returned value.
37All other
38values are reserved for use by the
39.Xr mac 9E
40framework.
41.Pp
42The
43.Fn mac_private_minor
44function may be called from a driver's
45.Xr attach 9E
46entry point, e.g., to create minor nodes for use by the driver.
47See the
48.Sx Custom Device Nodes
49section of
50.Xr mac 9E
51for more details.
52.Sh CONTEXT
53.Fn mac_private_minor
54function can be called from
55.Sy user
56or
57.Sy kernel
58context.
59.Sh RETURN VALUES
60Upon successful completion, the
61.Fn mac_private_minor
62function returns a valid minor number.
63.Sh SEE ALSO
64.Xr mac 9E
65