1 | #define ADDRLEN 4 // Address length in EMM commands
|
---|
2 | #define MAX_PROV 16
|
---|
3 | #define SCT_LEN(sct) (3+((sct[1]&0x0f)<<8)+sct[2])
|
---|
4 | #define MAX_LEN 256
|
---|
5 |
|
---|
6 | //Warning: OK = 0 and ERROR = 1 in csctapi !!!
|
---|
7 | #define SKIPPED 2
|
---|
8 | #define OK 1
|
---|
9 | #define ERROR 0
|
---|
10 |
|
---|
11 | #include "atr.h"
|
---|
12 |
|
---|
13 |
|
---|
14 | // reader-irdeto
|
---|
15 | int irdeto_card_init(ATR atr);
|
---|
16 | int irdeto_do_ecm(ECM_REQUEST *);
|
---|
17 | int irdeto_do_emm(EMM_PACKET *);
|
---|
18 | int irdeto_card_info(void);
|
---|
19 |
|
---|
20 | // reader-viaccess
|
---|
21 | int viaccess_card_init(ATR atr);
|
---|
22 | int viaccess_do_ecm(ECM_REQUEST *);
|
---|
23 | int viaccess_do_emm(EMM_PACKET *);
|
---|
24 | int viaccess_card_info(void);
|
---|
25 |
|
---|
26 | // reader-videoguard
|
---|
27 | int videoguard_card_init(ATR atr);
|
---|
28 | int videoguard_do_ecm(ECM_REQUEST *);
|
---|
29 | int videoguard_do_emm(EMM_PACKET *);
|
---|
30 | int videoguard_card_info(void);
|
---|
31 |
|
---|
32 | // reader-cryptoworks
|
---|
33 | int cryptoworks_card_init(ATR atr);
|
---|
34 | int cryptoworks_do_ecm(ECM_REQUEST *);
|
---|
35 | int cryptoworks_do_emm(EMM_PACKET *);
|
---|
36 | int cryptoworks_card_info(void);
|
---|
37 | int CheckSctLen(const uchar *, int);
|
---|
38 |
|
---|
39 | // reader-seca
|
---|
40 | int seca_card_init(ATR atr);
|
---|
41 | int seca_do_ecm(ECM_REQUEST *);
|
---|
42 | int seca_do_emm(EMM_PACKET *);
|
---|
43 | int seca_card_info(void);
|
---|
44 |
|
---|
45 | // reader-nds
|
---|
46 | int nds_card_init(ATR atr, int);
|
---|
47 | int nds_do_ecm(ECM_REQUEST *);
|
---|
48 | int nds_do_emm(EMM_PACKET *);
|
---|
49 | int nds_card_info(void);
|
---|
50 |
|
---|
51 | // reader nagra2/3
|
---|
52 | int nagra2_card_init(ATR atr);
|
---|
53 | int nagra2_do_ecm(ECM_REQUEST *er);
|
---|
54 | int nagra2_card_info(void);
|
---|
55 | int nagra2_do_emm(EMM_PACKET *);
|
---|
56 | void nagra2_post_process();
|
---|
57 |
|
---|
58 | // reader-conax
|
---|
59 | int conax_card_init(ATR atr);
|
---|
60 | int conax_do_ecm(ECM_REQUEST *);
|
---|
61 | int conax_do_emm(EMM_PACKET *);
|
---|
62 | int conax_card_info(void);
|
---|
63 |
|
---|
64 | // reader-dre
|
---|
65 | int dre_card_init(ATR atr);
|
---|
66 | int dre_do_ecm(ECM_REQUEST *);
|
---|
67 | int dre_do_emm(EMM_PACKET *);
|
---|
68 | int dre_card_info(void);
|
---|
69 |
|
---|
70 | #define get_atr \
|
---|
71 | unsigned char atr[64]; \
|
---|
72 | unsigned int atr_size; \
|
---|
73 | ATR_GetRaw(&newatr, atr, &atr_size);
|
---|
74 |
|
---|
75 | #define get_hist \
|
---|
76 | unsigned char hist[64]; \
|
---|
77 | unsigned int hist_size; \
|
---|
78 | ATR_GetHistoricalBytes(&newatr, hist, &hist_size);
|
---|
79 |
|
---|