source: trunk/oscam-emm.h@ 8377

Last change on this file since 8377 was 8377, checked in by gf, 9 years ago

cryptoworks/viaccess: Run EMM reassembly before writing EMM in the card.

Before this patch EMM reassembly was only run by the dvbapi client.

This means that any other client (via newcamd, cs378x, cccam) was
expected to perform its own EMM reassembly otherwise the card
was unable to write the EMMs that needed preprocessing (reassemblation).

This commit moves EMM reassembly where it belongs - just before the
EMM is written in the card. That simplifies client logic (no more
knowledge of EMM structure and types) and allows cards to be updated
via any network protocol as long as the client is not trying to be
smart and just sends us all EMM packets.

The changes were tested with SRG Swiss Viacess card and Digiturk
Cryptoworks card. In the both cards shared EMMs were written OK
while receiving them via cs378x protocol and tsdecrypt as client.

If a client sends already reassembled EMMs it also works.

File size: 384 bytes
1#ifndef OSCAM_EMM_H_
2#define OSCAM_EMM_H_
4int32_t emm_reader_match(struct s_reader *reader, uint16_t caid, uint32_t provid);
5void do_emm(struct s_client * client, EMM_PACKET *ep);
6int32_t reader_do_emm(struct s_reader * reader, EMM_PACKET *ep);
7void do_emm_from_file(struct s_reader * reader);
8void emm_sort_nanos(unsigned char *dest, const unsigned char *src, int32_t len);
Note: See TracBrowser for help on using the repository browser.