logo

oasis-root

Compiled tree of Oasis Linux based on own branch at <https://hacktivis.me/git/oasis/> git clone https://anongit.hacktivis.me/git/oasis-root.git

pktcdvd.h (2403B)


  1. /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
  2. /*
  3. * Copyright (C) 2000 Jens Axboe <axboe@suse.de>
  4. * Copyright (C) 2001-2004 Peter Osterlund <petero2@telia.com>
  5. *
  6. * May be copied or modified under the terms of the GNU General Public
  7. * License. See linux/COPYING for more information.
  8. *
  9. * Packet writing layer for ATAPI and SCSI CD-R, CD-RW, DVD-R, and
  10. * DVD-RW devices.
  11. *
  12. */
  13. #ifndef __PKTCDVD_H
  14. #define __PKTCDVD_H
  15. #include <linux/types.h>
  16. /*
  17. * UNUSED:
  18. * 1 for normal debug messages, 2 is very verbose. 0 to turn it off.
  19. */
  20. #define PACKET_DEBUG 1
  21. #define MAX_WRITERS 8
  22. #define PKT_RB_POOL_SIZE 512
  23. /*
  24. * How long we should hold a non-full packet before starting data gathering.
  25. */
  26. #define PACKET_WAIT_TIME (HZ * 5 / 1000)
  27. /*
  28. * No user-servicable parts beyond this point ->
  29. */
  30. /*
  31. * device types
  32. */
  33. #define PACKET_CDR 1
  34. #define PACKET_CDRW 2
  35. #define PACKET_DVDR 3
  36. #define PACKET_DVDRW 4
  37. /*
  38. * flags
  39. */
  40. #define PACKET_WRITABLE 1 /* pd is writable */
  41. #define PACKET_NWA_VALID 2 /* next writable address valid */
  42. #define PACKET_LRA_VALID 3 /* last recorded address valid */
  43. #define PACKET_MERGE_SEGS 4 /* perform segment merging to keep */
  44. /* underlying cdrom device happy */
  45. /*
  46. * Disc status -- from READ_DISC_INFO
  47. */
  48. #define PACKET_DISC_EMPTY 0
  49. #define PACKET_DISC_INCOMPLETE 1
  50. #define PACKET_DISC_COMPLETE 2
  51. #define PACKET_DISC_OTHER 3
  52. /*
  53. * write type, and corresponding data block type
  54. */
  55. #define PACKET_MODE1 1
  56. #define PACKET_MODE2 2
  57. #define PACKET_BLOCK_MODE1 8
  58. #define PACKET_BLOCK_MODE2 10
  59. /*
  60. * Last session/border status
  61. */
  62. #define PACKET_SESSION_EMPTY 0
  63. #define PACKET_SESSION_INCOMPLETE 1
  64. #define PACKET_SESSION_RESERVED 2
  65. #define PACKET_SESSION_COMPLETE 3
  66. #define PACKET_MCN "4a656e734178626f65323030300000"
  67. #undef PACKET_USE_LS
  68. #define PKT_CTRL_CMD_SETUP 0
  69. #define PKT_CTRL_CMD_TEARDOWN 1
  70. #define PKT_CTRL_CMD_STATUS 2
  71. struct pkt_ctrl_command {
  72. __u32 command; /* in: Setup, teardown, status */
  73. __u32 dev_index; /* in/out: Device index */
  74. __u32 dev; /* in/out: Device nr for cdrw device */
  75. __u32 pkt_dev; /* in/out: Device nr for packet device */
  76. __u32 num_devices; /* out: Largest device index + 1 */
  77. __u32 padding; /* Not used */
  78. };
  79. /*
  80. * packet ioctls
  81. */
  82. #define PACKET_IOCTL_MAGIC ('X')
  83. #define PACKET_CTRL_CMD _IOWR(PACKET_IOCTL_MAGIC, 1, struct pkt_ctrl_command)
  84. #endif /* __PKTCDVD_H */