SASC
DVBSoftCAM

sc-nagra.c File Reference

#include <stdlib.h>
#include <string.h>
#include <openssl/rand.h>
#include "system-common.h"
#include "smartcard.h"
#include "parse.h"
#include "crypto.h"
#include "helper.h"
#include "opts.h"
#include "log-sc.h"
#include "log-core.h"
#include "version.h"

Go to the source code of this file.

Classes

class  cSystemScNagra
class  cSystemLinkScNagra
class  cCamCryptNagra
struct  SecondaryKey
class  cSmartCardDataNagra
class  cSmartCardNagra
class  cSmartCardLinkNagra

Defines

#define SYSTEM_NAGRA   0x1800
#define SYSTEM_NAME   "SC-Nagra"
#define SYSTEM_PRI   -5
#define SC_NAME   "Nagra"
#define SC_ID   MAKE_SC_ID('N','a','g','r')
#define L_SC   11
#define L_SC_PROC   LCLASS(L_SC,L_SC_LASTDEF<<1)
#define L_SC_ALL   LALL(L_SC_PROC)
#define CRC_POLY   0x1021
#define CRC_INIT   0x0000
#define SETIFS   0xC1
#define IRDINFO   0x00
#define DT01   0x01
#define DT04   0x04
#define TIERS   0x05
#define DT06   0x06
#define CAMDATA   0x08
#define MAX_REC   20
#define HAS_CW()   ((state[2]&6)==6)
#define RENEW_SESSIONKEY()   (state[0]&224)
#define SENDDATETIME()   (state[0]&16)

Functions

 SCAPIVERSTAG ()
struct SecondaryKey __attribute__ ((packed))

Variables

static struct LogModule lm_sc
static int allowT14 = 0
static cSystemLinkScNagra staticInit
unsigned char irdid [4]
unsigned char free [8]
unsigned char exp [2]
unsigned char y1 [8]
unsigned char mod [64]
unsigned char y2 [8]
unsigned char cs [2]
cSmartCardDataNagra __attribute__
static struct StatusMsg msgs []
static struct CardConfig cardCfg
static cSmartCardLinkNagra staticScInit

Define Documentation

#define CAMDATA   0x08

Definition at line 364 of file sc-nagra.c.

#define CRC_INIT   0x0000

Definition at line 336 of file sc-nagra.c.

#define CRC_POLY   0x1021

Definition at line 335 of file sc-nagra.c.

#define DT01   0x01

Definition at line 360 of file sc-nagra.c.

#define DT04   0x04

Definition at line 361 of file sc-nagra.c.

#define DT06   0x06

Definition at line 363 of file sc-nagra.c.

#define HAS_CW ( )    ((state[2]&6)==6)

Definition at line 369 of file sc-nagra.c.

#define IRDINFO   0x00

Definition at line 359 of file sc-nagra.c.

#define L_SC   11

Definition at line 45 of file sc-nagra.c.

#define L_SC_ALL   LALL(L_SC_PROC)

Definition at line 47 of file sc-nagra.c.

#define L_SC_PROC   LCLASS(L_SC,L_SC_LASTDEF<<1)

Definition at line 46 of file sc-nagra.c.

#define MAX_REC   20

Definition at line 366 of file sc-nagra.c.

#define RENEW_SESSIONKEY ( )    (state[0]&224)

Definition at line 370 of file sc-nagra.c.

#define SC_ID   MAKE_SC_ID('N','a','g','r')

Definition at line 43 of file sc-nagra.c.

#define SC_NAME   "Nagra"

Definition at line 42 of file sc-nagra.c.

#define SENDDATETIME ( )    (state[0]&16)

Definition at line 371 of file sc-nagra.c.

#define SETIFS   0xC1

Definition at line 356 of file sc-nagra.c.

#define SYSTEM_NAGRA   0x1800

Definition at line 37 of file sc-nagra.c.

#define SYSTEM_NAME   "SC-Nagra"

Definition at line 39 of file sc-nagra.c.

#define SYSTEM_PRI   -5

Definition at line 40 of file sc-nagra.c.

#define TIERS   0x05

Definition at line 362 of file sc-nagra.c.


Function Documentation

struct SecondaryKey __attribute__ ( (packed)  )
SCAPIVERSTAG ( )

Variable Documentation

cSmartCardDataNagra __attribute__
int allowT14 = 0 [static]

Definition at line 57 of file sc-nagra.c.

struct CardConfig cardCfg [static]
Initial value:
 {
  SM_8O2,500,800
  }

Definition at line 403 of file sc-nagra.c.

unsigned char cs[2]

Definition at line 258 of file sc-nagra.c.

unsigned char exp[2]

Definition at line 254 of file sc-nagra.c.

unsigned char free[8]

Definition at line 253 of file sc-nagra.c.

unsigned char irdid[4]

Definition at line 252 of file sc-nagra.c.

struct LogModule lm_sc [static]
Initial value:

Definition at line 49 of file sc-nagra.c.

unsigned char mod[64]

Definition at line 256 of file sc-nagra.c.

struct StatusMsg msgs[] [static]
Initial value:
 {
  { { 0x6F,0x00 }, "Instruction not supported", false },
  { { 0x90,0x00 }, "Instruction executed without errors", true },
  { { 0xFF,0xFF }, 0, false }
  }

Definition at line 397 of file sc-nagra.c.

Definition at line 81 of file sc-nagra.c.

Definition at line 802 of file sc-nagra.c.

unsigned char y1[8]

Definition at line 255 of file sc-nagra.c.

unsigned char y2[8]

Definition at line 257 of file sc-nagra.c.

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines