SASC
DVBSoftCAM

cParseSeca Class Reference

#include <parse.h>

List of all members.

Static Public Member Functions

static int CmdLen (const unsigned char *data)
static int Payload (const unsigned char *data, const unsigned char **payload)
static int SysMode (const unsigned char *data)
static int KeyNr (const unsigned char *data)
static const unsigned char * ProvIdPtr (const unsigned char *data)
static int ProvId (const unsigned char *data)
static int CmdLen (const unsigned char *data)
static int Payload (const unsigned char *data, const unsigned char **payload)
static int SysMode (const unsigned char *data)
static int KeyNr (const unsigned char *data)
static const unsigned char * ProvIdPtr (const unsigned char *data)
static int ProvId (const unsigned char *data)

Detailed Description

Definition at line 172 of file parse.h.


Member Function Documentation

int cParseSeca::CmdLen ( const unsigned char *  data) [static]

Definition at line 270 of file parse.c.

References SecaCmd::cmdLen1, and SecaCmd::cmdLen2.

Referenced by Payload(), and cSystemSeca::ProcessEMM().

{
  struct SecaCmd *s=(struct SecaCmd *)data;
  return ((s->cmdLen1&0x0f)<<8) | s->cmdLen2;
}
static int cParseSeca::CmdLen ( const unsigned char *  data) [static]
int cParseSeca::KeyNr ( const unsigned char *  data) [static]

Definition at line 301 of file parse.c.

References TID.

Referenced by cSmartCardSeca::Decode(), cSystemSeca::ProcessECM(), cCardClientRadegast::ProcessECM(), cSystemSeca::ProcessEMM(), and cSmartCardSeca::Update().

{
  switch(TID(data)) {
    case 0x80:
    case 0x81: return ((struct SecaEcm *)data)->keyNr; break;
    case 0x82: return ((struct SecaEmmUnique *)data)->keyNr; break;
    case 0x84: return ((struct SecaEmmShared *)data)->keyNr; break;
    default: return -1;
    }
}
static int cParseSeca::KeyNr ( const unsigned char *  data) [static]
int cParseSeca::Payload ( const unsigned char *  data,
const unsigned char **  payload 
) [static]

Definition at line 276 of file parse.c.

References CmdLen(), and TID.

Referenced by cSmartCardSeca::Decode(), cSystemSeca::ProcessECM(), cSystemSeca::ProcessEMM(), and cSmartCardSeca::Update().

{
  int l;
  switch(TID(data)) {
    case 0x80:
    case 0x81: l=sizeof(struct SecaEcm); break;
    case 0x82: l=sizeof(struct SecaEmmUnique); break;
    case 0x84: l=sizeof(struct SecaEmmShared); break;
    default: return -1;
    }
  if(payload) *payload=&data[l];
  return CmdLen(data)-l+sizeof(struct SecaCmd);
}
static int cParseSeca::Payload ( const unsigned char *  data,
const unsigned char **  payload 
) [static]
int cParseSeca::ProvId ( const unsigned char *  data) [static]

Definition at line 323 of file parse.c.

References ProvIdPtr().

Referenced by cSmartCardSeca::Decode(), and cSystemSeca::ProcessEMM().

{
  const unsigned char *id=cParseSeca::ProvIdPtr(data);
  return id ? (id[0]<<8)+id[1] : -1;
}
static int cParseSeca::ProvId ( const unsigned char *  data) [static]
static const unsigned char* cParseSeca::ProvIdPtr ( const unsigned char *  data) [static]
const unsigned char * cParseSeca::ProvIdPtr ( const unsigned char *  data) [static]

Definition at line 312 of file parse.c.

References TID.

Referenced by cProviderSeca::MatchID(), and ProvId().

{
  switch(TID(data)) {
    case 0x80:
    case 0x81: return ((struct SecaEcm *)data)->id;
    case 0x82: return ((struct SecaEmmUnique *)data)->id;
    case 0x84: return ((struct SecaEmmShared *)data)->id;
    }
  return 0;
}
int cParseSeca::SysMode ( const unsigned char *  data) [static]

Definition at line 290 of file parse.c.

References TID.

Referenced by cSmartCardSeca::Decode(), cSystemSeca::ProcessECM(), cSystemSeca::ProcessEMM(), and cSmartCardSeca::Update().

{
  switch(TID(data)) {
    case 0x80:
    case 0x81: return ((struct SecaEcm *)data)->sm; break;
    case 0x82: return ((struct SecaEmmUnique *)data)->sm; break;
    case 0x84: return ((struct SecaEmmShared *)data)->sm; break;
    default: return -1;
    }
}
static int cParseSeca::SysMode ( const unsigned char *  data) [static]

The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines