vdr-1.7.3/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 <string.h>
#include <sys/ioctl.h>
#include <time.h>
#include <unistd.h>
#include "device.h"
#include "pat.h"
#include "tools.h"

Include dependency graph for ci.c:

Go to the source code of this file.

Classes

class  cTPDU
class  cCiTransportConnection
class  cCiSession
class  cCiResourceManager
class  cCiApplicationInformation
class  cCiCaPmt
class  cCiConditionalAccessSupport
class  cCiDateTime
class  cCiMMI
class  cCiCaPidData
class  cCiCaProgramData
class  cChannelCamRelation

Defines

#define dbgprotocol(a...)   if (DebugProtocol) fprintf(stderr, a)
#define SIZE_INDICATOR   0x80
#define MAX_TPDU_SIZE   2048
#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 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 MAXCASYSTEMIDS   64
#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   1000
#define QUERY_REPLY_TIMEOUT   2000
#define DEC2BCD(d)   (((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_DOLBY   0x06
#define QUERY_REPLY_WAIT   100
#define CAM_CHECKED_TIMEOUT   15
#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)

Variables

static bool DumpTPDUDataTransfer = false
static bool DebugProtocol = false
static bool DumpPolls = false
static bool DumpDateTime = false
cCamSlots CamSlots
cChannelCamRelations ChannelCamRelations


Define Documentation

#define AI_ANSWER   0x01

Definition at line 906 of file ci.c.

Referenced by cCiMMI::SendAnswer().

#define AI_CANCEL   0x00

Definition at line 905 of file ci.c.

Referenced by cCiMMI::SendAnswer().

#define AOT_ANSW   0x9F8808

Definition at line 318 of file ci.c.

Referenced by cCiMMI::SendAnswer().

#define AOT_APPLICATION_INFO   0x9F8021

Definition at line 298 of file ci.c.

Referenced by cCiApplicationInformation::Process().

#define AOT_APPLICATION_INFO_ENQ   0x9F8020

Definition at line 297 of file ci.c.

Referenced by cCiApplicationInformation::Process().

#define AOT_ASK_RELEASE   0x9F8403

Definition at line 307 of file ci.c.

#define AOT_CA_INFO   0x9F8031

Definition at line 301 of file ci.c.

Referenced by cCiConditionalAccessSupport::Process().

#define AOT_CA_INFO_ENQ   0x9F8030

Definition at line 300 of file ci.c.

Referenced by cCiConditionalAccessSupport::Process().

#define AOT_CA_PMT   0x9F8032

Definition at line 302 of file ci.c.

Referenced by cCiConditionalAccessSupport::SendPMT().

#define AOT_CA_PMT_REPLY   0x9F8033

Definition at line 303 of file ci.c.

Referenced by cCiConditionalAccessSupport::Process().

#define AOT_CLEAR_REPLACE   0x9F8402

Definition at line 306 of file ci.c.

#define AOT_CLOSE_MMI   0x9F8800

Definition at line 310 of file ci.c.

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

#define AOT_COMMS_CMD   0x9F8C00

Definition at line 334 of file ci.c.

#define AOT_COMMS_RCV_LAST   0x9F8C05

Definition at line 339 of file ci.c.

#define AOT_COMMS_RCV_MORE   0x9F8C06

Definition at line 340 of file ci.c.

#define AOT_COMMS_REPLY   0x9F8C02

Definition at line 336 of file ci.c.

#define AOT_COMMS_SEND_LAST   0x9F8C03

Definition at line 337 of file ci.c.

#define AOT_COMMS_SEND_MORE   0x9F8C04

Definition at line 338 of file ci.c.

#define AOT_CONNECTION_DESCRIPTOR   0x9F8C01

Definition at line 335 of file ci.c.

#define AOT_DATE_TIME   0x9F8441

Definition at line 309 of file ci.c.

Referenced by cCiDateTime::SendDateTime().

#define AOT_DATE_TIME_ENQ   0x9F8440

Definition at line 308 of file ci.c.

Referenced by cCiDateTime::Process().

#define AOT_DISPLAY_CONTROL   0x9F8801

Definition at line 311 of file ci.c.

Referenced by cCiMMI::Process().

#define AOT_DISPLAY_MESSAGE   0x9F8810

Definition at line 326 of file ci.c.

#define AOT_DISPLAY_REPLY   0x9F8802

Definition at line 312 of file ci.c.

Referenced by cCiMMI::Process().

#define AOT_DOWNLOAD_REPLY   0x9F8817

Definition at line 333 of file ci.c.

#define AOT_ENQ   0x9F8807

Definition at line 317 of file ci.c.

Referenced by cCiMMI::Process().

#define AOT_ENTER_MENU   0x9F8022

Definition at line 299 of file ci.c.

Referenced by cCiApplicationInformation::EnterMenu().

#define AOT_FLUSH_DOWNLOAD   0x9F8816

Definition at line 332 of file ci.c.

#define AOT_KEYPAD_CONTROL   0x9F8805

Definition at line 315 of file ci.c.

#define AOT_KEYPRESS   0x9F8806

Definition at line 316 of file ci.c.

#define AOT_LIST_LAST   0x9F880C

Definition at line 322 of file ci.c.

Referenced by cCiMMI::Process().

#define AOT_LIST_MORE   0x9F880D

Definition at line 323 of file ci.c.

#define AOT_MENU_ANSW   0x9F880B

Definition at line 321 of file ci.c.

Referenced by cCiMMI::SendMenuAnswer().

#define AOT_MENU_LAST   0x9F8809

Definition at line 319 of file ci.c.

Referenced by cCiMMI::Process().

#define AOT_MENU_MORE   0x9F880A

Definition at line 320 of file ci.c.

#define AOT_NONE   0x000000

Definition at line 293 of file ci.c.

Referenced by cCiSession::GetTag().

#define AOT_PROFILE   0x9F8011

Definition at line 295 of file ci.c.

Referenced by cCiResourceManager::Process().

#define AOT_PROFILE_CHANGE   0x9F8012

Definition at line 296 of file ci.c.

Referenced by cCiResourceManager::Process().

#define AOT_PROFILE_ENQ   0x9F8010

Definition at line 294 of file ci.c.

Referenced by cCiResourceManager::Process().

#define AOT_REPLACE   0x9F8401

Definition at line 305 of file ci.c.

#define AOT_SCENE_CONTROL   0x9F8813

Definition at line 329 of file ci.c.

#define AOT_SCENE_DONE   0x9F8812

Definition at line 328 of file ci.c.

#define AOT_SCENE_END_MARK   0x9F8811

Definition at line 327 of file ci.c.

#define AOT_SUBTITLE_DOWNLOAD_LAST   0x9F8814

Definition at line 330 of file ci.c.

#define AOT_SUBTITLE_DOWNLOAD_MORE   0x9F8815

Definition at line 331 of file ci.c.

#define AOT_SUBTITLE_SEGMENT_LAST   0x9F880E

Definition at line 324 of file ci.c.

#define AOT_SUBTITLE_SEGMENT_MORE   0x9F880F

Definition at line 325 of file ci.c.

#define AOT_TEXT_LAST   0x9F8803

Definition at line 313 of file ci.c.

Referenced by cCiMMI::GetText().

#define AOT_TEXT_MORE   0x9F8804

Definition at line 314 of file ci.c.

#define AOT_TUNE   0x9F8400

Definition at line 304 of file ci.c.

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

Definition at line 658 of file ci.c.

Referenced by cCiConditionalAccessSupport::Process().

#define CA_ENABLE_FLAG   0x80

Definition at line 656 of file ci.c.

#define CAEI_NOT_POSSIBLE_ENTITLEMENT   0x71

Definition at line 653 of file ci.c.

#define CAEI_NOT_POSSIBLE_TECHNICAL   0x73

Definition at line 654 of file ci.c.

#define CAEI_POSSIBLE   0x01

Definition at line 650 of file ci.c.

Referenced by cCiConditionalAccessSupport::Process().

#define CAEI_POSSIBLE_COND_PURCHASE   0x02

Definition at line 651 of file ci.c.

#define CAEI_POSSIBLE_COND_TECHNICAL   0x03

Definition at line 652 of file ci.c.

#define CAM_CHECKED_TIMEOUT   15

Definition at line 1957 of file ci.c.

Referenced by cChannelCamRelation::CamChecked(), and cChannelCamRelation::TimedOut().

#define CHANNEL_CAM_RELATIONS_CLEANUP_INTERVAL   3600

Definition at line 2030 of file ci.c.

Referenced by cChannelCamRelations::Cleanup().

#define CPCI_NOT_SELECTED   0x04

Definition at line 568 of file ci.c.

Referenced by cCamSlot::StopDecrypting().

#define CPCI_OK_DESCRAMBLING   0x01

Definition at line 565 of file ci.c.

Referenced by cCamSlot::Process(), and cCamSlot::StartDecrypting().

#define CPCI_OK_MMI   0x02

Definition at line 566 of file ci.c.

#define CPCI_QUERY   0x03

Definition at line 567 of file ci.c.

Referenced by cCamSlot::CanDecrypt(), and cCiConditionalAccessSupport::Process().

#define CPLM_ADD   0x04

Definition at line 560 of file ci.c.

Referenced by cCamSlot::CanDecrypt(), and cCamSlot::SendCaPmt().

#define CPLM_FIRST   0x01

Definition at line 557 of file ci.c.

#define CPLM_LAST   0x02

Definition at line 558 of file ci.c.

#define CPLM_MORE   0x00

Definition at line 556 of file ci.c.

#define CPLM_ONLY   0x03

Definition at line 559 of file ci.c.

Referenced by cCiCaPmt::cCiCaPmt().

#define CPLM_UPDATE   0x05

Definition at line 561 of file ci.c.

Referenced by cCamSlot::SendCaPmt().

#define DATA_INDICATOR   0x80

Definition at line 110 of file ci.c.

Referenced by cCiTransportConnection::Process().

#define dbgprotocol ( a...   )     if (DebugProtocol) fprintf(stderr, a)

#define DCC_DISPLAY_CHARACTER_TABLE_LIST   0x02

Definition at line 877 of file ci.c.

#define DCC_FULL_SCREEN_GRAPHICS_CHARACTERISTICS   0x05

Definition at line 880 of file ci.c.

#define DCC_INPUT_CHARACTER_TABLE_LIST   0x03

Definition at line 878 of file ci.c.

#define DCC_OVERLAY_GRAPHICS_CHARACTERISTICS   0x04

Definition at line 879 of file ci.c.

#define DCC_SET_MMI_MODE   0x01

Definition at line 876 of file ci.c.

Referenced by cCiMMI::Process().

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

#define DRI_LIST_DISPLAY_CHARACTER_TABLES   0x02

Definition at line 891 of file ci.c.

#define DRI_LIST_FULL_SCREEN_GRAPHIC_CHARACTERISTICS   0x05

Definition at line 894 of file ci.c.

#define DRI_LIST_GRAPHIC_OVERLAY_CHARACTERISTICS   0x04

Definition at line 893 of file ci.c.

#define DRI_LIST_INPUT_CHARACTER_TABLES   0x03

Definition at line 892 of file ci.c.

#define DRI_MMI_MODE_ACK   0x01

Definition at line 890 of file ci.c.

Referenced by cCiMMI::Process().

#define DRI_UNKNOWN_CHARACTER_TABLE   0xF2

Definition at line 897 of file ci.c.

#define DRI_UNKNOWN_DISPLAY_CONTROL_CMD   0xF0

Definition at line 895 of file ci.c.

#define DRI_UNKNOWN_MMI_MODE   0xF1

Definition at line 896 of file ci.c.

#define EF_BLIND   0x01

Definition at line 901 of file ci.c.

Referenced by cCiMMI::Process().

#define MAX_DUMP   256

Referenced by cTPDU::Dump().

#define MAX_SESSIONS_PER_TC   16

#define MAX_TPDU_DATA   (MAX_TPDU_SIZE - 4)

Definition at line 108 of file ci.c.

Referenced by cTPDU::cTPDU().

#define MAX_TPDU_SIZE   2048

Definition at line 107 of file ci.c.

#define MAXCASYSTEMIDS   64

Definition at line 646 of file ci.c.

Referenced by cCiConditionalAccessSupport::Process().

#define MM_HIGH_LEVEL   0x01

Definition at line 884 of file ci.c.

Referenced by cCiMMI::Process().

#define MM_LOW_LEVEL_FULL_SCREEN_GRAPHICS   0x03

Definition at line 886 of file ci.c.

#define MM_LOW_LEVEL_OVERLAY_GRAPHICS   0x02

Definition at line 885 of file ci.c.

#define MODULE_CHECK_INTERVAL   500

Definition at line 1528 of file ci.c.

Referenced by cCamSlot::Process().

#define MODULE_RESET_TIMEOUT   2

Definition at line 1529 of file ci.c.

Referenced by cCamSlot::ModuleStatus().

#define QUERY_REPLY_TIMEOUT   2000

Definition at line 661 of file ci.c.

Referenced by cCamSlot::CanDecrypt(), and cCiConditionalAccessSupport::Process().

#define QUERY_REPLY_WAIT   100

Definition at line 1891 of file ci.c.

Referenced by cCamSlot::CanDecrypt().

#define QUERY_WAIT_TIME   1000

Definition at line 660 of file ci.c.

Referenced by cCiConditionalAccessSupport::Process().

#define RI_APPLICATION_INFORMATION   0x00020041

#define RI_CONDITIONAL_ACCESS_SUPPORT   0x00030041

#define RI_DATE_TIME   0x00240041

Definition at line 288 of file ci.c.

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

#define RI_HOST_CONTROL   0x00200041

Definition at line 287 of file ci.c.

Referenced by cCiTransportConnection::OpenSession().

#define RI_MMI   0x00400041

#define RI_RESOURCE_MANAGER   0x00010041

Definition at line 284 of file ci.c.

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

#define SIZE_INDICATOR   0x80

Definition at line 34 of file ci.c.

Referenced by GetLength(), and SetLength().

#define SS_NOT_ALLOCATED   0xF0

Definition at line 280 of file ci.c.

Referenced by cCiTransportConnection::CloseSession().

#define SS_OK   0x00

#define ST_CLOSE_SESSION_REQUEST   0x95

Definition at line 274 of file ci.c.

Referenced by cCiTransportConnection::HandleSessions().

#define ST_CLOSE_SESSION_RESPONSE   0x96

#define ST_CREATE_SESSION   0x93

Definition at line 272 of file ci.c.

#define ST_CREATE_SESSION_RESPONSE   0x94

Definition at line 273 of file ci.c.

Referenced by cCiTransportConnection::HandleSessions().

#define ST_OPEN_SESSION_REQUEST   0x91

Definition at line 270 of file ci.c.

Referenced by cCiTransportConnection::HandleSessions().

#define ST_OPEN_SESSION_RESPONSE   0x92

Definition at line 271 of file ci.c.

Referenced by cCiTransportConnection::OpenSession().

#define ST_SESSION_NUMBER   0x90

Definition at line 269 of file ci.c.

Referenced by cCiTransportConnection::HandleSessions(), and cCiSession::SendData().

#define STREAM_TYPE_AUDIO   0x04

Definition at line 1872 of file ci.c.

Referenced by cCamSlot::AddChannel(), and cCamSlot::CanDecrypt().

#define STREAM_TYPE_DOLBY   0x06

Definition at line 1873 of file ci.c.

Referenced by cCamSlot::AddChannel(), and cCamSlot::CanDecrypt().

#define STREAM_TYPE_VIDEO   0x02

Definition at line 1871 of file ci.c.

Referenced by cCamSlot::AddChannel(), and cCamSlot::CanDecrypt().

#define T_CREATE_TC   0x82

Definition at line 114 of file ci.c.

Referenced by cTPDU::cTPDU(), and cCiTransportConnection::Process().

#define T_CTC_REPLY   0x83

Definition at line 115 of file ci.c.

Referenced by cTPDU::cTPDU(), and cCiTransportConnection::Process().

#define T_DATA_LAST   0xA0

#define T_DATA_MORE   0xA1

Definition at line 122 of file ci.c.

Referenced by cTPDU::cTPDU(), and cCiTransportConnection::Process().

#define T_DELETE_TC   0x84

Definition at line 116 of file ci.c.

Referenced by cTPDU::cTPDU(), and cCiTransportConnection::Process().

#define T_DTC_REPLY   0x85

Definition at line 117 of file ci.c.

Referenced by cTPDU::cTPDU(), and cCiTransportConnection::Process().

#define T_NEW_TC   0x87

Definition at line 119 of file ci.c.

Referenced by cTPDU::cTPDU().

#define T_RCV   0x81

Definition at line 113 of file ci.c.

Referenced by cTPDU::cTPDU(), and cCiTransportConnection::Process().

#define T_REQUEST_TC   0x86

Definition at line 118 of file ci.c.

Referenced by cTPDU::cTPDU(), and cCiTransportConnection::Process().

#define T_SB   0x80

Definition at line 112 of file ci.c.

Referenced by cTPDU::Dump(), cCiTransportConnection::Process(), and cTPDU::Status().

#define T_TC_ERROR   0x88

Definition at line 120 of file ci.c.

Referenced by cTPDU::cTPDU().

#define TC_ALIVE_TIMEOUT   2000

#define TC_POLL_TIMEOUT   300

Definition at line 1192 of file ci.c.

Referenced by cCiTransportConnection::SendTPDU().


Function Documentation

static char* CopyString ( int  Length,
const uint8_t *  Data 
) [static]

Parameters:
Data  Copies the string at Data.
Returns:
Returns a pointer to a newly allocated string.

Definition at line 71 of file ci.c.

References MALLOC, and strreplace().

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

Here is the call graph for this function:

static const uint8_t* GetLength ( const uint8_t *  Data,
int &  Length 
) [static]

Parameters:
Length  Gets the length field from the beginning of Data.
Returns:
Returns a pointer to the first byte after the length and stores the length value in Length.

Definition at line 36 of file ci.c.

References SIZE_INDICATOR.

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

static char* GetString ( int &  Length,
const uint8_t **  Data 
) [static]

Parameters:
Data  Gets the string at Data.
Returns:
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 89 of file ci.c.

References CopyString(), and GetLength().

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

Here is the call graph for this function:

static uint8_t* SetLength ( uint8_t *  Data,
int  Length 
) [static]

Parameters:
Length  Sets the length field at the beginning of Data.
Returns:
Returns a pointer to the first byte after the length.

Definition at line 51 of file ci.c.

References SIZE_INDICATOR.

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


Variable Documentation

Definition at line 1526 of file ci.c.

Referenced by CamControl(), cMenuSetupCAM::cMenuSetupCAM(), and cDevice::GetDevice().

bool DebugProtocol = false [static]

Definition at line 26 of file ci.c.

bool DumpDateTime = false [static]

Definition at line 28 of file ci.c.

Referenced by cCiDateTime::SendDateTime().

bool DumpPolls = false [static]

Definition at line 27 of file ci.c.

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

bool DumpTPDUDataTransfer = false [static]

Definition at line 25 of file ci.c.

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


Generated on Tue Jan 13 14:25:51 2009 for VDR by  doxygen 1.5.6