Changeset 1776
- Timestamp:
- 03/04/10 22:59:05 (14 years ago)
- Location:
- branches/modular
- Files:
-
- 16 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/modular/globals.h
r1769 r1776 855 855 extern struct s_config *cfg; 856 856 extern char cs_confdir[], *loghist; 857 extern EMM_PACKET epg;858 857 extern struct s_module ph[CS_MAX_MOD]; 859 858 extern struct s_cardsystem cardsystem[CS_MAX_MOD]; -
branches/modular/module-camd33.c
r1125 r1776 166 166 static void camd33_process_emm(uchar *buf, int l) 167 167 { 168 EMM_PACKET epg; 168 169 memset(&epg, 0, sizeof(epg)); 169 170 epg.l=l-7; -
branches/modular/module-camd35.c
r1726 r1776 264 264 { 265 265 int au; 266 EMM_PACKET epg; 266 267 memset(&epg, 0, sizeof(epg)); 267 268 au=client[cs_idx].au; … … 270 271 memcpy(epg.caid , buf+10 , 2); 271 272 memcpy(epg.provid , buf+12 , 4); 272 memcpy(epg.hexserial, reader[au].hexserial, 8); // dummy273 273 memcpy(epg.emm , buf+20 , epg.l); 274 274 do_emm(&epg); -
branches/modular/module-dvbapi.c
r1769 r1776 444 444 { 445 445 int i; 446 EMM_PACKET epg; 446 447 cs_debug("dvbapi: EMM Type: 0x%02x caid: %04x", buffer[0],demux[demux_index].ca_system_id); 447 448 cs_ddump(buffer, len, "emm:"); … … 454 455 epg.caid[1] = (uchar)(demux[demux_index].ca_system_id); 455 456 456 epg.provid[1] = (uchar)(demux[demux_index].provider_id>>16); 457 epg.provid[2] = (uchar)(demux[demux_index].provider_id>>8); 458 epg.provid[3] = (uchar)(demux[demux_index].provider_id); 457 unsigned long provid = (buffer[10] << 8) | buffer[11]; 458 int pid=dvbapi_check_array(prioritytab.caid, CS_MAXCAIDTAB, demux[demux_index].ca_system_id); 459 if (pid>=0) { 460 if (prioritytab.mask[pid]>0) 461 provid=prioritytab.mask[pid]; 462 } 463 464 epg.provid[1] = (uchar)(provid>>16); 465 epg.provid[2] = (uchar)(provid>>8); 466 epg.provid[3] = (uchar)(provid); 459 467 460 468 epg.l=len; -
branches/modular/module-newcamd.c
r1741 r1776 982 982 ushort caid; 983 983 984 EMM_PACKET epg; 984 985 memset(&epg, 0, sizeof(epg)); 985 986 au=client[cs_idx].au; … … 1013 1014 } 1014 1015 else*/ 1015 memcpy(epg.hexserial, reader[au].hexserial, 8); // dummy1016 1016 1017 1017 memcpy(epg.emm, buf, epg.l); -
branches/modular/oscam-log.c
r1769 r1776 144 144 // memcpy(txt, sbuf, 11); 145 145 146 146 //Fixme: remove below if all works ok 147 /* 147 148 time(&t); 148 149 lt=localtime(&t); … … 150 151 lt->tm_year+1900, lt->tm_mon+1, lt->tm_mday, 151 152 lt->tm_hour, lt->tm_min, lt->tm_sec, txt); 152 153 */ 153 154 if (use_syslog && !use_ac_log) // system-logfile 154 155 syslog(LOG_INFO, "%s", txt); -
branches/modular/oscam.c
r1769 r1776 28 28 uchar mbuf[1024]; // global buffer 29 29 ECM_REQUEST *ecmtask; 30 EMM_PACKET epg;31 30 #ifdef CS_ANTICASC 32 31 struct s_acasc ac_stat[CS_MAXPID]; -
branches/modular/reader-common.c
r1769 r1776 343 343 344 344 if (cardsystem[reader[ridx].card_system-1].get_emm_type) 345 rc=cardsystem[reader[ridx].card_system-1].get_emm_type(ep );345 rc=cardsystem[reader[ridx].card_system-1].get_emm_type(ep, rdr); 346 346 else 347 347 rc=0; -
branches/modular/reader-common.h
r1769 r1776 16 16 int irdeto_do_ecm(ECM_REQUEST *); 17 17 int irdeto_do_emm(EMM_PACKET *); 18 int irdeto_get_emm_type(EMM_PACKET * );18 int irdeto_get_emm_type(EMM_PACKET *, struct s_reader *); 19 19 int irdeto_card_info(void); 20 20 … … 23 23 int viaccess_do_ecm(ECM_REQUEST *); 24 24 int viaccess_do_emm(EMM_PACKET *); 25 int viaccess_get_emm_type(EMM_PACKET * );25 int viaccess_get_emm_type(EMM_PACKET *, struct s_reader *); 26 26 int viaccess_card_info(void); 27 27 … … 30 30 int videoguard_do_ecm(ECM_REQUEST *); 31 31 int videoguard_do_emm(EMM_PACKET *); 32 int videoguard_get_emm_type(EMM_PACKET * );32 int videoguard_get_emm_type(EMM_PACKET *, struct s_reader *); 33 33 int videoguard_card_info(void); 34 34 … … 37 37 int cryptoworks_do_ecm(ECM_REQUEST *); 38 38 int cryptoworks_do_emm(EMM_PACKET *); 39 int cryptoworks_get_emm_type(EMM_PACKET * );39 int cryptoworks_get_emm_type(EMM_PACKET *, struct s_reader *); 40 40 int cryptoworks_card_info(void); 41 41 int CheckSctLen(const uchar *, int); … … 45 45 int seca_do_ecm(ECM_REQUEST *); 46 46 int seca_do_emm(EMM_PACKET *); 47 //FIXME int seca_get_emm_type(EMM_PACKET *);48 47 int seca_get_emm_type(EMM_PACKET *, struct s_reader *); 49 48 int seca_card_info(void); … … 53 52 int nds_do_ecm(ECM_REQUEST *); 54 53 int nds_do_emm(EMM_PACKET *); 55 int nds_get_emm_type(EMM_PACKET * );54 int nds_get_emm_type(EMM_PACKET *, struct s_reader *); 56 55 int nds_card_info(void); 57 56 … … 61 60 int nagra2_card_info(void); 62 61 int nagra2_do_emm(EMM_PACKET *); 63 int nagra2_get_emm_type(EMM_PACKET * );62 int nagra2_get_emm_type(EMM_PACKET *, struct s_reader *); 64 63 void nagra2_post_process(); 65 64 … … 68 67 int conax_do_ecm(ECM_REQUEST *); 69 68 int conax_do_emm(EMM_PACKET *); 70 int conax_get_emm_type(EMM_PACKET * );69 int conax_get_emm_type(EMM_PACKET *, struct s_reader *); 71 70 int conax_card_info(void); 72 71 … … 75 74 int dre_do_ecm(ECM_REQUEST *); 76 75 int dre_do_emm(EMM_PACKET *); 77 int dre_get_emm_type(EMM_PACKET * );76 int dre_get_emm_type(EMM_PACKET *, struct s_reader *); 78 77 int dre_card_info(void); 79 78 -
branches/modular/reader-conax.c
r1769 r1776 204 204 } 205 205 206 int conax_get_emm_type(EMM_PACKET *ep ) //returns TRUE if shared emm matches SA, unique emm matches serial, or global or unknown206 int conax_get_emm_type(EMM_PACKET *ep, struct s_reader * rdr) //returns TRUE if shared emm matches SA, unique emm matches serial, or global or unknown 207 207 { 208 208 ep->type=ep->emm[2]+3; //FIXME not sure how this maps onto global, unique and shared! -
branches/modular/reader-cryptoworks.c
r1769 r1776 457 457 } 458 458 459 int cryptoworks_get_emm_type(EMM_PACKET *ep ) //returns TRUE if shared emm matches SA, unique emm matches serial, or global or unknown459 int cryptoworks_get_emm_type(EMM_PACKET *ep, struct s_reader * rdr) //returns TRUE if shared emm matches SA, unique emm matches serial, or global or unknown 460 460 { 461 461 switch (ep->emm[0]) { -
branches/modular/reader-dre.c
r1769 r1776 302 302 } 303 303 304 int dre_get_emm_type(EMM_PACKET *ep )304 int dre_get_emm_type(EMM_PACKET *ep, struct s_reader * rdr) 305 305 { 306 306 switch (ep->emm[0]) { -
branches/modular/reader-irdeto.c
r1769 r1776 366 366 } 367 367 368 int irdeto_get_emm_type(EMM_PACKET *ep) //returns TRUE if shared emm matches SA, unique emm matches serial, or global or unknown 369 { 370 int i, l=(ep->emm[3]&0x07), ok=0; 371 int mode=(ep->emm[3]>>3); 372 if (mode&0x10) { // Hex addressed 373 ep->type = UNIQUE; 368 int irdeto_get_emm_type(EMM_PACKET *ep, struct s_reader * rdr) //returns TRUE if shared emm matches SA, unique emm matches serial, or global or unknown 369 { 370 int i, l = (ep->emm[3]&0x07), ok=0; 371 int mode = (ep->emm[3]>>3); 372 if (mode&0x10) { 373 // Hex addressed 374 ep->type = UNIQUE; 374 375 memset(ep->hexserial,0,8); 375 memcpy(ep->hexserial, ep->emm + 4, l); 376 return (mode==reader[ridx].hexserial[3] && 377 (!l || !memcmp(ep->emm+4, reader[ridx].hexserial, l))); 378 } 379 else { // Provider addressed 376 memcpy(ep->hexserial, ep->emm + 4, l); 377 return (mode == rdr->hexserial[3] && (!l || !memcmp(ep->emm+4, rdr->hexserial, l))); 378 } 379 else { 380 // Provider addressed 381 for(i = 0; i < rdr->nprov; i++) { 382 ok = (mode == rdr->prid[i][0] && (!l || !memcmp(ep->emm+4, &rdr->prid[i][1], l))); 383 if (ok) break; 384 } 385 380 386 ep->type = SHARED; 381 for(i=0; i<reader[ridx].nprov; i++) {382 ok=(mode==reader[ridx].prid[i][0] &&383 (!l || !memcmp(ep->emm+4, &reader[ridx].prid[i][1], l)));384 if (ok) break;385 }386 387 memset(ep->hexserial,0,8); 387 memcpy(ep->hexserial, ep->emm+4, l); //prid in hezserial instread of SA 388 //prid in hexserial instead of SA 389 memcpy(ep->hexserial, ep->emm+4, l); 388 390 return ok; 389 391 } 390 392 } 391 393 -
branches/modular/reader-nagra.c
r1769 r1776 719 719 } 720 720 721 int nagra2_get_emm_type(EMM_PACKET *ep ) //returns TRUE if shared emm matches SA, unique emm matches serial, or global or unknown721 int nagra2_get_emm_type(EMM_PACKET *ep, struct s_reader * rdr) //returns TRUE if shared emm matches SA, unique emm matches serial, or global or unknown 722 722 { 723 723 switch (ep->emm[0]) { … … 732 732 else 733 733 ep->type = UNIQUE; 734 memcpy(ep->hexserial, ep->emm + 3, 6); 735 return (!memcmp (reader[ridx].hexserial, ep->hexserial, 4)); 734 return (!memcmp (rdr->hexserial, ep->hexserial, 4)); 736 735 case 0x82: 737 736 ep->type = GLOBAL; -
branches/modular/reader-viaccess.c
r1769 r1776 355 355 } 356 356 357 int viaccess_get_emm_type(EMM_PACKET *ep ) //returns TRUE if shared emm matches SA, unique emm matches serial, or global or unknown357 int viaccess_get_emm_type(EMM_PACKET *ep, struct s_reader * rdr) //returns TRUE if shared emm matches SA, unique emm matches serial, or global or unknown 358 358 { 359 359 ep->type=UNKNOWN; //FIXME not sure how this maps onto global, unique and shared! -
branches/modular/reader-videoguard2.c
r1769 r1776 943 943 } 944 944 945 int videoguard_get_emm_type(EMM_PACKET *ep ) //returns TRUE if shared emm matches SA, unique emm matches serial, or global or unknown945 int videoguard_get_emm_type(EMM_PACKET *ep, struct s_reader * rdr) //returns TRUE if shared emm matches SA, unique emm matches serial, or global or unknown 946 946 { 947 947 ep->type=UNKNOWN; //FIXME not sure how this maps onto global, unique and shared!
Note:
See TracChangeset
for help on using the changeset viewer.