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
9 * This program is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU General Lesser Public License
11 * as published by the Free Software Foundation; either version 2.1
12 * of the License, or (at your option) any later version.
14 * This program is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 * GNU General Public License for more details.
19 * You should have received a copy of the GNU Lesser General Public License
20 * along with this program; if not, write to the Free Software
21 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
29 * struct ca_slot_info - CA slot interface types and info.
33 * @flags: flags applicable to the slot.
35 * This struct stores the CA slot information.
39 * - %CA_CI - CI high level interface;
40 * - %CA_CI_LINK - CI link layer level interface;
41 * - %CA_CI_PHYS - CI physical layer level interface;
42 * - %CA_DESCR - built-in descrambler;
43 * - %CA_SC -simple smart card interface.
47 * - %CA_CI_MODULE_PRESENT - module (or card) inserted;
48 * - %CA_CI_MODULE_READY - module is ready for usage.
61 #define CA_CI_MODULE_PRESENT 1
62 #define CA_CI_MODULE_READY 2
67 * struct ca_descr_info - descrambler types and info.
69 * @num: number of available descramblers (keys).
70 * @type: type of supported scrambling system.
72 * Identifies the number of descramblers and their type.
76 * - %CA_ECD - European Common Descrambler (ECD) hardware;
77 * - %CA_NDS - Videoguard (NDS) hardware;
78 * - %CA_DSS - Distributed Sample Scrambling (DSS) hardware.
80 struct ca_descr_info
{
89 * struct ca_caps - CA slot interface capabilities.
91 * @slot_num: total number of CA card and module slots.
92 * @slot_type: bitmap with all supported types as defined at
93 * &struct ca_slot_info (e. g. %CA_CI, %CA_CI_LINK, etc).
94 * @descr_num: total number of descrambler slots (keys)
95 * @descr_type: bitmap with all supported types as defined at
96 * &struct ca_descr_info (e. g. %CA_ECD, %CA_NDS, etc).
99 unsigned int slot_num
;
100 unsigned int slot_type
;
101 unsigned int descr_num
;
102 unsigned int descr_type
;
106 * struct ca_msg - a message to/from a CI-CAM
110 * @length: length of the message
113 * This struct carries a message to be send/received from a CI CA module.
119 unsigned char msg
[256];
123 * struct ca_descr - CA descrambler control words info
125 * @index: CA Descrambler slot
126 * @parity: control words parity, where 0 means even and 1 means odd
127 * @cw: CA Descrambler control words
135 #define CA_RESET _IO('o', 128)
136 #define CA_GET_CAP _IOR('o', 129, struct ca_caps)
137 #define CA_GET_SLOT_INFO _IOR('o', 130, struct ca_slot_info)
138 #define CA_GET_DESCR_INFO _IOR('o', 131, struct ca_descr_info)
139 #define CA_GET_MSG _IOR('o', 132, struct ca_msg)
140 #define CA_SEND_MSG _IOW('o', 133, struct ca_msg)
141 #define CA_SET_DESCR _IOW('o', 134, struct ca_descr)
143 #if !defined(__KERNEL__)
145 /* This is needed for legacy userspace support */
146 typedef struct ca_slot_info ca_slot_info_t
;
147 typedef struct ca_descr_info ca_descr_info_t
;
148 typedef struct ca_caps ca_caps_t
;
149 typedef struct ca_msg ca_msg_t
;
150 typedef struct ca_descr ca_descr_t
;