autofs: disable by default
[unleashed.git] / include / sys / prnio.h
blob14d4e8e83482316a3f5e9ec17c0a347e1aa0e35c
1 /*
2 * CDDL HEADER START
4 * The contents of this file are subject to the terms of the
5 * Common Development and Distribution License, Version 1.0 only
6 * (the "License"). You may not use this file except in compliance
7 * with the License.
9 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10 * or http://www.opensolaris.org/os/licensing.
11 * See the License for the specific language governing permissions
12 * and limitations under the License.
14 * When distributing Covered Code, include this CDDL HEADER in each
15 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16 * If applicable, add the following below this CDDL HEADER, with the
17 * fields enclosed by brackets "[]" replaced with your own identifying
18 * information: Portions Copyright [yyyy] [name of copyright owner]
20 * CDDL HEADER END
23 * Copyright (c) 2001 by Sun Microsystems, Inc.
24 * All rights reserved.
27 #ifndef _SYS_PRNIO_H
28 #define _SYS_PRNIO_H
30 #pragma ident "%Z%%M% %I% %E% SMI"
33 * Printing system I/O interface
36 #include <sys/types.h>
37 #include <sys/ioccom.h>
39 #ifdef __cplusplus
40 extern "C" {
41 #endif
43 #define PRNIOC 'p'
44 #define PRNIOC_GET_IFCAP _IOR(PRNIOC, 90, uint_t)
45 #define PRNIOC_SET_IFCAP _IOR(PRNIOC, 91, uint_t)
46 #define PRNIOC_GET_IFINFO _IOWR(PRNIOC, 92, struct prn_interface_info)
47 #define PRNIOC_GET_STATUS _IOR(PRNIOC, 93, uint_t)
48 #define PRNIOC_GET_1284_DEVID _IOWR(PRNIOC, 94, struct prn_1284_device_id)
49 #define PRNIOC_GET_1284_STATUS _IOR(PRNIOC, 95, uchar_t)
50 #define PRNIOC_GET_TIMEOUTS _IOR(PRNIOC, 96, struct prn_timeouts)
51 #define PRNIOC_SET_TIMEOUTS _IOW(PRNIOC, 97, struct prn_timeouts)
52 #define PRNIOC_RESET _IO(PRNIOC, 98)
55 * interface capabilities
57 #define PRN_BIDI 0x0001 /* bi-directional operation is supported */
58 #define PRN_HOTPLUG 0x0002 /* interface allows device hotplugging */
59 #define PRN_1284_DEVID 0x0004 /* device can return 1284 device ID */
60 #define PRN_1284_STATUS 0x0008 /* device can return status lines state */
61 #define PRN_TIMEOUTS 0x0010 /* timeouts are supported */
62 #define PRN_STREAMS 0x0020 /* special flush semantics */
65 * printer interface info
67 struct prn_interface_info {
68 uint_t if_len; /* length of buffer */
69 uint_t if_rlen; /* actual length of info string */
70 char *if_data; /* buffer address */
71 #ifndef _LP64
72 int if_filler; /* preserve struct size in 32 bit */
73 #endif
77 * printer interface info string (recommended values)
79 #define PRN_PARALLEL "parallel" /* parallel port (Centronics or 1284) */
80 #define PRN_SERIAL "serial" /* serial port (EIA-232, EIA-485) */
81 #define PRN_USB "USB" /* USB */
82 #define PRN_1394 "1394" /* IEEE 1394 (Firewire) */
85 * status bits for PRNIOC_GET_STATUS
87 #define PRN_ONLINE 0x01 /* device is connected */
88 #define PRN_READY 0x02 /* device is ready to communicate */
91 * 1284 pins status bits
93 #define PRN_1284_NOFAULT 0x08 /* device is not in error state */
94 #define PRN_1284_SELECT 0x10 /* device selected */
95 #define PRN_1284_PE 0x20 /* paper error */
96 #define PRN_1284_BUSY 0x80 /* device busy */
99 * IEEE 1284 device ID
101 struct prn_1284_device_id {
102 uint_t id_len; /* length of buffer */
103 uint_t id_rlen; /* actual length of device ID string */
104 char *id_data; /* buffer address */
105 #ifndef _LP64
106 int id_filler; /* preserve struct size in 32 bit */
107 #endif
111 * printer driver timeouts
113 struct prn_timeouts {
114 uint_t tmo_forward; /* forward transfer timeout */
115 uint_t tmo_reverse; /* reverse transfer timeout */
119 * driver support for 32-bit applications
121 #ifdef _KERNEL
123 struct prn_interface_info32 {
124 uint_t if_len; /* length of buffer */
125 uint_t if_rlen; /* actual length of info string */
126 caddr32_t if_data; /* buffer address */
129 struct prn_1284_device_id32 {
130 uint_t id_len; /* length of buffer */
131 uint_t id_rlen; /* actual length of device id string */
132 caddr32_t id_data; /* buffer address */
135 #endif
137 #ifdef __cplusplus
139 #endif
141 #endif /* _SYS_PRNIO_H */