Dr Andrew Scott G7VAV

My photo
 
June 2025
Mo Tu We Th Fr Sa Su
26 27 28 29 30 31 1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 1 2 3 4 5 6


pktcdvd.h
001: /*
002:  * Copyright (C) 2000 Jens Axboe <axboe@suse.de>
003:  * Copyright (C) 2001-2004 Peter Osterlund <petero2@telia.com>
004:  *
005:  * May be copied or modified under the terms of the GNU General Public
006:  * License.  See linux/COPYING for more information.
007:  *
008:  * Packet writing layer for ATAPI and SCSI CD-R, CD-RW, DVD-R, and
009:  * DVD-RW devices.
010:  *
011:  */
012: #ifndef __PKTCDVD_H
013: #define __PKTCDVD_H
014: 
015: #include <linux/types.h>
016: 
017: /*
018:  * 1 for normal debug messages, 2 is very verbose. 0 to turn it off.
019:  */
020: #define PACKET_DEBUG            1
021: 
022: #define MAX_WRITERS             8
023: 
024: #define PKT_RB_POOL_SIZE        512
025: 
026: /*
027:  * How long we should hold a non-full packet before starting data gathering.
028:  */
029: #define PACKET_WAIT_TIME        (HZ * 5 / 1000)
030: 
031: /*
032:  * use drive write caching -- we need deferred error handling to be
033:  * able to successfully recover with this option (drive will return good
034:  * status as soon as the cdb is validated).
035:  */
036: #if defined(CONFIG_CDROM_PKTCDVD_WCACHE)
037: #define USE_WCACHING            1
038: #else
039: #define USE_WCACHING            0
040: #endif
041: 
042: /*
043:  * No user-servicable parts beyond this point ->
044:  */
045: 
046: /*
047:  * device types
048:  */
049: #define PACKET_CDR              1
050: #define PACKET_CDRW             2
051: #define PACKET_DVDR             3
052: #define PACKET_DVDRW            4
053: 
054: /*
055:  * flags
056:  */
057: #define PACKET_WRITABLE         1       /* pd is writable */
058: #define PACKET_NWA_VALID        2       /* next writable address valid */
059: #define PACKET_LRA_VALID        3       /* last recorded address valid */
060: #define PACKET_MERGE_SEGS       4       /* perform segment merging to keep */
061:                                         /* underlying cdrom device happy */
062: 
063: /*
064:  * Disc status -- from READ_DISC_INFO
065:  */
066: #define PACKET_DISC_EMPTY       0
067: #define PACKET_DISC_INCOMPLETE  1
068: #define PACKET_DISC_COMPLETE    2
069: #define PACKET_DISC_OTHER       3
070: 
071: /*
072:  * write type, and corresponding data block type
073:  */
074: #define PACKET_MODE1            1
075: #define PACKET_MODE2            2
076: #define PACKET_BLOCK_MODE1      8
077: #define PACKET_BLOCK_MODE2      10
078: 
079: /*
080:  * Last session/border status
081:  */
082: #define PACKET_SESSION_EMPTY            0
083: #define PACKET_SESSION_INCOMPLETE       1
084: #define PACKET_SESSION_RESERVED         2
085: #define PACKET_SESSION_COMPLETE         3
086: 
087: #define PACKET_MCN                      "4a656e734178626f65323030300000"
088: 
089: #undef PACKET_USE_LS
090: 
091: #define PKT_CTRL_CMD_SETUP      0
092: #define PKT_CTRL_CMD_TEARDOWN   1
093: #define PKT_CTRL_CMD_STATUS     2
094: 
095: struct pkt_ctrl_command {
096:         __u32 command;                          /* in: Setup, teardown, status */
097:         __u32 dev_index;                        /* in/out: Device index */
098:         __u32 dev;                              /* in/out: Device nr for cdrw device */
099:         __u32 pkt_dev;                          /* in/out: Device nr for packet device */
100:         __u32 num_devices;                      /* out: Largest device index + 1 */
101:         __u32 padding;                          /* Not used */
102: };
103: 
104: /*
105:  * packet ioctls
106:  */
107: #define PACKET_IOCTL_MAGIC      ('X')
108: #define PACKET_CTRL_CMD         _IOWR(PACKET_IOCTL_MAGIC, 1, struct pkt_ctrl_command)
109: 
110: 
111: #endif /* __PKTCDVD_H */
112: 


for client (none)
© Andrew Scott 2006 - 2025,
All Rights Reserved
http://www.andrew-scott.uk/
Andrew Scott
http://www.andrew-scott.co.uk/