|
SASC-NG
DVBSoftCAM
|
Inheritance diagram for cCardClientCamd33:Public Member Functions | |
| cCardClientCamd33 (const char *Name) | |
| virtual bool | CanHandle (unsigned short SysId) |
Protected Member Functions | |
| virtual void | HandleEMMRequest (const unsigned char *buff, int len) |
| virtual bool | CanHandleEMM (int SysId) |
| cCardClientCamd33::cCardClientCamd33 | ( | const char * | Name | ) |
Definition at line 268 of file camd.c.
References cCardClientCommon::emmReqLen, and EMMREQLEN33.
:cCardClientCommon(Name,true,true,true,0) { CAID=0; memset(lastEmmReq,0,sizeof(lastEmmReq)); emmReqLen=EMMREQLEN33; }
| bool cCardClientCamd33::CanHandle | ( | unsigned short | SysId | ) | [virtual] |
Reimplemented from cCardClient.
Definition at line 276 of file camd.c.
References CanHandleEMM().
{
return CanHandleEMM(SysId) || cCardClient::CanHandle(SysId);
}
| bool cCardClientCamd33::CanHandleEMM | ( | int | SysId | ) | [protected, virtual] |
Reimplemented from cCardClientCommon.
Definition at line 281 of file camd.c.
References cCardClientCommon::emmProcessing.
Referenced by CanHandle().
{
return (emmProcessing && SysId==CAID);
}
| void cCardClientCamd33::HandleEMMRequest | ( | const unsigned char * | buff, |
| int | len | ||
| ) | [protected, virtual] |
Reimplemented from cCardClientCommon.
Definition at line 286 of file camd.c.
References cProviders::AddProv(), cCardClient::CaidsChanged(), CheckNull(), cCardClient::emmAllowed, cCardClientCommon::emmProcessing, cCardClientCommon::emmReqLen, L_CC_EMM, L_CC_LOGIN, cCardClient::name, PRINTF, cIdSet::ResetIdSet(), and cIdSet::SetCard().
{
if(len>=emmReqLen && buff[0]==0 && !CheckNull(buff,len) && memcmp(buff,lastEmmReq,emmReqLen)) {
emmProcessing=false;
int c=buff[1]*256+buff[2];
if(c!=CAID) CaidsChanged();
CAID=c;
ResetIdSet();
switch(CAID>>8) {
case 0x17:
case 0x06:
SetCard(new cCardIrdeto(buff[6],&buff[3]));
AddProv(new cProviderIrdeto(0,&buff[7]));
AddProv(new cProviderIrdeto(2,&buff[10]));
memcpy(lastEmmReq,buff,13);
PRINTF(L_CC_LOGIN,"%s: CAID: %04x HexSerial: %02X%02X%02X, HexBase: %02X",name,CAID,buff[3],buff[4],buff[5],buff[6]);
PRINTF(L_CC_LOGIN,"%s: Provider00: %02X%02X%02X, Provider10: %02X%02X%02X",name,buff[7],buff[8],buff[9],buff[10],buff[11],buff[12]);
if(!emmAllowed) PRINTF(L_CC_EMM,"%s: EMM disabled from config",name);
emmProcessing=true;
break;
}
}
}