1 /* SPDX-License-Identifier: LGPL-2.1+ WITH Linux-syscall-note */
5 * Copyright (C) 2000 Ralph Metzler <ralph@convergence.de>
6 * & Marcus Metzler <marcus@convergence.de>
7 * for convergence integrated media GmbH
14 * struct ca_slot_info - CA slot interface types and info.
18 * @flags: flags applicable to the slot.
20 * This struct stores the CA slot information.
24 * - %CA_CI - CI high level interface;
25 * - %CA_CI_LINK - CI link layer level interface;
26 * - %CA_CI_PHYS - CI physical layer level interface;
27 * - %CA_DESCR - built-in descrambler;
28 * - %CA_SC -simple smart card interface.
32 * - %CA_CI_MODULE_PRESENT - module (or card) inserted;
33 * - %CA_CI_MODULE_READY - module is ready for usage.
46 #define CA_CI_MODULE_PRESENT 1
47 #define CA_CI_MODULE_READY 2
52 * struct ca_descr_info - descrambler types and info.
54 * @num: number of available descramblers (keys).
55 * @type: type of supported scrambling system.
57 * Identifies the number of descramblers and their type.
61 * - %CA_ECD - European Common Descrambler (ECD) hardware;
62 * - %CA_NDS - Videoguard (NDS) hardware;
63 * - %CA_DSS - Distributed Sample Scrambling (DSS) hardware.
65 struct ca_descr_info
{
74 * struct ca_caps - CA slot interface capabilities.
76 * @slot_num: total number of CA card and module slots.
77 * @slot_type: bitmap with all supported types as defined at
78 * &struct ca_slot_info (e. g. %CA_CI, %CA_CI_LINK, etc).
79 * @descr_num: total number of descrambler slots (keys)
80 * @descr_type: bitmap with all supported types as defined at
81 * &struct ca_descr_info (e. g. %CA_ECD, %CA_NDS, etc).
84 unsigned int slot_num
;
85 unsigned int slot_type
;
86 unsigned int descr_num
;
87 unsigned int descr_type
;
91 * struct ca_msg - a message to/from a CI-CAM
95 * @length: length of the message
98 * This struct carries a message to be send/received from a CI CA module.
104 unsigned char msg
[256];
108 * struct ca_descr - CA descrambler control words info
110 * @index: CA Descrambler slot
111 * @parity: control words parity, where 0 means even and 1 means odd
112 * @cw: CA Descrambler control words
120 #define CA_RESET _IO('o', 128)
121 #define CA_GET_CAP _IOR('o', 129, struct ca_caps)
122 #define CA_GET_SLOT_INFO _IOR('o', 130, struct ca_slot_info)
123 #define CA_GET_DESCR_INFO _IOR('o', 131, struct ca_descr_info)
124 #define CA_GET_MSG _IOR('o', 132, struct ca_msg)
125 #define CA_SEND_MSG _IOW('o', 133, struct ca_msg)
126 #define CA_SET_DESCR _IOW('o', 134, struct ca_descr)
128 #if !defined(__KERNEL__)
130 /* This is needed for legacy userspace support */
131 typedef struct ca_slot_info ca_slot_info_t
;
132 typedef struct ca_descr_info ca_descr_info_t
;
133 typedef struct ca_caps ca_caps_t
;
134 typedef struct ca_msg ca_msg_t
;
135 typedef struct ca_descr ca_descr_t
;