1getdevicerange(3TSOL)Trusted Extensions Library Functionsgetdevicerange(3TSOL)
2
3
4
6 getdevicerange - get the label range of a device
7
9 cc [flag...] file... -lbsm -ltsol [library...]
10
11
12 #include <tsol/label.h>
13
14 blrange_t *getdevicerange(const char *device);
15
16
18 The getdevicerange() function returns the label range of a user-allo‐
19 catable device.
20
21
22 If the label range is not specified for device, getdevicerange()
23 returns the default values of ADMIN_LOW for the lower bound and
24 ADMIN_HIGH for the upper bound of device.
25
26
27 From the command line, list_devices(1) can be used to see the label
28 range of device.
29
31 The getdevicerange() function returns NULL on failure and sets errno.
32 On successful completion, it returns a pointer to a blrange_t structure
33 which must be freed by the caller, as follows:
34
35 blrange_t *range;
36 ...
37 m_label_free(range->lower_bound);
38 m_label_free(range->upper_bound);
39 free(range);
40
41
42
44 The getdevicerange() function will fail if:
45
46 EAGAIN There is not enough memory available to allocate the
47 required bytes. The application could try later.
48
49
50 ENOMEM The physical limits of the system are exceeded by size bytes
51 of memory which cannot be allocated.
52
53
54 ENOTSUP Invalid upper or lower bound for device.
55
56
58 See attributes(5) for descriptions of the following attributes:
59
60
61
62
63 ┌───────────────────────┬───────────────────────────────────┐
64 │ ATTRIBUTE TYPE │ ATTRIBUTE VALUE │
65 ├───────────────────────┼───────────────────────────────────┤
66 │Interface Stability │ Committed │
67 ├───────────────────────┼───────────────────────────────────┤
68 │MT-Level │ MT-Safe │
69 └───────────────────────┴───────────────────────────────────┘
70
72 list_devices(1), free(3C), libtsol(3LIB), m_label_free(3TSOL),
73 attributes(5)
74
75
76 Validating the Label Request Against the Printer's Label Range in
77 Solaris Trusted Extensions Developer's Guide
78
80 The functionality described on this manual page is available only if
81 the system is configured with Trusted Extensions.
82
83
84
85SunOS 5.11 20 Jul 2007 getdevicerange(3TSOL)