1 .. -*- coding: utf-8; mode: rst -*-
11 * Copyright (C) 2000 Ralph Metzler <ralph@convergence.de>
12 * & Marcus Metzler <marcus@convergence.de>
13 * for convergence integrated media GmbH
15 * This program is free software; you can redistribute it and/or
16 * modify it under the terms of the GNU General Lesser Public License
17 * as published by the Free Software Foundation; either version 2.1
18 * of the License, or (at your option) any later version.
20 * This program is distributed in the hope that it will be useful,
21 * but WITHOUT ANY WARRANTY; without even the implied warranty of
22 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
23 * GNU General Public License for more details.
25 * You should have received a copy of the GNU Lesser General Public License
26 * along with this program; if not, write to the Free Software
27 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
34 /* slot interface types and info */
36 typedef struct ca_slot_info {
37 int num; /* slot number */
39 int type; /* CA interface this slot supports */
40 #define CA_CI 1 /* CI high level interface */
41 #define CA_CI_LINK 2 /* CI link layer level interface */
42 #define CA_CI_PHYS 4 /* CI physical layer level interface */
43 #define CA_DESCR 8 /* built-in descrambler */
44 #define CA_SC 128 /* simple smart card interface */
47 #define CA_CI_MODULE_PRESENT 1 /* module (or card) inserted */
48 #define CA_CI_MODULE_READY 2
52 /* descrambler types and info */
54 typedef struct ca_descr_info {
55 unsigned int num; /* number of available descramblers (keys) */
56 unsigned int type; /* type of supported scrambling system */
62 typedef struct ca_caps {
63 unsigned int slot_num; /* total number of CA card and module slots */
64 unsigned int slot_type; /* OR of all supported types */
65 unsigned int descr_num; /* total number of descrambler slots (keys) */
66 unsigned int descr_type; /* OR of all supported types */
69 /* a message to/from a CI-CAM */
70 typedef struct ca_msg {
74 unsigned char msg[256];
77 typedef struct ca_descr {
79 unsigned int parity; /* 0 == even, 1 == odd */
83 typedef struct ca_pid {
85 int index; /* -1 == disable*/
88 #define CA_RESET _IO('o', 128)
89 #define CA_GET_CAP _IOR('o', 129, ca_caps_t)
90 #define CA_GET_SLOT_INFO _IOR('o', 130, ca_slot_info_t)
91 #define CA_GET_DESCR_INFO _IOR('o', 131, ca_descr_info_t)
92 #define CA_GET_MSG _IOR('o', 132, ca_msg_t)
93 #define CA_SEND_MSG _IOW('o', 133, ca_msg_t)
94 #define CA_SET_DESCR _IOW('o', 134, ca_descr_t)
95 #define CA_SET_PID _IOW('o', 135, ca_pid_t)