1 /* DVB CI CA Manager */
3 #include <lib/dvb_ci/dvbci_camgr.h>
5 eDVBCICAManagerSession::eDVBCICAManagerSession(eDVBCISlot *tslot)
8 slot->setCAManager(this);
11 eDVBCICAManagerSession::~eDVBCICAManagerSession()
13 slot->setCAManager(NULL);
16 int eDVBCICAManagerSession::receivedAPDU(const unsigned char *tag, const void *data, int len)
18 printf("SESSION(%d)/CA %02x %02x %02x: ", session_nb, tag[0], tag[1],tag[2]);
19 for (int i=0; i<len; i++)
20 printf("%02x ", ((const unsigned char*)data)[i]);
23 if ((tag[0]==0x9f) && (tag[1]==0x80))
29 for (int i=0; i<len; i+=2)
31 printf("%04x ", (((const unsigned char*)data)[i]<<8)|(((const unsigned char*)data)[i+1]));
32 caids.push_back((((const unsigned char*)data)[i]<<8)|(((const unsigned char*)data)[i+1]));
38 printf("unknown APDU tag 9F 80 %02x\n", tag[2]);
45 int eDVBCICAManagerSession::doAction()
51 const unsigned char tag[3]={0x9F, 0x80, 0x30}; // ca info enq
57 printf("stateFinal und action! kann doch garnicht sein ;)\n");
63 int eDVBCICAManagerSession::sendCAPMT(unsigned char *data, int len)
65 const unsigned char tag[3]={0x9F, 0x80, 0x32}; // ca_pmt
67 sendAPDU(tag, data, len);