4.1. CA 数据类型¶
-
struct ca_slot_info¶
CA 插槽接口类型和信息。
定义:
struct ca_slot_info {
int num;
int type;
#define CA_CI 1;
#define CA_CI_LINK 2;
#define CA_CI_PHYS 4;
#define CA_DESCR 8;
#define CA_SC 128;
unsigned int flags;
#define CA_CI_MODULE_PRESENT 1;
#define CA_CI_MODULE_READY 2;
};
成员
num插槽编号。
type插槽类型。
flags适用于插槽的标志。
描述
此结构体存储 CA 插槽信息。
type 可以是
CA_CI- CI 高级接口;
CA_CI_LINK- CI 链路层接口;
CA_CI_PHYS- CI 物理层接口;
CA_DESCR- 内置解扰器;
CA_SC- 简单智能卡接口。
flags 可以是
CA_CI_MODULE_PRESENT- 模块(或卡)已插入;
CA_CI_MODULE_READY- 模块已准备好使用。
-
struct ca_descr_info¶
解扰器类型和信息。
定义:
struct ca_descr_info {
unsigned int num;
unsigned int type;
#define CA_ECD 1;
#define CA_NDS 2;
#define CA_DSS 4;
};
成员
num可用解扰器(密钥)的数量。
type支持的加扰系统类型。
描述
标识解扰器的数量及其类型。
type 可以是
CA_ECD- 欧洲通用解扰器 (ECD) 硬件;
CA_NDS- Videoguard (NDS) 硬件;
CA_DSS- 分布式采样加扰 (DSS) 硬件。
-
struct ca_caps¶
CA 插槽接口功能。
定义:
struct ca_caps {
unsigned int slot_num;
unsigned int slot_type;
unsigned int descr_num;
unsigned int descr_type;
};
成员
slot_numCA 卡和模块插槽的总数。
slot_type位图,其中包含
struct ca_slot_info中定义的所有支持类型(例如CA_CI,CA_CI_LINK等)。descr_num解扰器插槽(密钥)总数
descr_type位图,其中包含
struct ca_descr_info中定义的所有支持类型(例如CA_ECD,CA_NDS等)。
-
struct ca_msg¶
发送到/来自 CI-CAM 的消息
定义:
struct ca_msg {
unsigned int index;
unsigned int type;
unsigned int length;
unsigned char msg[256];
};
成员
index未使用
type未使用
length消息的长度
msg消息
描述
此结构体携带要从 CI CA 模块发送/接收的消息。
-
struct ca_descr¶
CA 解扰器控制字信息
定义:
struct ca_descr {
unsigned int index;
unsigned int parity;
unsigned char cw[8];
};
成员
indexCA 解扰器插槽
parity控制字奇偶校验,其中 0 表示偶数,1 表示奇数
cwCA 解扰器控制字