source: trunk/reader-videoguard-common.h @ 5375

Last change on this file since 5375 was 5354, checked in by neoen, 8 years ago

NDS: added support for mail messages from provider.
Text mail messages sent by provider to subscriber are saved to file.
These messages are encapsulated into Unique EMMs.
Two new options in global section of oscam.conf are used to enable this feature:
disablemail = 0 (default is 1)
mailfile = /path/to/file
Tested only with SkyIT.

File size: 2.2 KB
RevLine 
[3049]1#ifndef __NDS_COMMON__
[3321]2#define __NDS_COMMON__
[3049]3
4#include "globals.h"
5
6#include <termios.h>
7#include <unistd.h>
8#ifdef OS_LINUX
9#include <linux/serial.h>
10#endif
11
12#define write_cmd_vg(cmd, data) (card_write(reader, cmd, data, cta_res, &cta_lr) == 0)
13
[3058]14#define NDSUNKNOWN    0
[3069]15#define NDSAUTO    0
[3049]16#define NDS1    1
17#define NDS12    12
18#define NDS2    2
19
20typedef struct nds_atr {
[3058]21    uchar atr[MAX_ATR_LEN];
[4994]22    uint16_t atr_len;
23    int32_t base_year;
24    int32_t tier_start;
25    int32_t nds_version;
[3049]26    const char *desc;
27} NDS_ATR_ENTRY;
28
[4994]29extern int32_t cw_is_valid(unsigned char *cw, int32_t start);
[3184]30extern void cAES_SetKey(struct s_reader * reader, const unsigned char *key);
[3049]31
[4994]32extern void __xxor(unsigned char *data, int32_t len, const unsigned char *v1, const unsigned char *v2);
[3049]33#define xor16(v1,v2,d) __xxor((d),16,(v1),(v2))
[5319]34#define val_by2on3(x)  ((0xaaab*(x))>>16) //fixed point *2/3
[3049]35
[3321]36extern void cCamCryptVG_SetSeed(struct s_reader * reader);
[3184]37extern void cCamCryptVG_GetCamKey(struct s_reader * reader, unsigned char *buff);
[4994]38extern int32_t status_ok(const unsigned char *status);
39extern void memorize_cmd_table (struct s_reader * reader, const unsigned char *mem, int32_t size);
40extern int32_t cmd_table_get_info(struct s_reader * reader, const unsigned char *cmd, unsigned char *rlen, unsigned char *rmode);
41extern int32_t cmd_exists(struct s_reader * reader, const unsigned char *cmd);
42extern int32_t read_cmd_len(struct s_reader * reader, const unsigned char *cmd);
43extern int32_t do_cmd(struct s_reader * reader, const unsigned char *ins, const unsigned char *txbuff, unsigned char *rxbuff,
[3327]44                  unsigned char * cta_res);
[4994]45extern void rev_date_calc(const unsigned char *Date, int32_t *year, int32_t *mon, int32_t *day, int32_t *hh, int32_t *mm, int32_t *ss, int32_t base_year);
46extern void set_known_card_info(struct s_reader * reader, const unsigned char *atr, const uint32_t *atr_size);
[3327]47
[4994]48int32_t videoguard_get_emm_type(EMM_PACKET *ep, struct s_reader * rdr);
[3862]49void videoguard_get_emm_filter(struct s_reader * rdr, uchar *filter);
[4994]50int32_t videoguard_do_emm(struct s_reader * reader, EMM_PACKET *ep, unsigned char CLA, void (*read_tiers)(), int32_t (*docmd)());
[5354]51void videoguard_mail_msg(struct s_reader *rdr, uint8_t *data);
[3862]52
[3049]53#endif // __NDS_COMMON__
54
Note: See TracBrowser for help on using the repository browser.