vdr  2.4.0
Classes | Macros | Functions | Variables
ci.c File Reference
#include "ci.h"
#include <ctype.h>
#include <linux/dvb/ca.h>
#include <malloc.h>
#include <netinet/in.h>
#include <poll.h>
#include <stdio.h>
#include <string.h>
#include <sys/ioctl.h>
#include <time.h>
#include <unistd.h>
#include "device.h"
#include "mtd.h"
#include "pat.h"
#include "receiver.h"
#include "remux.h"
#include "libsi/si.h"
#include "skins.h"
#include "tools.h"

Go to the source code of this file.

Classes

class  cCaPidReceiver
 
class  cCaActivationReceiver
 
class  cCamResponse
 
class  cCamResponses
 
class  cTPDU
 
class  cCiTransportConnection
 
class  cCiResourceManager
 
class  cCiCaPmt
 
class  cCiConditionalAccessSupport
 
class  cCiHostControl
 
class  cCiDateTime
 
class  cCiMMI
 
class  cCiDefaultResourceHandler
 
class  cCiCaPidData
 
class  cCiCaProgramData
 
class  cChannelCamRelation
 

Macros

#define dbgprotocol(a...)   do { if (DebugProtocol) fprintf(stderr, a); } while (0)
 
#define SIZE_INDICATOR   0x80
 
#define UNSCRAMBLE_TIME   5
 
#define TS_PACKET_FACTOR   1024
 
#define CRA_NONE   0
 
#define CRA_DISCARD   -1
 
#define CRA_CONFIRM   -2
 
#define CRA_SELECT   -3
 
#define MAX_TPDU_SIZE   4096
 
#define MAX_TPDU_DATA   (MAX_TPDU_SIZE - 4)
 
#define DATA_INDICATOR   0x80
 
#define T_SB   0x80
 
#define T_RCV   0x81
 
#define T_CREATE_TC   0x82
 
#define T_CTC_REPLY   0x83
 
#define T_DELETE_TC   0x84
 
#define T_DTC_REPLY   0x85
 
#define T_REQUEST_TC   0x86
 
#define T_NEW_TC   0x87
 
#define T_TC_ERROR   0x88
 
#define T_DATA_LAST   0xA0
 
#define T_DATA_MORE   0xA1
 
#define MAX_DUMP   256
 
#define MAX_SESSIONS_PER_TC   16
 
#define ST_SESSION_NUMBER   0x90
 
#define ST_OPEN_SESSION_REQUEST   0x91
 
#define ST_OPEN_SESSION_RESPONSE   0x92
 
#define ST_CREATE_SESSION   0x93
 
#define ST_CREATE_SESSION_RESPONSE   0x94
 
#define ST_CLOSE_SESSION_REQUEST   0x95
 
#define ST_CLOSE_SESSION_RESPONSE   0x96
 
#define SS_OK   0x00
 
#define SS_NOT_ALLOCATED   0xF0
 
#define RI_RESOURCE_MANAGER   0x00010041
 
#define RI_APPLICATION_INFORMATION   0x00020041
 
#define RI_CONDITIONAL_ACCESS_SUPPORT   0x00030041
 
#define RI_HOST_CONTROL   0x00200041
 
#define RI_DATE_TIME   0x00240041
 
#define RI_MMI   0x00400041
 
#define AOT_NONE   0x000000
 
#define AOT_PROFILE_ENQ   0x9F8010
 
#define AOT_PROFILE   0x9F8011
 
#define AOT_PROFILE_CHANGE   0x9F8012
 
#define AOT_APPLICATION_INFO_ENQ   0x9F8020
 
#define AOT_APPLICATION_INFO   0x9F8021
 
#define AOT_ENTER_MENU   0x9F8022
 
#define AOT_CA_INFO_ENQ   0x9F8030
 
#define AOT_CA_INFO   0x9F8031
 
#define AOT_CA_PMT   0x9F8032
 
#define AOT_CA_PMT_REPLY   0x9F8033
 
#define AOT_TUNE   0x9F8400
 
#define AOT_REPLACE   0x9F8401
 
#define AOT_CLEAR_REPLACE   0x9F8402
 
#define AOT_ASK_RELEASE   0x9F8403
 
#define AOT_DATE_TIME_ENQ   0x9F8440
 
#define AOT_DATE_TIME   0x9F8441
 
#define AOT_CLOSE_MMI   0x9F8800
 
#define AOT_DISPLAY_CONTROL   0x9F8801
 
#define AOT_DISPLAY_REPLY   0x9F8802
 
#define AOT_TEXT_LAST   0x9F8803
 
#define AOT_TEXT_MORE   0x9F8804
 
#define AOT_KEYPAD_CONTROL   0x9F8805
 
#define AOT_KEYPRESS   0x9F8806
 
#define AOT_ENQ   0x9F8807
 
#define AOT_ANSW   0x9F8808
 
#define AOT_MENU_LAST   0x9F8809
 
#define AOT_MENU_MORE   0x9F880A
 
#define AOT_MENU_ANSW   0x9F880B
 
#define AOT_LIST_LAST   0x9F880C
 
#define AOT_LIST_MORE   0x9F880D
 
#define AOT_SUBTITLE_SEGMENT_LAST   0x9F880E
 
#define AOT_SUBTITLE_SEGMENT_MORE   0x9F880F
 
#define AOT_DISPLAY_MESSAGE   0x9F8810
 
#define AOT_SCENE_END_MARK   0x9F8811
 
#define AOT_SCENE_DONE   0x9F8812
 
#define AOT_SCENE_CONTROL   0x9F8813
 
#define AOT_SUBTITLE_DOWNLOAD_LAST   0x9F8814
 
#define AOT_SUBTITLE_DOWNLOAD_MORE   0x9F8815
 
#define AOT_FLUSH_DOWNLOAD   0x9F8816
 
#define AOT_DOWNLOAD_REPLY   0x9F8817
 
#define AOT_COMMS_CMD   0x9F8C00
 
#define AOT_CONNECTION_DESCRIPTOR   0x9F8C01
 
#define AOT_COMMS_REPLY   0x9F8C02
 
#define AOT_COMMS_SEND_LAST   0x9F8C03
 
#define AOT_COMMS_SEND_MORE   0x9F8C04
 
#define AOT_COMMS_RCV_LAST   0x9F8C05
 
#define AOT_COMMS_RCV_MORE   0x9F8C06
 
#define RESOURCE_CLASS_MASK   0xFFFF0000
 
#define MAXCASYSTEMIDS   64
 
#define CPLM_MORE   0x00
 
#define CPLM_FIRST   0x01
 
#define CPLM_LAST   0x02
 
#define CPLM_ONLY   0x03
 
#define CPLM_ADD   0x04
 
#define CPLM_UPDATE   0x05
 
#define CPCI_OK_DESCRAMBLING   0x01
 
#define CPCI_OK_MMI   0x02
 
#define CPCI_QUERY   0x03
 
#define CPCI_NOT_SELECTED   0x04
 
#define CAEI_POSSIBLE   0x01
 
#define CAEI_POSSIBLE_COND_PURCHASE   0x02
 
#define CAEI_POSSIBLE_COND_TECHNICAL   0x03
 
#define CAEI_NOT_POSSIBLE_ENTITLEMENT   0x71
 
#define CAEI_NOT_POSSIBLE_TECHNICAL   0x73
 
#define CA_ENABLE_FLAG   0x80
 
#define CA_ENABLE(x)   (((x) & CA_ENABLE_FLAG) ? (x) & ~CA_ENABLE_FLAG : 0)
 
#define QUERY_WAIT_TIME   500
 
#define QUERY_REPLY_TIMEOUT   2000
 
#define QUERY_RETRIES   6
 
#define DEC2BCD(d)   uint8_t(((d / 10) << 4) + (d % 10))
 
#define DCC_SET_MMI_MODE   0x01
 
#define DCC_DISPLAY_CHARACTER_TABLE_LIST   0x02
 
#define DCC_INPUT_CHARACTER_TABLE_LIST   0x03
 
#define DCC_OVERLAY_GRAPHICS_CHARACTERISTICS   0x04
 
#define DCC_FULL_SCREEN_GRAPHICS_CHARACTERISTICS   0x05
 
#define MM_HIGH_LEVEL   0x01
 
#define MM_LOW_LEVEL_OVERLAY_GRAPHICS   0x02
 
#define MM_LOW_LEVEL_FULL_SCREEN_GRAPHICS   0x03
 
#define DRI_MMI_MODE_ACK   0x01
 
#define DRI_LIST_DISPLAY_CHARACTER_TABLES   0x02
 
#define DRI_LIST_INPUT_CHARACTER_TABLES   0x03
 
#define DRI_LIST_GRAPHIC_OVERLAY_CHARACTERISTICS   0x04
 
#define DRI_LIST_FULL_SCREEN_GRAPHIC_CHARACTERISTICS   0x05
 
#define DRI_UNKNOWN_DISPLAY_CONTROL_CMD   0xF0
 
#define DRI_UNKNOWN_MMI_MODE   0xF1
 
#define DRI_UNKNOWN_CHARACTER_TABLE   0xF2
 
#define EF_BLIND   0x01
 
#define AI_CANCEL   0x00
 
#define AI_ANSWER   0x01
 
#define TC_POLL_TIMEOUT   300
 
#define TC_ALIVE_TIMEOUT   2000
 
#define MODULE_CHECK_INTERVAL   500
 
#define MODULE_RESET_TIMEOUT   2
 
#define STREAM_TYPE_VIDEO   0x02
 
#define STREAM_TYPE_AUDIO   0x04
 
#define STREAM_TYPE_PRIVATE   0x06
 
#define QUERY_REPLY_WAIT   100
 
#define CAM_CHECKED_TIMEOUT   15
 
#define MAX_CAM_NUMBER   32
 
#define CHANNEL_CAM_RELATIONS_CLEANUP_INTERVAL   3600
 

Functions

static const uint8_t * GetLength (const uint8_t *Data, int &Length)
 
static uint8_t * SetLength (uint8_t *Data, int Length)
 
static char * CopyString (int Length, const uint8_t *Data)
 
static char * GetString (int &Length, const uint8_t **Data)
 
bool CamResponsesLoad (const char *FileName, bool AllowComments, bool MustExist)
 
static int MtdMapCaDescriptor (uchar *p, cMtdMapper *MtdMapper)
 
static int MtdMapCaDescriptors (uchar *p, cMtdMapper *MtdMapper)
 
static int MtdMapStream (uchar *p, cMtdMapper *MtdMapper)
 
static int MtdMapStreams (uchar *p, cMtdMapper *MtdMapper, int Length)
 

Variables

static bool DumpTPDUDataTransfer = false
 
static bool DebugProtocol = false
 
static bool DumpPolls = false
 
static bool DumpDateTime = false
 
cCamResponses CamResponses
 
cCiResourceHandlers CiResourceHandlers
 
cCamSlots CamSlots
 
cChannelCamRelations ChannelCamRelations
 

Macro Definition Documentation

◆ AI_ANSWER

#define AI_ANSWER   0x01

Definition at line 1367 of file ci.c.

◆ AI_CANCEL

#define AI_CANCEL   0x00

Definition at line 1366 of file ci.c.

◆ AOT_ANSW

#define AOT_ANSW   0x9F8808

Definition at line 668 of file ci.c.

◆ AOT_APPLICATION_INFO

#define AOT_APPLICATION_INFO   0x9F8021

Definition at line 648 of file ci.c.

◆ AOT_APPLICATION_INFO_ENQ

#define AOT_APPLICATION_INFO_ENQ   0x9F8020

Definition at line 647 of file ci.c.

◆ AOT_ASK_RELEASE

#define AOT_ASK_RELEASE   0x9F8403

Definition at line 657 of file ci.c.

◆ AOT_CA_INFO

#define AOT_CA_INFO   0x9F8031

Definition at line 651 of file ci.c.

◆ AOT_CA_INFO_ENQ

#define AOT_CA_INFO_ENQ   0x9F8030

Definition at line 650 of file ci.c.

◆ AOT_CA_PMT

#define AOT_CA_PMT   0x9F8032

Definition at line 652 of file ci.c.

◆ AOT_CA_PMT_REPLY

#define AOT_CA_PMT_REPLY   0x9F8033

Definition at line 653 of file ci.c.

◆ AOT_CLEAR_REPLACE

#define AOT_CLEAR_REPLACE   0x9F8402

Definition at line 656 of file ci.c.

◆ AOT_CLOSE_MMI

#define AOT_CLOSE_MMI   0x9F8800

Definition at line 660 of file ci.c.

◆ AOT_COMMS_CMD

#define AOT_COMMS_CMD   0x9F8C00

Definition at line 684 of file ci.c.

◆ AOT_COMMS_RCV_LAST

#define AOT_COMMS_RCV_LAST   0x9F8C05

Definition at line 689 of file ci.c.

◆ AOT_COMMS_RCV_MORE

#define AOT_COMMS_RCV_MORE   0x9F8C06

Definition at line 690 of file ci.c.

◆ AOT_COMMS_REPLY

#define AOT_COMMS_REPLY   0x9F8C02

Definition at line 686 of file ci.c.

◆ AOT_COMMS_SEND_LAST

#define AOT_COMMS_SEND_LAST   0x9F8C03

Definition at line 687 of file ci.c.

◆ AOT_COMMS_SEND_MORE

#define AOT_COMMS_SEND_MORE   0x9F8C04

Definition at line 688 of file ci.c.

◆ AOT_CONNECTION_DESCRIPTOR

#define AOT_CONNECTION_DESCRIPTOR   0x9F8C01

Definition at line 685 of file ci.c.

◆ AOT_DATE_TIME

#define AOT_DATE_TIME   0x9F8441

Definition at line 659 of file ci.c.

◆ AOT_DATE_TIME_ENQ

#define AOT_DATE_TIME_ENQ   0x9F8440

Definition at line 658 of file ci.c.

◆ AOT_DISPLAY_CONTROL

#define AOT_DISPLAY_CONTROL   0x9F8801

Definition at line 661 of file ci.c.

◆ AOT_DISPLAY_MESSAGE

#define AOT_DISPLAY_MESSAGE   0x9F8810

Definition at line 676 of file ci.c.

◆ AOT_DISPLAY_REPLY

#define AOT_DISPLAY_REPLY   0x9F8802

Definition at line 662 of file ci.c.

◆ AOT_DOWNLOAD_REPLY

#define AOT_DOWNLOAD_REPLY   0x9F8817

Definition at line 683 of file ci.c.

◆ AOT_ENQ

#define AOT_ENQ   0x9F8807

Definition at line 667 of file ci.c.

◆ AOT_ENTER_MENU

#define AOT_ENTER_MENU   0x9F8022

Definition at line 649 of file ci.c.

◆ AOT_FLUSH_DOWNLOAD

#define AOT_FLUSH_DOWNLOAD   0x9F8816

Definition at line 682 of file ci.c.

◆ AOT_KEYPAD_CONTROL

#define AOT_KEYPAD_CONTROL   0x9F8805

Definition at line 665 of file ci.c.

◆ AOT_KEYPRESS

#define AOT_KEYPRESS   0x9F8806

Definition at line 666 of file ci.c.

◆ AOT_LIST_LAST

#define AOT_LIST_LAST   0x9F880C

Definition at line 672 of file ci.c.

◆ AOT_LIST_MORE

#define AOT_LIST_MORE   0x9F880D

Definition at line 673 of file ci.c.

◆ AOT_MENU_ANSW

#define AOT_MENU_ANSW   0x9F880B

Definition at line 671 of file ci.c.

◆ AOT_MENU_LAST

#define AOT_MENU_LAST   0x9F8809

Definition at line 669 of file ci.c.

◆ AOT_MENU_MORE

#define AOT_MENU_MORE   0x9F880A

Definition at line 670 of file ci.c.

◆ AOT_NONE

#define AOT_NONE   0x000000

Definition at line 643 of file ci.c.

◆ AOT_PROFILE

#define AOT_PROFILE   0x9F8011

Definition at line 645 of file ci.c.

◆ AOT_PROFILE_CHANGE

#define AOT_PROFILE_CHANGE   0x9F8012

Definition at line 646 of file ci.c.

◆ AOT_PROFILE_ENQ

#define AOT_PROFILE_ENQ   0x9F8010

Definition at line 644 of file ci.c.

◆ AOT_REPLACE

#define AOT_REPLACE   0x9F8401

Definition at line 655 of file ci.c.

◆ AOT_SCENE_CONTROL

#define AOT_SCENE_CONTROL   0x9F8813

Definition at line 679 of file ci.c.

◆ AOT_SCENE_DONE

#define AOT_SCENE_DONE   0x9F8812

Definition at line 678 of file ci.c.

◆ AOT_SCENE_END_MARK

#define AOT_SCENE_END_MARK   0x9F8811

Definition at line 677 of file ci.c.

◆ AOT_SUBTITLE_DOWNLOAD_LAST

#define AOT_SUBTITLE_DOWNLOAD_LAST   0x9F8814

Definition at line 680 of file ci.c.

◆ AOT_SUBTITLE_DOWNLOAD_MORE

#define AOT_SUBTITLE_DOWNLOAD_MORE   0x9F8815

Definition at line 681 of file ci.c.

◆ AOT_SUBTITLE_SEGMENT_LAST

#define AOT_SUBTITLE_SEGMENT_LAST   0x9F880E

Definition at line 674 of file ci.c.

◆ AOT_SUBTITLE_SEGMENT_MORE

#define AOT_SUBTITLE_SEGMENT_MORE   0x9F880F

Definition at line 675 of file ci.c.

◆ AOT_TEXT_LAST

#define AOT_TEXT_LAST   0x9F8803

Definition at line 663 of file ci.c.

◆ AOT_TEXT_MORE

#define AOT_TEXT_MORE   0x9F8804

Definition at line 664 of file ci.c.

◆ AOT_TUNE

#define AOT_TUNE   0x9F8400

Definition at line 654 of file ci.c.

◆ CA_ENABLE

#define CA_ENABLE (   x)    (((x) & CA_ENABLE_FLAG) ? (x) & ~CA_ENABLE_FLAG : 0)

Definition at line 1069 of file ci.c.

◆ CA_ENABLE_FLAG

#define CA_ENABLE_FLAG   0x80

Definition at line 1067 of file ci.c.

◆ CAEI_NOT_POSSIBLE_ENTITLEMENT

#define CAEI_NOT_POSSIBLE_ENTITLEMENT   0x71

Definition at line 1064 of file ci.c.

◆ CAEI_NOT_POSSIBLE_TECHNICAL

#define CAEI_NOT_POSSIBLE_TECHNICAL   0x73

Definition at line 1065 of file ci.c.

◆ CAEI_POSSIBLE

#define CAEI_POSSIBLE   0x01

Definition at line 1061 of file ci.c.

◆ CAEI_POSSIBLE_COND_PURCHASE

#define CAEI_POSSIBLE_COND_PURCHASE   0x02

Definition at line 1062 of file ci.c.

◆ CAEI_POSSIBLE_COND_TECHNICAL

#define CAEI_POSSIBLE_COND_TECHNICAL   0x03

Definition at line 1063 of file ci.c.

◆ CAM_CHECKED_TIMEOUT

#define CAM_CHECKED_TIMEOUT   15

Definition at line 2788 of file ci.c.

◆ CHANNEL_CAM_RELATIONS_CLEANUP_INTERVAL

#define CHANNEL_CAM_RELATIONS_CLEANUP_INTERVAL   3600

Definition at line 2862 of file ci.c.

◆ CPCI_NOT_SELECTED

#define CPCI_NOT_SELECTED   0x04

Definition at line 898 of file ci.c.

◆ CPCI_OK_DESCRAMBLING

#define CPCI_OK_DESCRAMBLING   0x01

Definition at line 895 of file ci.c.

◆ CPCI_OK_MMI

#define CPCI_OK_MMI   0x02

Definition at line 896 of file ci.c.

◆ CPCI_QUERY

#define CPCI_QUERY   0x03

Definition at line 897 of file ci.c.

◆ CPLM_ADD

#define CPLM_ADD   0x04

Definition at line 890 of file ci.c.

◆ CPLM_FIRST

#define CPLM_FIRST   0x01

Definition at line 887 of file ci.c.

◆ CPLM_LAST

#define CPLM_LAST   0x02

Definition at line 888 of file ci.c.

◆ CPLM_MORE

#define CPLM_MORE   0x00

Definition at line 886 of file ci.c.

◆ CPLM_ONLY

#define CPLM_ONLY   0x03

Definition at line 889 of file ci.c.

◆ CPLM_UPDATE

#define CPLM_UPDATE   0x05

Definition at line 891 of file ci.c.

◆ CRA_CONFIRM

#define CRA_CONFIRM   -2

Definition at line 327 of file ci.c.

◆ CRA_DISCARD

#define CRA_DISCARD   -1

Definition at line 326 of file ci.c.

◆ CRA_NONE

#define CRA_NONE   0

Definition at line 325 of file ci.c.

◆ CRA_SELECT

#define CRA_SELECT   -3

Definition at line 328 of file ci.c.

◆ DATA_INDICATOR

#define DATA_INDICATOR   0x80

Definition at line 457 of file ci.c.

◆ dbgprotocol

#define dbgprotocol (   a...)    do { if (DebugProtocol) fprintf(stderr, a); } while (0)

Definition at line 36 of file ci.c.

◆ DCC_DISPLAY_CHARACTER_TABLE_LIST

#define DCC_DISPLAY_CHARACTER_TABLE_LIST   0x02

Definition at line 1338 of file ci.c.

◆ DCC_FULL_SCREEN_GRAPHICS_CHARACTERISTICS

#define DCC_FULL_SCREEN_GRAPHICS_CHARACTERISTICS   0x05

Definition at line 1341 of file ci.c.

◆ DCC_INPUT_CHARACTER_TABLE_LIST

#define DCC_INPUT_CHARACTER_TABLE_LIST   0x03

Definition at line 1339 of file ci.c.

◆ DCC_OVERLAY_GRAPHICS_CHARACTERISTICS

#define DCC_OVERLAY_GRAPHICS_CHARACTERISTICS   0x04

Definition at line 1340 of file ci.c.

◆ DCC_SET_MMI_MODE

#define DCC_SET_MMI_MODE   0x01

Definition at line 1337 of file ci.c.

◆ DEC2BCD

#define DEC2BCD (   d)    uint8_t(((d / 10) << 4) + (d % 10))

◆ DRI_LIST_DISPLAY_CHARACTER_TABLES

#define DRI_LIST_DISPLAY_CHARACTER_TABLES   0x02

Definition at line 1352 of file ci.c.

◆ DRI_LIST_FULL_SCREEN_GRAPHIC_CHARACTERISTICS

#define DRI_LIST_FULL_SCREEN_GRAPHIC_CHARACTERISTICS   0x05

Definition at line 1355 of file ci.c.

◆ DRI_LIST_GRAPHIC_OVERLAY_CHARACTERISTICS

#define DRI_LIST_GRAPHIC_OVERLAY_CHARACTERISTICS   0x04

Definition at line 1354 of file ci.c.

◆ DRI_LIST_INPUT_CHARACTER_TABLES

#define DRI_LIST_INPUT_CHARACTER_TABLES   0x03

Definition at line 1353 of file ci.c.

◆ DRI_MMI_MODE_ACK

#define DRI_MMI_MODE_ACK   0x01

Definition at line 1351 of file ci.c.

◆ DRI_UNKNOWN_CHARACTER_TABLE

#define DRI_UNKNOWN_CHARACTER_TABLE   0xF2

Definition at line 1358 of file ci.c.

◆ DRI_UNKNOWN_DISPLAY_CONTROL_CMD

#define DRI_UNKNOWN_DISPLAY_CONTROL_CMD   0xF0

Definition at line 1356 of file ci.c.

◆ DRI_UNKNOWN_MMI_MODE

#define DRI_UNKNOWN_MMI_MODE   0xF1

Definition at line 1357 of file ci.c.

◆ EF_BLIND

#define EF_BLIND   0x01

Definition at line 1362 of file ci.c.

◆ MAX_CAM_NUMBER

#define MAX_CAM_NUMBER   32

Definition at line 2861 of file ci.c.

◆ MAX_DUMP

#define MAX_DUMP   256

◆ MAX_SESSIONS_PER_TC

#define MAX_SESSIONS_PER_TC   16

Definition at line 575 of file ci.c.

◆ MAX_TPDU_DATA

#define MAX_TPDU_DATA   (MAX_TPDU_SIZE - 4)

Definition at line 455 of file ci.c.

◆ MAX_TPDU_SIZE

#define MAX_TPDU_SIZE   4096

Definition at line 454 of file ci.c.

◆ MAXCASYSTEMIDS

#define MAXCASYSTEMIDS   64

Definition at line 882 of file ci.c.

◆ MM_HIGH_LEVEL

#define MM_HIGH_LEVEL   0x01

Definition at line 1345 of file ci.c.

◆ MM_LOW_LEVEL_FULL_SCREEN_GRAPHICS

#define MM_LOW_LEVEL_FULL_SCREEN_GRAPHICS   0x03

Definition at line 1347 of file ci.c.

◆ MM_LOW_LEVEL_OVERLAY_GRAPHICS

#define MM_LOW_LEVEL_OVERLAY_GRAPHICS   0x02

Definition at line 1346 of file ci.c.

◆ MODULE_CHECK_INTERVAL

#define MODULE_CHECK_INTERVAL   500

Definition at line 2135 of file ci.c.

◆ MODULE_RESET_TIMEOUT

#define MODULE_RESET_TIMEOUT   2

Definition at line 2136 of file ci.c.

◆ QUERY_REPLY_TIMEOUT

#define QUERY_REPLY_TIMEOUT   2000

Definition at line 1072 of file ci.c.

◆ QUERY_REPLY_WAIT

#define QUERY_REPLY_WAIT   100

Definition at line 2659 of file ci.c.

◆ QUERY_RETRIES

#define QUERY_RETRIES   6

Definition at line 1073 of file ci.c.

◆ QUERY_WAIT_TIME

#define QUERY_WAIT_TIME   500

Definition at line 1071 of file ci.c.

◆ RESOURCE_CLASS_MASK

#define RESOURCE_CLASS_MASK   0xFFFF0000

Definition at line 692 of file ci.c.

◆ RI_APPLICATION_INFORMATION

#define RI_APPLICATION_INFORMATION   0x00020041

Definition at line 635 of file ci.c.

◆ RI_CONDITIONAL_ACCESS_SUPPORT

#define RI_CONDITIONAL_ACCESS_SUPPORT   0x00030041

Definition at line 636 of file ci.c.

◆ RI_DATE_TIME

#define RI_DATE_TIME   0x00240041

Definition at line 638 of file ci.c.

◆ RI_HOST_CONTROL

#define RI_HOST_CONTROL   0x00200041

Definition at line 637 of file ci.c.

◆ RI_MMI

#define RI_MMI   0x00400041

Definition at line 639 of file ci.c.

◆ RI_RESOURCE_MANAGER

#define RI_RESOURCE_MANAGER   0x00010041

Definition at line 634 of file ci.c.

◆ SIZE_INDICATOR

#define SIZE_INDICATOR   0x80

Definition at line 40 of file ci.c.

◆ SS_NOT_ALLOCATED

#define SS_NOT_ALLOCATED   0xF0

Definition at line 630 of file ci.c.

◆ SS_OK

#define SS_OK   0x00

Definition at line 629 of file ci.c.

◆ ST_CLOSE_SESSION_REQUEST

#define ST_CLOSE_SESSION_REQUEST   0x95

Definition at line 624 of file ci.c.

◆ ST_CLOSE_SESSION_RESPONSE

#define ST_CLOSE_SESSION_RESPONSE   0x96

Definition at line 625 of file ci.c.

◆ ST_CREATE_SESSION

#define ST_CREATE_SESSION   0x93

Definition at line 622 of file ci.c.

◆ ST_CREATE_SESSION_RESPONSE

#define ST_CREATE_SESSION_RESPONSE   0x94

Definition at line 623 of file ci.c.

◆ ST_OPEN_SESSION_REQUEST

#define ST_OPEN_SESSION_REQUEST   0x91

Definition at line 620 of file ci.c.

◆ ST_OPEN_SESSION_RESPONSE

#define ST_OPEN_SESSION_RESPONSE   0x92

Definition at line 621 of file ci.c.

◆ ST_SESSION_NUMBER

#define ST_SESSION_NUMBER   0x90

Definition at line 619 of file ci.c.

◆ STREAM_TYPE_AUDIO

#define STREAM_TYPE_AUDIO   0x04

Definition at line 2638 of file ci.c.

◆ STREAM_TYPE_PRIVATE

#define STREAM_TYPE_PRIVATE   0x06

Definition at line 2639 of file ci.c.

◆ STREAM_TYPE_VIDEO

#define STREAM_TYPE_VIDEO   0x02

Definition at line 2637 of file ci.c.

◆ T_CREATE_TC

#define T_CREATE_TC   0x82

Definition at line 461 of file ci.c.

◆ T_CTC_REPLY

#define T_CTC_REPLY   0x83

Definition at line 462 of file ci.c.

◆ T_DATA_LAST

#define T_DATA_LAST   0xA0

Definition at line 468 of file ci.c.

◆ T_DATA_MORE

#define T_DATA_MORE   0xA1

Definition at line 469 of file ci.c.

◆ T_DELETE_TC

#define T_DELETE_TC   0x84

Definition at line 463 of file ci.c.

◆ T_DTC_REPLY

#define T_DTC_REPLY   0x85

Definition at line 464 of file ci.c.

◆ T_NEW_TC

#define T_NEW_TC   0x87

Definition at line 466 of file ci.c.

◆ T_RCV

#define T_RCV   0x81

Definition at line 460 of file ci.c.

◆ T_REQUEST_TC

#define T_REQUEST_TC   0x86

Definition at line 465 of file ci.c.

◆ T_SB

#define T_SB   0x80

Definition at line 459 of file ci.c.

◆ T_TC_ERROR

#define T_TC_ERROR   0x88

Definition at line 467 of file ci.c.

◆ TC_ALIVE_TIMEOUT

#define TC_ALIVE_TIMEOUT   2000

Definition at line 1770 of file ci.c.

◆ TC_POLL_TIMEOUT

#define TC_POLL_TIMEOUT   300

Definition at line 1769 of file ci.c.

◆ TS_PACKET_FACTOR

#define TS_PACKET_FACTOR   1024

Definition at line 275 of file ci.c.

◆ UNSCRAMBLE_TIME

#define UNSCRAMBLE_TIME   5

Definition at line 274 of file ci.c.

Function Documentation

◆ CamResponsesLoad()

bool CamResponsesLoad ( const char *  FileName,
bool  AllowComments,
bool  MustExist 
)

Definition at line 447 of file ci.c.

References CamResponses, and cConfig< T >::Load().

Referenced by main().

Here is the caller graph for this function:

◆ CopyString()

static char* CopyString ( int  Length,
const uint8_t *  Data 
)
static
Parameters
DataCopies the string at Data. Returns a pointer to a newly allocated string.

Definition at line 77 of file ci.c.

References MALLOC.

Referenced by GetString(), and cCiMMI::Process().

◆ GetLength()

static const uint8_t* GetLength ( const uint8_t *  Data,
int &  Length 
)
static
Parameters
LengthGets the length field from the beginning of Data. Returns a pointer to the first byte after the length and stores the length value in Length.

Definition at line 42 of file ci.c.

References SIZE_INDICATOR.

Referenced by cCiSession::GetData(), cTPDU::GetData(), and GetString().

◆ GetString()

static char* GetString ( int &  Length,
const uint8_t **  Data 
)
static
Parameters
DataGets the string at Data. Returns a pointer to a newly allocated string, or NULL in case of error. Upon return Length and Data represent the remaining data after the string has been skipped.

Definition at line 96 of file ci.c.

References CopyString(), and GetLength().

Referenced by cCiMMI::GetText(), and cCiApplicationInformation::Process().

◆ MtdMapCaDescriptor()

static int MtdMapCaDescriptor ( uchar p,
cMtdMapper MtdMapper 
)
static

Definition at line 979 of file ci.c.

References SI::CaDescriptorTag, esyslog, and MtdMapPid().

Referenced by MtdMapCaDescriptors().

◆ MtdMapCaDescriptors()

static int MtdMapCaDescriptors ( uchar p,
cMtdMapper MtdMapper 
)
static

Definition at line 996 of file ci.c.

References MtdMapCaDescriptor().

Referenced by cCiCaPmt::MtdMapPids(), and MtdMapStream().

◆ MtdMapStream()

static int MtdMapStream ( uchar p,
cMtdMapper MtdMapper 
)
static

Definition at line 1013 of file ci.c.

References MtdMapCaDescriptors(), and MtdMapPid().

Referenced by MtdMapStreams().

◆ MtdMapStreams()

static int MtdMapStreams ( uchar p,
cMtdMapper MtdMapper,
int  Length 
)
static

Definition at line 1023 of file ci.c.

References MtdMapStream().

Referenced by cCiCaPmt::MtdMapPids().

◆ SetLength()

static uint8_t* SetLength ( uint8_t *  Data,
int  Length 
)
static
Parameters
LengthSets the length field at the beginning of Data. Returns a pointer to the first byte after the length.

Definition at line 57 of file ci.c.

References SIZE_INDICATOR.

Referenced by cTPDU::cTPDU(), and cCiSession::SendData().

Variable Documentation

◆ CamResponses

cCamResponses CamResponses

Definition at line 445 of file ci.c.

Referenced by CamResponsesLoad(), and cCiMMI::Process().

◆ CamSlots

cCamSlots CamSlots

◆ ChannelCamRelations

cChannelCamRelations ChannelCamRelations

◆ CiResourceHandlers

cCiResourceHandlers CiResourceHandlers

Definition at line 1738 of file ci.c.

Referenced by main(), cCiTransportConnection::OpenSession(), and cCiResourceManager::Process().

◆ DebugProtocol

bool DebugProtocol = false
static

Definition at line 32 of file ci.c.

◆ DumpDateTime

bool DumpDateTime = false
static

Definition at line 34 of file ci.c.

Referenced by cCiDateTime::SendDateTime().

◆ DumpPolls

bool DumpPolls = false
static

Definition at line 33 of file ci.c.

Referenced by cTPDU::Dump(), and cCiTransportConnection::Poll().

◆ DumpTPDUDataTransfer

bool DumpTPDUDataTransfer = false
static

Definition at line 31 of file ci.c.

Referenced by cTPDU::Dump(), cCiTransportConnection::Poll(), and cCiDateTime::SendDateTime().