11 #include <linux/dvb/ca.h>
12 #include <sys/ioctl.h>
23 if (ioctl(fd, CA_GET_CAP, &Caps) == 0) {
24 if ((Caps.slot_type & CA_CI_LINK) != 0) {
25 int NumSlots = Caps.slot_num;
27 for (
int i = 0; i < NumSlots; i++)
48 if (Buffer && MaxLength > 0) {
51 pfd[0].events = POLLIN;
64 if (Buffer && Length > 0) {
72 if (ioctl(
fd, CA_RESET, 1 << Slot) != -1)
83 if (ioctl(
fd, CA_GET_SLOT_INFO, &sinfo) != -1) {
84 if ((sinfo.flags & CA_CI_MODULE_READY) != 0)
86 else if ((sinfo.flags & CA_CI_MODULE_PRESENT) != 0)