[8] | 1 | #include <stdlib.h>
|
---|
| 2 | #include <stdio.h>
|
---|
| 3 | #include <assert.h>
|
---|
| 4 | #include <fcntl.h>
|
---|
| 5 | #include <sys/ioctl.h>
|
---|
| 6 | #include <sys/poll.h>
|
---|
| 7 | #include <ctype.h>
|
---|
| 8 | #include <sys/types.h>
|
---|
| 9 | #include <sys/stat.h>
|
---|
| 10 | #include <sys/shm.h>
|
---|
| 11 | #include <sys/wait.h>
|
---|
| 12 | #include <unistd.h>
|
---|
| 13 | #include <sys/mman.h>
|
---|
| 14 | #include <stdarg.h>
|
---|
| 15 | #include <time.h>
|
---|
| 16 | #include <sys/timeb.h>
|
---|
| 17 | #include <limits.h>
|
---|
| 18 |
|
---|
| 19 | #include <sys/socket.h>
|
---|
| 20 | #include <netinet/in.h>
|
---|
[56] | 21 | #include <arpa/inet.h>
|
---|
[8] | 22 | #include <netdb.h>
|
---|
| 23 | #include <string.h>
|
---|
| 24 | #include <signal.h>
|
---|
| 25 | #include <errno.h>
|
---|
| 26 |
|
---|
| 27 | #include <pthread.h>
|
---|
| 28 |
|
---|
| 29 | #ifndef CS_GLOBALS
|
---|
| 30 | #define CS_GLOBALS
|
---|
[648] | 31 | #define CS_VERSION "0.99.4svn"
|
---|
[8] | 32 |
|
---|
| 33 | #if defined(__GNUC__)
|
---|
| 34 | # define GCC_PACK __attribute__((packed))
|
---|
| 35 | #else
|
---|
| 36 | # define GCC_PACK
|
---|
| 37 | #endif
|
---|
| 38 |
|
---|
[21] | 39 | #include "oscam-config.h"
|
---|
[112] | 40 | #ifndef USE_CMAKE
|
---|
| 41 | # include "oscam-ostype.h"
|
---|
| 42 | #endif
|
---|
[21] | 43 | #include "oscam-types.h"
|
---|
[8] | 44 | #include "cscrypt/cscrypt.h"
|
---|
| 45 |
|
---|
[776] | 46 | #ifdef HAVE_PCSC
|
---|
| 47 | #include <PCSC/pcsclite.h>
|
---|
| 48 | #ifdef OS_MACOSX
|
---|
| 49 | #include <PCSC/wintypes.h>
|
---|
| 50 | #else
|
---|
| 51 | #include <PCSC/reader.h>
|
---|
| 52 | #endif
|
---|
| 53 | #endif
|
---|
| 54 |
|
---|
[8] | 55 | #ifndef CS_CONFDIR
|
---|
[648] | 56 | #define CS_CONFDIR "/usr/local/etc"
|
---|
[8] | 57 | #endif
|
---|
| 58 | #ifndef CS_MMAPFILE
|
---|
[648] | 59 | #define CS_MMAPFILE "/tmp/oscam.mem"
|
---|
[8] | 60 | #endif
|
---|
| 61 | #ifndef CS_LOGFILE
|
---|
[648] | 62 | #define CS_LOGFILE "/var/log/oscam.log"
|
---|
[8] | 63 | #endif
|
---|
[648] | 64 | #define CS_QLEN 128 // size of request queue
|
---|
| 65 | #define CS_MAXQLEN 128 // size of request queue for cardreader
|
---|
| 66 | #define CS_MAXCAIDTAB 32 // max. caid-defs/user
|
---|
| 67 | #define CS_MAXTUNTAB 16 // max. betatunnel mappings
|
---|
| 68 | #define CS_MAXPROV 32
|
---|
| 69 | #define CS_MAXPORTS 32 // max server ports
|
---|
| 70 | #define CS_MAXFILTERS 16
|
---|
[8] | 71 |
|
---|
[648] | 72 | #define CS_MAXCARDS 4096
|
---|
| 73 | #define CS_MAXIGNORE 1024
|
---|
| 74 | #define CS_MAXLOCALS 16
|
---|
| 75 | #define CS_ECMSTORESIZE 16 // use MD5()
|
---|
| 76 | #define CS_EMMSTORESIZE 270
|
---|
| 77 | #define CS_CLIENT_TIMEOUT 5000
|
---|
| 78 | #define CS_CLIENT_MAXIDLE 120
|
---|
| 79 | #define CS_BIND_TIMEOUT 120
|
---|
| 80 | #define CS_DELAY 0
|
---|
| 81 | #define CS_RESOLVE_DELAY 30
|
---|
| 82 | #define CS_MAXLOGHIST 30
|
---|
| 83 | #define CS_LOGHISTSIZE 160 // 32+128: username + logline
|
---|
[8] | 84 |
|
---|
| 85 | #ifdef OLD_DEFS
|
---|
| 86 | #ifdef CS_EMBEDDED
|
---|
[648] | 87 | #define CS_MAXPENDING 32
|
---|
| 88 | #define CS_ECMCACHESIZE 32
|
---|
| 89 | #define CS_EMMCACHESIZE 64
|
---|
| 90 | #define CS_MAXPID 32
|
---|
| 91 | #define CS_MAXREADER 8
|
---|
[8] | 92 | #else
|
---|
[648] | 93 | #define CS_MAXPENDING 128
|
---|
| 94 | #define CS_ECMCACHESIZE 128
|
---|
| 95 | #define CS_EMMCACHESIZE 256
|
---|
| 96 | #define CS_MAXPID 128
|
---|
| 97 | #define CS_MAXREADER 64
|
---|
[8] | 98 | #endif
|
---|
| 99 | #endif
|
---|
| 100 |
|
---|
| 101 | #ifdef CS_EMBEDDED
|
---|
[648] | 102 | #define CS_MAXPID 32
|
---|
| 103 | #define CS_MAXREADER (CS_MAXPID>>1)
|
---|
| 104 | #define CS_MAXPENDING CS_MAXPID
|
---|
| 105 | #define CS_ECMCACHESIZE CS_MAXPID
|
---|
| 106 | #define CS_EMMCACHESIZE (CS_MAXPID<<1)
|
---|
[8] | 107 | #else
|
---|
[648] | 108 | #define CS_MAXPID 512
|
---|
| 109 | #define CS_MAXREADER (CS_MAXPID>>2)
|
---|
| 110 | #define CS_MAXPENDING (CS_MAXPID<<1)
|
---|
| 111 | #define CS_ECMCACHESIZE CS_MAXPID
|
---|
| 112 | #define CS_EMMCACHESIZE (CS_MAXPID<<1)
|
---|
[8] | 113 | #define CS_RDR_INIT_HIST
|
---|
| 114 | #endif
|
---|
| 115 |
|
---|
[648] | 116 | #define D_DUMP 1 // Debug Dumps
|
---|
| 117 | #define D_MASTER 2 // Debug Master Process
|
---|
| 118 | #define D_READER 4 // Debug Reader/Proxy Process
|
---|
| 119 | #define D_CLIENT 8 // Debug Client Process
|
---|
| 120 | #define D_DEVICE 16 // Debug Reader I/O
|
---|
| 121 | #define D_WATCHDOG 32 // Debug Watchdog
|
---|
| 122 | #define D_ALL_DUMP 63
|
---|
[8] | 123 |
|
---|
[648] | 124 | #define R_MOUSE 0x1 // Reader smartcard mouse
|
---|
[802] | 125 | #define R_INTERNAL 0x2 // Reader smartcard intern
|
---|
[1208] | 126 | #define R_DB2COM1 0x3 // Reader Dbox2 @ com1
|
---|
| 127 | #define R_DB2COM2 0x4 // Reader Dbox2 @ com1
|
---|
[648] | 128 | #define R_SMART 0x5 // Smartreader+
|
---|
[1208] | 129 | #ifdef HAVE_PCSC
|
---|
| 130 | #define R_PCSC 0x6 // PCSC
|
---|
| 131 | #endif
|
---|
[648] | 132 | #define R_CAMD35 0x10 // Reader cascading camd 3.5x
|
---|
| 133 | #define R_CAMD33 0x11 // Reader cascading camd 3.3x
|
---|
| 134 | #define R_NEWCAMD 0x12 // Reader cascading newcamd
|
---|
| 135 | #define R_RADEGAST 0x13 // Reader cascading radegast
|
---|
| 136 | #define R_CS378X 0x14 // Reader cascading camd 3.5x TCP
|
---|
| 137 | #define R_GBOX 0x20 // Reader cascading gbox
|
---|
| 138 | #define R_CCCAM 0x25 // Reader cascading cccam
|
---|
| 139 | #define R_SERIAL 0x80 // Reader serial
|
---|
| 140 | #define R_IS_NETWORK 0x70
|
---|
| 141 | #define R_IS_CASCADING 0xF0
|
---|
[8] | 142 |
|
---|
[776] | 143 |
|
---|
[1000] | 144 | #define CS_MAX_MOD 12
|
---|
[648] | 145 | #define MOD_CONN_TCP 1
|
---|
| 146 | #define MOD_CONN_UDP 2
|
---|
| 147 | #define MOD_CONN_NET 3
|
---|
| 148 | #define MOD_CONN_SERIAL 4
|
---|
[8] | 149 |
|
---|
| 150 | #ifdef CS_CORE
|
---|
| 151 | char *PIP_ID_TXT[] = { "ECM", "EMM", "LOG", "CIN", "HUP", NULL };
|
---|
| 152 | char *RDR_CD_TXT[] = { "cd", "dsr", "cts", "ring", "none",
|
---|
| 153 | #ifdef USE_GPIO
|
---|
[1263] | 154 | "gpio1", "gpio2", "gpio3", "gpio4", "gpio5", "gpio6", "gpio7", //felix: changed so that gpio can be used
|
---|
[8] | 155 | #endif
|
---|
| 156 | NULL };
|
---|
| 157 | #else
|
---|
| 158 | extern char *PIP_ID_TXT[];
|
---|
| 159 | extern char *RDR_CD_TXT[];
|
---|
| 160 | #endif
|
---|
| 161 |
|
---|
[648] | 162 | #define PIP_ID_ECM 0
|
---|
| 163 | #define PIP_ID_EMM 1
|
---|
| 164 | #define PIP_ID_LOG 2
|
---|
| 165 | #define PIP_ID_CIN 3 // CARD_INFO
|
---|
| 166 | #define PIP_ID_HUP 4
|
---|
| 167 | #define PIP_ID_MAX PIP_ID_HUP
|
---|
| 168 | #define PIP_ID_DCW 5
|
---|
[8] | 169 |
|
---|
[648] | 170 | #define PIP_ID_ERR (-1)
|
---|
| 171 | #define PIP_ID_DIR (-2)
|
---|
| 172 | #define PIP_ID_NUL (-3)
|
---|
[8] | 173 |
|
---|
| 174 | #define cdiff *c_start
|
---|
| 175 |
|
---|
[648] | 176 | #define NCD_AUTO 0
|
---|
| 177 | #define NCD_524 1
|
---|
| 178 | #define NCD_525 2
|
---|
[8] | 179 |
|
---|
| 180 | #define CS_ANTICASC
|
---|
| 181 |
|
---|
[94] | 182 | // moved from reader-common.h
|
---|
| 183 | #define CARD_INSERTED 1
|
---|
| 184 | #define CARD_NEED_INIT 2
|
---|
| 185 | #define CARD_FAILURE 4
|
---|
| 186 |
|
---|
[8] | 187 | enum {E1_GLOBAL=0, E1_USER, E1_READER, E1_SERVER, E1_LSERVER};
|
---|
| 188 | enum {E2_GLOBAL=0, E2_GROUP, E2_CAID, E2_IDENT, E2_CLASS, E2_CHID, E2_QUEUE,
|
---|
| 189 | E2_EA_LEN, E2_F0_LEN, E2_OFFLINE, E2_SID};
|
---|
| 190 |
|
---|
| 191 | //typedef unsigned char uchar;
|
---|
| 192 | //typedef unsigned long ulong;
|
---|
| 193 |
|
---|
[1084] | 194 | typedef unsigned char uint8;
|
---|
| 195 | typedef unsigned short uint16;
|
---|
| 196 | typedef unsigned int uint32;
|
---|
| 197 | typedef unsigned long long uint64;
|
---|
| 198 |
|
---|
[846] | 199 | // constants
|
---|
| 200 | #define CTA_RES_LEN 512
|
---|
| 201 |
|
---|
[8] | 202 | typedef struct s_classtab
|
---|
| 203 | {
|
---|
| 204 | uchar an;
|
---|
| 205 | uchar bn;
|
---|
| 206 | uchar aclass[31];
|
---|
| 207 | uchar bclass[31];
|
---|
| 208 | } GCC_PACK CLASSTAB;
|
---|
| 209 |
|
---|
[648] | 210 | typedef struct s_caidtab
|
---|
[8] | 211 | {
|
---|
| 212 | ushort caid[CS_MAXCAIDTAB];
|
---|
| 213 | ushort mask[CS_MAXCAIDTAB];
|
---|
| 214 | ushort cmap[CS_MAXCAIDTAB];
|
---|
| 215 | } GCC_PACK CAIDTAB;
|
---|
| 216 |
|
---|
[41] | 217 | typedef struct s_tuntab
|
---|
| 218 | {
|
---|
| 219 | ushort bt_caidfrom[CS_MAXTUNTAB];
|
---|
| 220 | ushort bt_caidto[CS_MAXTUNTAB];
|
---|
| 221 | ushort bt_srvid[CS_MAXTUNTAB];
|
---|
| 222 | } GCC_PACK TUNTAB;
|
---|
| 223 |
|
---|
[8] | 224 | typedef struct s_sidtab
|
---|
| 225 | {
|
---|
| 226 | char label[33];
|
---|
| 227 | ushort num_caid;
|
---|
| 228 | ushort num_provid;
|
---|
| 229 | ushort num_srvid;
|
---|
| 230 | ushort *caid;
|
---|
| 231 | ulong *provid;
|
---|
| 232 | ushort *srvid;
|
---|
| 233 | struct s_sidtab *next;
|
---|
| 234 | } GCC_PACK SIDTAB;
|
---|
| 235 |
|
---|
| 236 |
|
---|
| 237 | typedef struct s_filter
|
---|
| 238 | {
|
---|
| 239 | ushort caid;
|
---|
| 240 | uchar nprids;
|
---|
| 241 | ulong prids[CS_MAXPROV];
|
---|
| 242 | } GCC_PACK FILTER;
|
---|
| 243 |
|
---|
| 244 | typedef struct s_ftab
|
---|
| 245 | {
|
---|
| 246 | int nfilts;
|
---|
| 247 | FILTER filts[CS_MAXFILTERS];
|
---|
| 248 | } GCC_PACK FTAB;
|
---|
| 249 |
|
---|
[648] | 250 | typedef struct s_port
|
---|
[8] | 251 | {
|
---|
| 252 | int fd;
|
---|
| 253 | int s_port;
|
---|
| 254 | FTAB ftab;
|
---|
| 255 | } GCC_PACK PORT;
|
---|
| 256 |
|
---|
[648] | 257 | typedef struct s_ptab
|
---|
[8] | 258 | {
|
---|
| 259 | int nports;
|
---|
| 260 | PORT ports[CS_MAXPORTS];
|
---|
| 261 | } GCC_PACK PTAB;
|
---|
| 262 |
|
---|
| 263 | struct s_ecm
|
---|
| 264 | {
|
---|
| 265 | uchar ecmd5[CS_ECMSTORESIZE];
|
---|
| 266 | uchar cw[16];
|
---|
| 267 | ushort caid;
|
---|
| 268 | ulong prid;
|
---|
| 269 | ulong grp;
|
---|
[648] | 270 | // int level;
|
---|
[8] | 271 | };
|
---|
| 272 |
|
---|
| 273 | struct s_emm
|
---|
| 274 | {
|
---|
| 275 | uchar emm[CS_EMMSTORESIZE];
|
---|
| 276 | uchar type;
|
---|
| 277 | int count;
|
---|
| 278 | };
|
---|
| 279 |
|
---|
| 280 | struct s_module
|
---|
| 281 | {
|
---|
| 282 | //int fd;
|
---|
| 283 | int multi;
|
---|
| 284 | int type;
|
---|
| 285 | int watchdog;
|
---|
| 286 | char desc[16];
|
---|
| 287 | char *logtxt;
|
---|
| 288 | //int s_port;
|
---|
| 289 | in_addr_t s_ip;
|
---|
| 290 | void (*s_handler)();
|
---|
| 291 | int (*recv)();
|
---|
| 292 | void (*send_dcw)();
|
---|
[648] | 293 | void (*cleanup)();
|
---|
[8] | 294 | int c_multi;
|
---|
| 295 | int (*c_recv_chk)();
|
---|
| 296 | int (*c_init)();
|
---|
| 297 | int (*c_send_ecm)();
|
---|
| 298 | int (*c_init_log)();
|
---|
| 299 | int (*c_recv_log)();
|
---|
| 300 | int c_port;
|
---|
| 301 | PTAB *ptab;
|
---|
| 302 | };
|
---|
| 303 |
|
---|
| 304 | struct s_irdeto_quess
|
---|
| 305 | {
|
---|
| 306 | int b47;
|
---|
| 307 | ushort caid;
|
---|
| 308 | ushort sid;
|
---|
| 309 | struct s_irdeto_quess *next;
|
---|
| 310 | };
|
---|
| 311 |
|
---|
| 312 | struct s_client
|
---|
| 313 | {
|
---|
| 314 | pid_t pid;
|
---|
| 315 | in_addr_t ip;
|
---|
| 316 | in_port_t port;
|
---|
| 317 | time_t login;
|
---|
| 318 | time_t last;
|
---|
| 319 | time_t lastswitch;
|
---|
| 320 | time_t lastemm;
|
---|
| 321 | time_t lastecm;
|
---|
[977] | 322 | time_t expirationdate;
|
---|
[8] | 323 | ulong grp;
|
---|
| 324 | int crypted;
|
---|
| 325 | int dup;
|
---|
| 326 | int au;
|
---|
[504] | 327 | char autoau;
|
---|
[8] | 328 | int monlvl;
|
---|
| 329 | int dbglvl;
|
---|
| 330 | CAIDTAB ctab;
|
---|
[41] | 331 | TUNTAB ttab;
|
---|
[648] | 332 | ulong sidtabok; // positiv services
|
---|
| 333 | ulong sidtabno; // negative services
|
---|
[8] | 334 | int typ;
|
---|
| 335 | int ctyp;
|
---|
| 336 | int stat;
|
---|
| 337 | int ufd;
|
---|
| 338 | int last_srvid;
|
---|
| 339 | int last_caid;
|
---|
| 340 | int tosleep;
|
---|
| 341 | char usr[32];
|
---|
| 342 | int udp_fd;
|
---|
| 343 | int fd_m2c;
|
---|
| 344 | struct sockaddr_in udp_sa;
|
---|
| 345 | int log;
|
---|
| 346 | int logcounter;
|
---|
| 347 | int cwfound;
|
---|
| 348 | int cwcache;
|
---|
| 349 | int cwnot;
|
---|
[648] | 350 | uchar ucrc[4]; // needed by monitor and used by camd35
|
---|
[8] | 351 | ulong pcrc; // pwd crc
|
---|
[648] | 352 | AES_KEY aeskey; // needed by monitor and used by camd33, camd35
|
---|
[8] | 353 | ushort ncd_msgid;
|
---|
| 354 | uchar ncd_skey[16];
|
---|
| 355 | int port_idx; // index in server ptab
|
---|
| 356 | int ncd_server; // newcamd server?
|
---|
| 357 | #ifdef CS_ANTICASC
|
---|
| 358 | ushort ac_idx;
|
---|
| 359 | ushort ac_limit;
|
---|
| 360 | uchar ac_penalty;
|
---|
| 361 | #endif
|
---|
| 362 | FTAB fchid;
|
---|
| 363 | FTAB ftab; // user [caid] and ident filter
|
---|
| 364 | CLASSTAB cltab;
|
---|
| 365 | };
|
---|
| 366 |
|
---|
| 367 | struct s_reader
|
---|
| 368 | {
|
---|
| 369 | int cs_idx;
|
---|
| 370 | int fd;
|
---|
| 371 | ulong grp;
|
---|
| 372 | int fallback;
|
---|
| 373 | int typ;
|
---|
| 374 | int card_system;
|
---|
| 375 | char label[32];
|
---|
| 376 | char device[128];
|
---|
[1220] | 377 | int handle; //device handle
|
---|
[776] | 378 | char pcsc_name[128];
|
---|
[793] | 379 | int pcsc_has_card;
|
---|
[8] | 380 | int detect;
|
---|
[682] | 381 | int mhz; //actual clock rate of reader in 10khz steps
|
---|
[615] | 382 | int cardmhz; //standard clock speed your card should have in 10khz steps; normally 357 but for Irdeto cards 600
|
---|
[8] | 383 | int r_port;
|
---|
| 384 | char r_usr[64];
|
---|
| 385 | char r_pwd[64];
|
---|
| 386 | int r_crypted;
|
---|
| 387 | int l_port;
|
---|
| 388 | int log_port;
|
---|
| 389 | CAIDTAB ctab;
|
---|
[83] | 390 | ulong boxid;
|
---|
[1083] | 391 | uchar nagra_boxkey[16]; //n3 boxkey 8byte or tiger idea key 16byte
|
---|
[1196] | 392 | int has_rsa;
|
---|
[89] | 393 | uchar aes_key[16];
|
---|
[1074] | 394 | uchar rsa_mod[120]; //rsa modulus for nagra cards.
|
---|
[8] | 395 | ulong sidtabok; // positiv services
|
---|
| 396 | ulong sidtabno; // negative services
|
---|
| 397 | uchar hexserial[8];
|
---|
| 398 | int nprov;
|
---|
| 399 | uchar prid[CS_MAXPROV][8];
|
---|
[648] | 400 | uchar availkeys[CS_MAXPROV][16]; // viaccess; misused in seca, if availkeys[PROV][0]=0 then expired, 1 then valid.
|
---|
| 401 | uchar sa[CS_MAXPROV][4]; // viaccess & seca
|
---|
| 402 | ushort acs; // irdeto
|
---|
[8] | 403 | ushort caid[16];
|
---|
| 404 | uchar b_nano[256];
|
---|
[452] | 405 | uchar emmfile[128];
|
---|
[38] | 406 | char pincode[5];
|
---|
[8] | 407 | int logemm;
|
---|
| 408 | int cachemm;
|
---|
| 409 | int rewritemm;
|
---|
| 410 | int online;
|
---|
[1220] | 411 | int card_status; //highlevel status
|
---|
| 412 | unsigned short status; //lowlevel status: states whether card inserted and/or change of status FIXME look at integration with pcsc_has_card/detect/card_status
|
---|
[1252] | 413 | unsigned long baudrate; //we are storing the (for overclocking uncorrected) baudrate to prevent unnecessary conversions from/to termios structure
|
---|
[8] | 414 | struct s_module ph;
|
---|
| 415 | uchar ncd_key[16];
|
---|
| 416 | uchar ncd_skey[16];
|
---|
| 417 | int ncd_disable_server_filt;
|
---|
| 418 | ushort ncd_msgid;
|
---|
| 419 | int ncd_proto;
|
---|
[648] | 420 | char cc_version[7]; // cccam version
|
---|
| 421 | char cc_build[5]; // cccam build number
|
---|
[853] | 422 | int cc_maxhop; // cccam max distance
|
---|
[648] | 423 | void *cc; // ptr to cccam internal data struct
|
---|
[8] | 424 | uchar tcp_connected;
|
---|
| 425 | int tcp_ito; // inactivity timeout
|
---|
| 426 | int tcp_rto; // reconnect timeout
|
---|
| 427 | time_t last_g; // get (if last_s-last_g>tcp_rto - reconnect )
|
---|
| 428 | time_t last_s; // send
|
---|
| 429 | uchar show_cls; // number of classes subscription showed on kill -31
|
---|
| 430 | int maxqlen; // max queue length
|
---|
| 431 | int qlen; // current queue length
|
---|
| 432 | FTAB fchid;
|
---|
| 433 | FTAB ftab;
|
---|
| 434 | CLASSTAB cltab;
|
---|
| 435 | uchar gbox_pwd[4];
|
---|
| 436 | uchar gbox_timecode[7];
|
---|
| 437 | int gbox_online;
|
---|
| 438 | uchar gbox_vers;
|
---|
| 439 | uchar gbox_prem;
|
---|
| 440 | int gbox_fd;
|
---|
[648] | 441 | struct timeb gbox_lasthello; // incoming time stamp
|
---|
[8] | 442 | #ifdef CS_RDR_INIT_HIST
|
---|
[505] | 443 | uchar init_history[4096];
|
---|
[8] | 444 | int init_history_pos;
|
---|
| 445 | #endif
|
---|
[648] | 446 | int msg_idx;
|
---|
[776] | 447 | #ifdef HAVE_PCSC
|
---|
| 448 | SCARDCONTEXT hContext;
|
---|
| 449 | SCARDHANDLE hCard;
|
---|
| 450 | DWORD dwActiveProtocol;
|
---|
| 451 | #endif
|
---|
| 452 |
|
---|
[8] | 453 | };
|
---|
| 454 |
|
---|
| 455 | #ifdef CS_ANTICASC
|
---|
| 456 |
|
---|
| 457 | struct s_acasc_shm {
|
---|
[954] | 458 | ushort ac_count : 15;
|
---|
| 459 | ushort ac_deny : 1;
|
---|
[8] | 460 | };
|
---|
| 461 |
|
---|
| 462 | struct s_acasc {
|
---|
| 463 | ushort stat[10];
|
---|
| 464 | uchar idx; // current active index in stat[]
|
---|
| 465 | };
|
---|
| 466 |
|
---|
| 467 | struct s_cpmap
|
---|
| 468 | {
|
---|
| 469 | ushort caid;
|
---|
| 470 | ulong provid;
|
---|
| 471 | ushort sid;
|
---|
| 472 | ushort chid;
|
---|
| 473 | ushort dwtime;
|
---|
| 474 | struct s_cpmap *next;
|
---|
| 475 | };
|
---|
| 476 | #endif
|
---|
| 477 |
|
---|
| 478 | struct s_auth
|
---|
| 479 | {
|
---|
| 480 | char usr[33];
|
---|
| 481 | char pwd[33];
|
---|
| 482 | int uniq;
|
---|
| 483 | int au;
|
---|
[504] | 484 | int autoau;
|
---|
[8] | 485 | int monlvl;
|
---|
| 486 | ulong grp;
|
---|
| 487 | int tosleep;
|
---|
| 488 | CAIDTAB ctab;
|
---|
[648] | 489 | ulong sidtabok; // positiv services
|
---|
| 490 | ulong sidtabno; // negative services
|
---|
[8] | 491 | FTAB fchid;
|
---|
| 492 | FTAB ftab; // user [caid] and ident filter
|
---|
| 493 | CLASSTAB cltab;
|
---|
[41] | 494 | TUNTAB ttab;
|
---|
[8] | 495 | #ifdef CS_ANTICASC
|
---|
| 496 | int ac_idx;
|
---|
| 497 | int ac_users; // 0 - unlimited
|
---|
| 498 | uchar ac_penalty; // 0 - log, >0 - fake dw
|
---|
| 499 | #endif
|
---|
| 500 | in_addr_t dynip;
|
---|
| 501 | uchar dyndns[64];
|
---|
[977] | 502 | time_t expirationdate;
|
---|
[8] | 503 | struct s_auth *next;
|
---|
| 504 | };
|
---|
| 505 |
|
---|
| 506 | struct s_srvid
|
---|
| 507 | {
|
---|
[1237] | 508 | int srvid;
|
---|
| 509 | int ncaid;
|
---|
| 510 | int caid[10];
|
---|
| 511 | char prov[33];
|
---|
| 512 | char name[33];
|
---|
| 513 | char type[33];
|
---|
| 514 | char desc[33];
|
---|
| 515 | struct s_srvid *next;
|
---|
[8] | 516 | };
|
---|
| 517 |
|
---|
| 518 | struct s_ip
|
---|
| 519 | {
|
---|
| 520 | in_addr_t ip[2];
|
---|
| 521 | struct s_ip *next;
|
---|
| 522 | };
|
---|
| 523 |
|
---|
| 524 | struct s_config
|
---|
| 525 | {
|
---|
| 526 | int nice;
|
---|
| 527 | ulong netprio;
|
---|
[93] | 528 | ulong ctimeout;
|
---|
| 529 | ulong ftimeout;
|
---|
[1137] | 530 | ulong cmaxidle;
|
---|
[648] | 531 | int ulparent;
|
---|
[8] | 532 | ulong delay;
|
---|
| 533 | int bindwait;
|
---|
| 534 | int resolvedelay;
|
---|
| 535 | int tosleep;
|
---|
| 536 | in_addr_t srvip;
|
---|
| 537 | char pidfile[128];
|
---|
| 538 | char usrfile[128];
|
---|
[118] | 539 | char cwlogdir[128];
|
---|
[8] | 540 | struct s_auth *account;
|
---|
| 541 | struct s_srvid *srvid;
|
---|
| 542 | struct s_sidtab *sidtab;
|
---|
| 543 | int mon_port;
|
---|
| 544 | in_addr_t mon_srvip;
|
---|
| 545 | struct s_ip *mon_allowed;
|
---|
| 546 | int mon_aulow;
|
---|
| 547 | int mon_hideclient_to;
|
---|
| 548 | int mon_level;
|
---|
| 549 | int c33_port;
|
---|
| 550 | in_addr_t c33_srvip;
|
---|
| 551 | uchar c33_key[16];
|
---|
| 552 | int c33_crypted;
|
---|
| 553 | int c33_passive;
|
---|
| 554 | struct s_ip *c33_plain;
|
---|
| 555 | int c35_port;
|
---|
| 556 | in_addr_t c35_srvip;
|
---|
| 557 | PTAB c35_tcp_ptab;
|
---|
| 558 | in_addr_t c35_tcp_srvip;
|
---|
| 559 | PTAB ncd_ptab;
|
---|
| 560 | in_addr_t ncd_srvip;
|
---|
| 561 | uchar ncd_key[16];
|
---|
[648] | 562 | PTAB cc_ptab;
|
---|
[8] | 563 | int rad_port;
|
---|
| 564 | in_addr_t rad_srvip;
|
---|
| 565 | struct s_ip *rad_allowed;
|
---|
| 566 | char rad_usr[32];
|
---|
| 567 | char ser_device[512];
|
---|
[1137] | 568 | ulong srtimeout; // SerialReaderTimeount in millisec
|
---|
[8] | 569 | int max_log_size;
|
---|
| 570 | int show_ecm_dw;
|
---|
[94] | 571 | int waitforcards;
|
---|
[95] | 572 | int preferlocalcards;
|
---|
[1148] | 573 | #ifdef CS_WITH_GBOX
|
---|
| 574 | uchar gbox_pwd[8];
|
---|
| 575 | uchar ignorefile[512];
|
---|
| 576 | uchar cardfile[512];
|
---|
| 577 | uchar gbxShareOnl[512];
|
---|
| 578 | int maxdist;
|
---|
| 579 | int num_locals;
|
---|
[8] | 580 | unsigned long locals[CS_MAXLOCALS];
|
---|
[1148] | 581 | #endif
|
---|
[8] | 582 | //struct s_irdeto_quess *itab[0xff];
|
---|
[1115] | 583 | #ifdef HAVE_DVBAPI
|
---|
[1000] | 584 | int dvbapi_enabled;
|
---|
| 585 | int dvbapi_au;
|
---|
[1181] | 586 | char dvbapi_usr[33];
|
---|
[1080] | 587 | char dvbapi_boxtype[20];
|
---|
[1181] | 588 | char dvbapi_priority[64];
|
---|
| 589 | char dvbapi_ignore[64];
|
---|
[1013] | 590 | #endif
|
---|
[8] | 591 | #ifdef CS_ANTICASC
|
---|
| 592 | char ac_enabled;
|
---|
| 593 | int ac_users; // num of users for account (0 - default)
|
---|
| 594 | int ac_stime; // time to collect AC statistics (3 min - default)
|
---|
| 595 | int ac_samples; // qty of samples
|
---|
| 596 | int ac_penalty; // 0 - write to log
|
---|
| 597 | int ac_fakedelay; // 100-1000 ms
|
---|
| 598 | int ac_denysamples;
|
---|
| 599 | char ac_logfile[128];
|
---|
| 600 | struct s_cpmap *cpmap;
|
---|
| 601 | #endif
|
---|
| 602 | // struct s_reader reader[];
|
---|
| 603 | };
|
---|
| 604 |
|
---|
| 605 | typedef struct ecm_request_t
|
---|
| 606 | {
|
---|
| 607 |
|
---|
| 608 | uchar ecm[256];
|
---|
| 609 | uchar cw[16];
|
---|
| 610 | uchar ecmd5[CS_ECMSTORESIZE];
|
---|
| 611 | // uchar l;
|
---|
| 612 | short l;
|
---|
| 613 | ushort caid;
|
---|
| 614 | ushort ocaid;
|
---|
| 615 | ushort srvid;
|
---|
| 616 | ushort chid;
|
---|
| 617 | ushort pid;
|
---|
| 618 | ushort idx;
|
---|
| 619 | ulong prid;
|
---|
| 620 | int reader[CS_MAXREADER];
|
---|
[648] | 621 | int cidx; // client index
|
---|
| 622 | int cpti; // client pending table index
|
---|
| 623 | int stage; // processing stage in server module
|
---|
| 624 | int level; // send-level in client module
|
---|
[8] | 625 | int rc;
|
---|
| 626 | uchar rcEx;
|
---|
[648] | 627 | struct timeb tps; // incoming time stamp
|
---|
[95] | 628 | uchar locals_done;
|
---|
[648] | 629 | ushort gbxCWFrom;
|
---|
| 630 | ushort gbxFrom;
|
---|
| 631 | ushort gbxTo;
|
---|
[8] | 632 |
|
---|
[648] | 633 | uchar gbxForward[16];
|
---|
| 634 | int gbxRidx;
|
---|
[8] | 635 | } GCC_PACK ECM_REQUEST;
|
---|
| 636 |
|
---|
| 637 | typedef struct emm_packet_t
|
---|
| 638 | {
|
---|
| 639 | uchar emm[258];
|
---|
| 640 | uchar l;
|
---|
| 641 | uchar caid[2];
|
---|
| 642 | uchar provid[4];
|
---|
| 643 | uchar hexserial[8];
|
---|
| 644 | uchar type;
|
---|
| 645 | int cidx;
|
---|
| 646 | } GCC_PACK EMM_PACKET;
|
---|
| 647 |
|
---|
[21] | 648 | // oscam-simples
|
---|
[8] | 649 | extern char *remote_txt(void);
|
---|
| 650 | extern char *trim(char *);
|
---|
| 651 | extern char *strtolower(char *);
|
---|
| 652 | extern int gethexval(char);
|
---|
| 653 | extern int cs_atob(uchar *, char *, int);
|
---|
| 654 | extern ulong cs_atoi(char *, int, int);
|
---|
| 655 | extern int byte_atob(char *);
|
---|
| 656 | extern long word_atob(char *);
|
---|
| 657 | extern int key_atob(char *, uchar *);
|
---|
[1084] | 658 | extern int key_atob14(char *, uchar *);
|
---|
| 659 | extern int key_atob_l(char *, uchar *, int);
|
---|
[8] | 660 | extern char *key_btoa(char *, uchar *);
|
---|
| 661 | extern char *cs_hexdump(int, uchar *, int);
|
---|
| 662 | extern in_addr_t cs_inet_order(in_addr_t);
|
---|
| 663 | extern char *cs_inet_ntoa(in_addr_t);
|
---|
| 664 | extern in_addr_t cs_inet_addr(char *txt);
|
---|
| 665 | extern ulong b2i(int, uchar *);
|
---|
| 666 | extern ullong b2ll(int, uchar *);
|
---|
| 667 | extern uchar *i2b(int, ulong);
|
---|
| 668 | extern ulong a2i(char *, int);
|
---|
| 669 | extern int boundary(int, int);
|
---|
| 670 | extern void cs_ftime(struct timeb *);
|
---|
| 671 | extern void cs_sleepms(int);
|
---|
| 672 | extern int bytes_available(int);
|
---|
| 673 | extern void cs_setpriority(int);
|
---|
| 674 | extern struct s_auth *find_user(char *);
|
---|
| 675 |
|
---|
[21] | 676 | // oscam variables
|
---|
[8] | 677 | extern int pfd, rfd, fd_c2m, fd_m2c, cs_idx, *c_start, cs_ptyp, cs_dblevel, cs_hw;
|
---|
| 678 | extern int *logidx, *loghistidx, *log_fd;
|
---|
| 679 | extern int is_server, *mcl;
|
---|
| 680 | extern uchar mbuf[1024];
|
---|
| 681 | extern ushort len4caid[256];
|
---|
| 682 | extern pid_t master_pid;
|
---|
| 683 | extern struct s_ecm *ecmcache;
|
---|
| 684 | extern struct s_client *client;
|
---|
| 685 | extern struct s_reader *reader;
|
---|
| 686 |
|
---|
| 687 | extern struct card_struct *Cards;
|
---|
| 688 | extern struct idstore_struct *idstore;
|
---|
| 689 | extern unsigned long *IgnoreList;
|
---|
| 690 |
|
---|
| 691 | extern struct s_config *cfg;
|
---|
| 692 | extern char cs_confdir[], *loghist;
|
---|
| 693 | extern EMM_PACKET epg;
|
---|
| 694 | extern struct s_module ph[CS_MAX_MOD];
|
---|
| 695 | extern ECM_REQUEST *ecmtask;
|
---|
| 696 | extern char logfile[256];
|
---|
| 697 | #ifdef CS_ANTICASC
|
---|
| 698 | extern struct s_acasc_shm *acasc;
|
---|
| 699 | extern FILE *fpa;
|
---|
| 700 | extern int use_ac_log;
|
---|
| 701 | #endif
|
---|
| 702 |
|
---|
| 703 |
|
---|
[21] | 704 | // oscam
|
---|
[8] | 705 | extern char *cs_platform(char *);
|
---|
[1125] | 706 | extern int recv_from_udpipe(uchar *);
|
---|
[8] | 707 | extern char* username(int);
|
---|
| 708 | extern int idx_from_pid(pid_t);
|
---|
[803] | 709 | extern int idx_from_username(char *uname);
|
---|
[8] | 710 | extern int chk_bcaid(ECM_REQUEST *, CAIDTAB *);
|
---|
| 711 | extern void cs_exit(int sig);
|
---|
| 712 | extern int cs_fork(in_addr_t, in_port_t);
|
---|
| 713 | extern void wait4master(void);
|
---|
| 714 | extern int cs_auth_client(struct s_auth *, char*);
|
---|
| 715 | extern void cs_disconnect_client(void);
|
---|
| 716 | extern int check_ecmcache(ECM_REQUEST *, ulong);
|
---|
[1084] | 717 | extern void store_logentry(char *);
|
---|
[8] | 718 | extern int write_to_pipe(int, int, uchar *, int);
|
---|
| 719 | extern int read_from_pipe(int, uchar **, int);
|
---|
| 720 | extern int write_ecm_request(int, ECM_REQUEST *);
|
---|
| 721 | extern int write_ecm_answer(int, ECM_REQUEST *);
|
---|
| 722 | extern void log_emm_request(int);
|
---|
| 723 | extern ulong chk_provid(uchar *, ushort);
|
---|
| 724 | extern void guess_cardsystem(ECM_REQUEST *);
|
---|
| 725 | extern void guess_irdeto(ECM_REQUEST *);
|
---|
| 726 | extern void get_cw(ECM_REQUEST *);
|
---|
| 727 | extern void do_emm(EMM_PACKET *);
|
---|
| 728 | extern ECM_REQUEST *get_ecmtask(void);
|
---|
[95] | 729 | extern void request_cw(ECM_REQUEST *, int, int);
|
---|
[8] | 730 | extern int send_dcw(ECM_REQUEST *);
|
---|
| 731 | extern int process_input(uchar *, int, int);
|
---|
| 732 | extern int chk_srvid(ECM_REQUEST *, int);
|
---|
| 733 | extern int chk_sfilter(ECM_REQUEST *, PTAB*);
|
---|
| 734 | extern int chk_ufilters(ECM_REQUEST *);
|
---|
| 735 | extern int chk_rfilter(ECM_REQUEST *, struct s_reader *);
|
---|
| 736 | extern int chk_rsfilter(ECM_REQUEST *, int);
|
---|
| 737 | extern int chk_avail_reader(ECM_REQUEST *, struct s_reader *);
|
---|
[954] | 738 | extern int matching_reader(ECM_REQUEST *, struct s_reader *);
|
---|
[8] | 739 | extern void set_signal_handler(int , int , void (*)(int));
|
---|
| 740 | extern void cs_log_config(void);
|
---|
[954] | 741 | extern void cs_resolve(void);
|
---|
[1000] | 742 | extern void chk_dcw(int fd);
|
---|
[8] | 743 |
|
---|
| 744 | #ifdef CS_ANTICASC
|
---|
| 745 | //extern void start_anticascader(void);
|
---|
| 746 | extern void init_ac(void);
|
---|
[954] | 747 | extern void ac_init_stat();
|
---|
[8] | 748 | extern int ac_init_log(char*);
|
---|
| 749 | extern void ac_do_stat(void);
|
---|
| 750 | extern void ac_init_client(struct s_auth *);
|
---|
| 751 | extern void ac_chk(ECM_REQUEST*, int);
|
---|
| 752 | #endif
|
---|
| 753 |
|
---|
[21] | 754 | // oscam-nano
|
---|
[8] | 755 | extern int chk_class(ECM_REQUEST *, CLASSTAB*, const char*, const char*);
|
---|
| 756 |
|
---|
[21] | 757 | // oscam-config
|
---|
[8] | 758 | extern int init_config(void);
|
---|
| 759 | extern int init_userdb(void);
|
---|
| 760 | extern int init_readerdb(void);
|
---|
| 761 | extern int init_sidtab(void);
|
---|
| 762 | extern int init_srvid(void);
|
---|
[1125] | 763 | extern int search_boxkey(ushort, char *);
|
---|
[8] | 764 | extern void init_len4caid(void);
|
---|
| 765 | extern int init_irdeto_guess_tab(void);
|
---|
| 766 |
|
---|
[21] | 767 | // oscam-reader
|
---|
[8] | 768 | extern int ridx, logfd;
|
---|
[1084] | 769 | extern int reader_cmd2api(uchar *, int);
|
---|
| 770 | extern int reader_cmd2icc(uchar *, int);
|
---|
| 771 | extern int card_write(uchar *, uchar *);
|
---|
[8] | 772 | extern void cs_ri_brk(int);
|
---|
| 773 | extern void cs_ri_log(char *,...);
|
---|
| 774 | extern void start_cardreader(void);
|
---|
| 775 | extern void reader_card_info(void);
|
---|
[1125] | 776 | extern int network_tcp_connection_open();
|
---|
[648] | 777 | extern void network_tcp_connection_close(int);
|
---|
[8] | 778 |
|
---|
[21] | 779 | // oscam-log
|
---|
[8] | 780 | extern int cs_init_log(char *);
|
---|
[954] | 781 | extern void cs_write_log(char *);
|
---|
[8] | 782 | extern void cs_log(char *,...);
|
---|
| 783 | extern void cs_debug(char *,...);
|
---|
| 784 | extern void cs_ddump(uchar *, int, char *, ...);
|
---|
| 785 | extern void cs_close_log(void);
|
---|
| 786 | extern int cs_init_statistics(char *);
|
---|
| 787 | extern void cs_statistics(int);
|
---|
| 788 | extern void cs_dump(uchar *, int, char *, ...);
|
---|
| 789 |
|
---|
[21] | 790 | // oscam-aes
|
---|
[8] | 791 | extern void aes_set_key(char *);
|
---|
| 792 | extern void aes_encrypt_idx(int, uchar *, int);
|
---|
| 793 | extern void aes_decrypt(uchar *, int);
|
---|
| 794 | #define aes_encrypt(b, n) aes_encrypt_idx(cs_idx, b, n)
|
---|
| 795 |
|
---|
| 796 | // reader-common
|
---|
[1125] | 797 | extern int reader_device_init(char *);
|
---|
[8] | 798 | extern int reader_checkhealth(void);
|
---|
[954] | 799 | extern void reader_post_process(void);
|
---|
[8] | 800 | extern int reader_ecm(ECM_REQUEST *);
|
---|
| 801 | extern int reader_emm(EMM_PACKET *);
|
---|
| 802 |
|
---|
[809] | 803 | #ifdef HAVE_PCSC
|
---|
| 804 | // reader-pcsc
|
---|
[1137] | 805 | extern int pcsc_reader_do_api(struct s_reader *pcsc_reader, uchar *buf, uchar *cta_res, ushort *cta_lr,int l);
|
---|
[809] | 806 | extern int pcsc_activate_card(struct s_reader *pcsc_reader, uchar *atr, ushort *atr_size);
|
---|
| 807 | extern int pcsc_check_card_inserted(struct s_reader *pcsc_reader);
|
---|
| 808 | extern int pcsc_reader_init(struct s_reader *pcsc_reader, char *device);
|
---|
| 809 | #endif
|
---|
| 810 |
|
---|
[8] | 811 | // reader-irdeto
|
---|
[1125] | 812 | extern int irdeto_card_init(uchar *);
|
---|
[8] | 813 | extern int irdeto_do_ecm(ECM_REQUEST *);
|
---|
| 814 | extern int irdeto_do_emm(EMM_PACKET *);
|
---|
| 815 | extern int irdeto_card_info(void);
|
---|
| 816 |
|
---|
| 817 | // reader-viaccess
|
---|
[1125] | 818 | extern int viaccess_card_init(uchar *);
|
---|
[8] | 819 | extern int viaccess_do_ecm(ECM_REQUEST *);
|
---|
| 820 | extern int viaccess_do_emm(EMM_PACKET *);
|
---|
| 821 | extern int viaccess_card_info(void);
|
---|
| 822 |
|
---|
[14] | 823 | // reader-videoguard
|
---|
| 824 | extern int videoguard_card_init(uchar *, int);
|
---|
| 825 | extern int videoguard_do_ecm(ECM_REQUEST *);
|
---|
| 826 | extern int videoguard_do_emm(EMM_PACKET *);
|
---|
| 827 | extern int videoguard_card_info(void);
|
---|
| 828 |
|
---|
[8] | 829 | // reader-cryptoworks
|
---|
[1125] | 830 | extern int cryptoworks_card_init(uchar *);
|
---|
[8] | 831 | extern int cryptoworks_do_ecm(ECM_REQUEST *);
|
---|
| 832 | extern int cryptoworks_do_emm(EMM_PACKET *);
|
---|
| 833 | extern int cryptoworks_card_info(void);
|
---|
[1084] | 834 | extern int CheckSctLen(const uchar *, int);
|
---|
[8] | 835 |
|
---|
| 836 | // reader-seca
|
---|
[1125] | 837 | extern int seca_card_init(uchar *);
|
---|
[8] | 838 | extern int seca_do_ecm(ECM_REQUEST *);
|
---|
| 839 | extern int seca_do_emm(EMM_PACKET *);
|
---|
| 840 | extern int seca_card_info(void);
|
---|
| 841 |
|
---|
[453] | 842 | // reader-nds
|
---|
| 843 | extern int nds_card_init(uchar *, int);
|
---|
| 844 | extern int nds_do_ecm(ECM_REQUEST *);
|
---|
| 845 | extern int nds_do_emm(EMM_PACKET *);
|
---|
| 846 | extern int nds_card_info(void);
|
---|
[597] | 847 |
|
---|
| 848 | // reader nagra2/3
|
---|
[1125] | 849 | extern int nagra2_card_init(uchar *);
|
---|
[597] | 850 | extern int nagra2_do_ecm(ECM_REQUEST *er);
|
---|
| 851 | extern int nagra2_card_info(void);
|
---|
[717] | 852 | extern int nagra2_do_emm(EMM_PACKET *);
|
---|
[800] | 853 | extern void nagra2_post_process();
|
---|
[453] | 854 |
|
---|
[1084] | 855 | // reader-conax
|
---|
[1125] | 856 | extern int conax_card_init(uchar *);
|
---|
[1084] | 857 | extern int conax_do_ecm(ECM_REQUEST *);
|
---|
| 858 | extern int conax_do_emm(EMM_PACKET *);
|
---|
| 859 | extern int conax_card_info(void);
|
---|
| 860 |
|
---|
| 861 | // reader-dre
|
---|
[1125] | 862 | extern int dre_card_init(uchar *);
|
---|
[1084] | 863 | extern int dre_do_ecm(ECM_REQUEST *);
|
---|
| 864 | extern int dre_do_emm(EMM_PACKET *);
|
---|
| 865 | extern int dre_card_info(void);
|
---|
| 866 |
|
---|
[8] | 867 | // protocol modules
|
---|
| 868 | extern int monitor_send_idx(int, char *);
|
---|
| 869 | extern void module_monitor(struct s_module *);
|
---|
| 870 | extern void module_camd35(struct s_module *);
|
---|
| 871 | extern void module_camd35_tcp(struct s_module *);
|
---|
| 872 | extern void module_camd33(struct s_module *);
|
---|
| 873 | extern void module_newcamd(struct s_module *);
|
---|
| 874 | extern void module_radegast(struct s_module *);
|
---|
[21] | 875 | extern void module_oscam_ser(struct s_module *);
|
---|
[8] | 876 | extern void module_gbox(struct s_module *);
|
---|
[648] | 877 | extern void module_cccam(struct s_module *);
|
---|
[1115] | 878 | #ifdef HAVE_DVBAPI
|
---|
[1000] | 879 | extern void module_dvbapi(struct s_module *);
|
---|
[1013] | 880 | #endif
|
---|
[8] | 881 | extern struct timeval *chk_pending(struct timeb tp_ctimeout);
|
---|
[648] | 882 | #endif // CS_GLOBALS
|
---|