SASC-NG
DVBSoftCAM

nagra2.h File Reference

#include "data.h"
#include "crypto.h"
#include "misc.h"
#include "helper.h"
#include <openssl/des.h>
#include <openssl/sha.h>
#include "openssl-compat.h"
#include "nagra-def.h"
#include "cpu.h"
#include "log-nagra.h"

Go to the source code of this file.

Classes

class  cMapReg
class  cMapMath
class  cMapCore
class  cN2Timer
class  cN2CRC
class  cMapMemHW
class  cN2Emu
class  cN2Prov
class  cN2ProvLink
class  cN2ProvLinkReg< PROV, ID, FLAGS >
class  cN2Providers

Defines

#define MATCH_ID(x, y)   ((((x)^(y))&~0x107)==0)
#define HAS_AUXSRV
#define DEF_WORDSIZE   4
#define DEF_MAXWORDSIZE   17
#define WS_START(x)   { int __oldws=wordsize; wordsize=(x);
#define WS_END()   wordsize=__oldws; }
#define SETSIZE   0x02
#define IMPORT_J   0x03
#define IMPORT_A   0x04
#define IMPORT_B   0x05
#define IMPORT_C   0x06
#define IMPORT_D   0x07
#define IMPORT_LAST   0x08
#define EXPORT_J   0x09
#define EXPORT_A   0x0A
#define EXPORT_B   0x0B
#define EXPORT_C   0x0C
#define EXPORT_D   0x0D
#define EXPORT_LAST   0x0E
#define SWAP_A   0x0F
#define SWAP_B   0x10
#define SWAP_C   0x11
#define SWAP_D   0x12
#define CLEAR_A   0x13
#define CLEAR_B   0x14
#define CLEAR_C   0x15
#define CLEAR_D   0x16
#define COPY_A_B   0x17
#define COPY_B_A   0x18
#define COPY_A_C   0x19
#define COPY_C_A   0x1A
#define COPY_C_D   0x1B
#define COPY_D_C   0x1C
#define HW_REGS   0x20
#define HW_OFFSET   0x0000
#define MAX_TIMERS   3
#define TIMER_NUM(x)   (((x)>>2)&3)
#define HW_NUM(x)   ((x+1)%3)
#define N2FLAG_NONE   0
#define N2FLAG_MECM   1
#define N2FLAG_Bx   2
#define N2FLAG_POSTAU   4
#define N2FLAG_Ex   8
#define N2FLAG_INV   128

Variables

int auxEnabled
int auxPort
char auxAddr [80]
char auxPassword [250]

Define Documentation

#define CLEAR_A   0x13

Definition at line 134 of file nagra2.h.

#define CLEAR_B   0x14

Definition at line 135 of file nagra2.h.

#define CLEAR_C   0x15

Definition at line 136 of file nagra2.h.

#define CLEAR_D   0x16

Definition at line 137 of file nagra2.h.

#define COPY_A_B   0x17

Definition at line 138 of file nagra2.h.

#define COPY_A_C   0x19

Definition at line 140 of file nagra2.h.

#define COPY_B_A   0x18

Definition at line 139 of file nagra2.h.

#define COPY_C_A   0x1A

Definition at line 141 of file nagra2.h.

#define COPY_C_D   0x1B

Definition at line 142 of file nagra2.h.

#define COPY_D_C   0x1C

Definition at line 143 of file nagra2.h.

#define DEF_MAXWORDSIZE   17

Definition at line 54 of file nagra2.h.

#define DEF_WORDSIZE   4

Definition at line 53 of file nagra2.h.

Referenced by cMapMath::cMapMath(), and cMapReg::cMapReg().

#define EXPORT_A   0x0A

Definition at line 125 of file nagra2.h.

#define EXPORT_B   0x0B

Definition at line 126 of file nagra2.h.

Referenced by cN2Prov0501::Algo().

#define EXPORT_C   0x0C

Definition at line 127 of file nagra2.h.

Referenced by cN2Prov0501::Algo().

#define EXPORT_D   0x0D

Definition at line 128 of file nagra2.h.

#define EXPORT_J   0x09

Definition at line 124 of file nagra2.h.

#define EXPORT_LAST   0x0E

Definition at line 129 of file nagra2.h.

#define HAS_AUXSRV

Definition at line 42 of file nagra2.h.

#define HW_NUM (   x)    ((x+1)%3)

Definition at line 243 of file nagra2.h.

Referenced by cMapMemHW::cMapMemHW().

#define HW_OFFSET   0x0000

Definition at line 239 of file nagra2.h.

Referenced by cN2Prov0501::RomInit(), and cN2Prov0101::RomInit().

#define HW_REGS   0x20

Definition at line 238 of file nagra2.h.

Referenced by cN2Prov0501::RomInit(), and cN2Prov0101::RomInit().

#define IMPORT_A   0x04

Definition at line 119 of file nagra2.h.

Referenced by cN2Prov0501::Algo().

#define IMPORT_B   0x05

Definition at line 120 of file nagra2.h.

Referenced by cN2Prov0501::Algo().

#define IMPORT_C   0x06

Definition at line 121 of file nagra2.h.

#define IMPORT_D   0x07

Definition at line 122 of file nagra2.h.

Referenced by cN2Prov0501::Algo().

#define IMPORT_J   0x03

Definition at line 118 of file nagra2.h.

Referenced by cN2Prov0501::Algo().

#define IMPORT_LAST   0x08

Definition at line 123 of file nagra2.h.

#define MATCH_ID (   x,
  y 
)    ((((x)^(y))&~0x107)==0)

Definition at line 38 of file nagra2.h.

Referenced by cN2ProvLink::CanHandle(), cN2Prov::CanHandle(), and cSystemNagra2::ProcessEMM().

#define MAX_TIMERS   3

Definition at line 241 of file nagra2.h.

Referenced by cMapMemHW::AddCycles(), and cMapMemHW::cMapMemHW().

#define N2FLAG_Bx   2

Definition at line 284 of file nagra2.h.

Referenced by Emm(), cN2Prov::PrintCaps(), and cSystemNagra2::ProcessEMM().

#define N2FLAG_Ex   8

Definition at line 286 of file nagra2.h.

Referenced by Emm(), cN2Prov::PrintCaps(), and cSystemNagra2::ProcessEMM().

#define N2FLAG_INV   128

Definition at line 287 of file nagra2.h.

Referenced by cN2Prov::PrintCaps().

#define N2FLAG_MECM   1

Definition at line 283 of file nagra2.h.

Referenced by Ecm(), cN2Prov::PrintCaps(), and cSystemNagra2::ProcessECM().

#define N2FLAG_NONE   0

Definition at line 282 of file nagra2.h.

Referenced by Ecm(), Emm(), main(), cSystemNagra2::ProcessECM(), and cSystemNagra2::ProcessEMM().

#define N2FLAG_POSTAU   4

Definition at line 285 of file nagra2.h.

Referenced by Emm(), cN2Prov::PrintCaps(), and cSystemNagra2::ProcessEMM().

#define SETSIZE   0x02

Definition at line 117 of file nagra2.h.

Referenced by cN2Prov0501::Algo().

#define SWAP_A   0x0F

Definition at line 130 of file nagra2.h.

#define SWAP_B   0x10

Definition at line 131 of file nagra2.h.

#define SWAP_C   0x11

Definition at line 132 of file nagra2.h.

#define SWAP_D   0x12

Definition at line 133 of file nagra2.h.

#define TIMER_NUM (   x)    (((x)>>2)&3)

Definition at line 242 of file nagra2.h.

Referenced by cMapMemHW::Get(), and cMapMemHW::Set().

#define WS_END ( )    wordsize=__oldws; }

Definition at line 87 of file nagra2.h.

Referenced by cMapCore::IMakeJ(), and cMap0101::Map().

#define WS_START (   x)    { int __oldws=wordsize; wordsize=(x);

Definition at line 86 of file nagra2.h.

Referenced by cMapCore::IMakeJ(), and cMap0101::Map().


Variable Documentation

char auxAddr[80]

Definition at line 33 of file nagra2-0101.c.

Referenced by cSystemLinkNagra2::cSystemLinkNagra2().

Definition at line 31 of file nagra2-0101.c.

Referenced by cSystemLinkNagra2::cSystemLinkNagra2(), and cAuxSrv::Map().

char auxPassword[250]

Definition at line 34 of file nagra2-0101.c.

Referenced by cSystemLinkNagra2::cSystemLinkNagra2().

int auxPort

Definition at line 32 of file nagra2-0101.c.

Referenced by cSystemLinkNagra2::cSystemLinkNagra2().

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines