- Test m_pkthdr.fw_flags against DUMMYNET_MBUF_TAGGED before trying to locate
[dragonfly/netmp.git] / sys / sys / cdrio.h
blob1046801f8e8ec4fa7777ed86ae4208ada85af165
1 /*-
2 * Copyright (c) 2000,2001,2002 Søren Schmidt <sos@FreeBSD.org>
3 * All rights reserved.
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer,
10 * without modification, immediately at the beginning of the file.
11 * 2. Redistributions in binary form must reproduce the above copyright
12 * notice, this list of conditions and the following disclaimer in the
13 * documentation and/or other materials provided with the distribution.
14 * 3. The name of the author may not be used to endorse or promote products
15 * derived from this software without specific prior written permission.
17 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
18 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
19 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
20 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
21 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
22 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
23 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
24 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
26 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28 * $FreeBSD: src/sys/sys/cdrio.h,v 1.1.2.3 2002/11/20 00:26:18 njl Exp $
29 * $DragonFly: src/sys/sys/cdrio.h,v 1.3 2006/05/20 02:42:13 dillon Exp $
32 #ifndef _SYS_CDRIO_H_
33 #define _SYS_CDRIO_H_
35 #ifndef _SYS_TYPES_H_
36 #include <sys/types.h>
37 #endif
38 #ifndef _SYS_IOCCOM_H_
39 #include <sys/ioccom.h>
40 #endif
42 struct cdr_track {
43 int datablock_type; /* data type code */
44 #define CDR_DB_RAW 0x0 /* 2352 bytes of raw data */
45 #define CDR_DB_RAW_PQ 0x1 /* 2368 bytes raw data + P/Q subchan */
46 #define CDR_DB_RAW_PW 0x2 /* 2448 bytes raw data + P-W subchan */
47 #define CDR_DB_RAW_PW_R 0x3 /* 2448 bytes raw data + P-W raw sub */
48 #define CDR_DB_RES_4 0x4 /* reserved */
49 #define CDR_DB_RES_5 0x5 /* reserved */
50 #define CDR_DB_RES_6 0x6 /* reserved */
51 #define CDR_DB_VS_7 0x7 /* vendor specific */
52 #define CDR_DB_ROM_MODE1 0x8 /* 2048 bytes Mode 1 (ISO/IEC 10149) */
53 #define CDR_DB_ROM_MODE2 0x9 /* 2336 bytes Mode 2 (ISO/IEC 10149) */
54 #define CDR_DB_XA_MODE1 0xa /* 2048 bytes Mode 1 (CD-ROM XA 1) */
55 #define CDR_DB_XA_MODE2_F1 0xb /* 2056 bytes Mode 2 (CD-ROM XA 1) */
56 #define CDR_DB_XA_MODE2_F2 0xc /* 2324 bytes Mode 2 (CD-ROM XA 2) */
57 #define CDR_DB_XA_MODE2_MIX 0xd /* 2332 bytes Mode 2 (CD-ROM XA 1/2) */
58 #define CDR_DB_RES_14 0xe /* reserved */
59 #define CDR_DB_VS_15 0xf /* vendor specific */
61 int preemp; /* preemphasis if audio track*/
62 int test_write; /* use test writes, laser turned off */
65 struct cdr_cue_entry {
66 u_int8_t adr:4;
67 u_int8_t ctl:4;
68 u_int8_t track;
69 u_int8_t index;
70 u_int8_t dataform;
71 u_int8_t scms;
72 u_int8_t min;
73 u_int8_t sec;
74 u_int8_t frame;
77 struct cdr_cuesheet {
78 int32_t len;
79 struct cdr_cue_entry *entries;
80 int session_format;
81 #define CDR_SESS_CDROM 0x00
82 #define CDR_SESS_CDI 0x10
83 #define CDR_SESS_CDROM_XA 0x20
85 int session_type;
86 #define CDR_SESS_NONE 0x00
87 #define CDR_SESS_FINAL 0x01
88 #define CDR_SESS_RESERVED 0x02
89 #define CDR_SESS_MULTI 0x03
91 int test_write;
94 #define CDRIOCBLANK _IOW('c', 100, int)
95 #define CDR_B_ALL 0x0
96 #define CDR_B_MIN 0x1
97 #define CDR_B_SESSION 0x6
99 #define CDRIOCNEXTWRITEABLEADDR _IOR('c', 101, int)
100 #define CDRIOCINITWRITER _IOW('c', 102, int)
101 #define CDRIOCINITTRACK _IOW('c', 103, struct cdr_track)
102 #define CDRIOCSENDCUE _IOW('c', 104, struct cdr_cuesheet)
103 #define CDRIOCFLUSH _IO('c', 105)
104 #define CDRIOCFIXATE _IOW('c', 106, int)
105 #define CDRIOCREADSPEED _IOW('c', 107, int)
106 #define CDRIOCWRITESPEED _IOW('c', 108, int)
107 #define CDR_MAX_SPEED 0xffff
108 #define CDRIOCGETBLOCKSIZE _IOR('c', 109, int)
109 #define CDRIOCSETBLOCKSIZE _IOW('c', 110, int)
110 #define CDRIOCGETPROGRESS _IOR('c', 111, int)
112 #endif /* !_SYS_CDRIO_H_ */