Changeset 1020


Ignore:
Timestamp:
01/01/10 13:51:05 (13 years ago)
Author:
alno
Message:

Merging revisions 994-1017 of trunk (dvbapi included)

Location:
branches/monitor-improvement
Files:
15 edited
1 copied

Legend:

Unmodified
Added
Removed
  • branches/monitor-improvement/CMakeLists.txt

    r959 r1020  
    247247
    248248# some optimisations
    249 add_definitions ("-O3 -Winline -Wall -Wno-implicit-function-declaration -Wno-parentheses -finline-functions -fomit-frame-pointer")
     249if (OSCamOperatingSystem MATCHES "Mac OS X")
     250add_definitions ("-O2 -Winline -Wall -Wno-implicit-function-declaration -Wno-parentheses -finline-functions -fomit-frame-pointer -m32")
     251else (OSCamOperatingSystem MATCHES "Mac OS X")
     252add_definitions ("-O2 -Winline -Wall -Wno-implicit-function-declaration -Wno-parentheses -finline-functions -fomit-frame-pointer")
     253endif (OSCamOperatingSystem MATCHES "Mac OS X")
    250254
    251255# we don't want the '-rdynamic' in the link command
     
    253257
    254258# we want to strip
     259if (OSCamOperatingSystem MATCHES "Mac OS X")
     260set (CMAKE_EXE_LINKER_FLAGS "-s -m32")
     261else (OSCamOperatingSystem MATCHES "Mac OS X")
    255262set (CMAKE_EXE_LINKER_FLAGS "-s")
    256 
     263endif (OSCamOperatingSystem MATCHES "Mac OS X")
    257264#----------------------- installation -----------------------------
    258265
  • branches/monitor-improvement/Distribution/doc/example/oscam.conf

    r206 r1020  
    4545[serial]
    4646device        = user2@/dev/ttyS0?delay=1&timeout=300
     47
     48[dvbapi]
     49enabled       = 1
     50user          = user1
     51demux         = /dev/dvb/adapter0/demux0
     52ca            = /dev/dvb/adapter0/ca1
     53socket        = /tmp/camd.socket
  • branches/monitor-improvement/Distribution/doc/man/oscam.1

    r885 r1020  
    3535\(bu
    3636CCcam with AU support, cascading/remote server ECM support
     37.TP 3n
     38\(bu
     39DVB API support, localhost only
    3740.TP 3n
    3841OSCam works on the following plattforms:
  • branches/monitor-improvement/Distribution/doc/man/oscam.conf.5

    r885 r1020  
    330330 example: locals = 01001234,02005678
    331331.RE
     332.SS "The [dvbapi] section"
     333.PP
     334\fBenabled\fP = \fB0\fP|\fB1\fP
     335.RS 3n
     3361 = DVB API enabled, default:0
     337.RE
     338.PP
     339\fBuser\fP = \fBusername\fP
     340.RS 3n
     341user name for DVB API client, default:anonymous
     342.RE
     343.PP
     344\fBdemux\fP = \fBdevice\fP
     345.RS 3n
     346path to demux device, default:none
     347
     348 example: demux = /dev/dvb/adapter0/demux0
     349.RE
     350.PP
     351\fBca\fP = \fBdevice\fP
     352.RS 3n
     353path to CA device, default:none
     354
     355 example: ca = /dev/dvb/adapter0/ca0
     356.RE
     357.PP
     358\fBsocket\fP = \fBfilename\fP
     359.RS 3n
     360camd socket file, default:none
     361
     362 example: socket = /tmp/camd.socket
     363.RE
    332364.SS "The [anticasc] section"
    333365.PP
    334366\fBenabled\fP = \fB0\fP|\fB1\fP
    335367.RS 3n
    336 1=enabled anti-cascading, default:0
     3681 = enabled anti-cascading, default:0
    337369.RE
    338370.PP
  • branches/monitor-improvement/Distribution/doc/txt/oscam.conf.txt

    r885 r1020  
    239239       example: locals = 01001234,02005678
    240240
     241   The [dvbapi] section
     242       enabled = 0|1
     243      1 = DVB API enabled, default:0
     244
     245       user = username
     246      user name for DVB API client, default:anonymous
     247
     248       demux = device
     249      path to demux device, default:none
     250
     251       example: demux = /dev/dvb/adapter0/demux0
     252
     253       ca = device
     254      path to CA device, default:none
     255
     256       example: ca = /dev/dvb/adapter0/ca0
     257
     258       socket = filename
     259      camd socket file, default:none
     260
     261       example: socket = /tmp/camd.socket
     262
    241263   The [anticasc] section
    242264       enabled = 0|1
    243       1=enabled anti-cascading, default:0
     265      1 = enabled anti-cascading, default:0
    244266
    245267       numusers = quantity
  • branches/monitor-improvement/Distribution/doc/txt/oscam.txt

    r885 r1020  
    3232
    3333     CCcam with AU support, cascading/remote server ECM support
     34
     35     DVB API support, localhost only
    3436
    3537       OSCam works on the following plattforms:
  • branches/monitor-improvement/Maketype

    r928 r1020  
    5050          $(LIBFILE1)(module-newcamd.o) \
    5151          $(LIBFILE1)(module-cccam.o) \
     52          $(LIBFILE1)(module-dvbapi.o) \
    5253          $(LIBFILE1)(oscam-nano.o) \
    5354          $(LIBFILE1)(oscam-chk.o) \
  • branches/monitor-improvement/README

    r107 r1020  
    2222    svn co http://streamboard.gmc.to/svn/oscam/trunk oscam
    2323    cd oscam
     24
     25Compile options
     26---------------
     27
     28Enable features:
     29
     30CS_ANTICASC   - enable anti-cascading
     31CS_LOGHISTORY - enable log history
     32HAVE_DVBAPI_3 - enable DVB API 3 support
     33
    2434
    2535Build with CMake (new solution for building)
  • branches/monitor-improvement/cscrypt/CMakeLists.txt

    r811 r1020  
    1414endif (NOT HAVE_SHA)
    1515
    16 add_definitions ("-O3 -Winline -Werror -finline-functions -fomit-frame-pointer -s")
     16if (${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
     17add_definitions ("-O2 -Winline -Werror -finline-functions -fomit-frame-pointer -s -m32")
     18else (${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
     19add_definitions ("-O2 -Winline -Werror -finline-functions -fomit-frame-pointer -s")
     20endif (${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
    1721
    1822set (lib_name "cscrypt")
  • branches/monitor-improvement/csctapi/CMakeLists.txt

    r122 r1020  
    44file (GLOB csctapi_hdrs "*.h")
    55
    6 add_definitions ("-O3 -Winline -Werror -finline-functions -fomit-frame-pointer -s")
     6if (${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
     7add_definitions ("-O2 -Winline -Werror -finline-functions -fomit-frame-pointer -s -m32")
     8else (${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
     9add_definitions ("-O2 -Winline -Werror -finline-functions -fomit-frame-pointer -s")
     10endif (${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
    711
    812set (lib_name "csctapi")
  • branches/monitor-improvement/globals.h

    r1019 r1020  
    144144#endif
    145145
    146 #define CS_MAX_MOD 8
     146#define CS_MAX_MOD 12
    147147#define MOD_CONN_TCP    1
    148148#define MOD_CONN_UDP    2
     
    573573  unsigned long locals[CS_MAXLOCALS];
    574574  //struct s_irdeto_quess *itab[0xff];
     575#ifdef HAVE_DVBAPI_3
     576  int       dvbapi_enabled;
     577  int       dvbapi_au;
     578  char      dvbapi_usr[64];
     579  char      dvbapi_demux[128];
     580  char      dvbapi_ca[128];
     581  char      dvbapi_socket[128];
     582#endif
    575583#ifdef CS_ANTICASC
    576584  char      ac_enabled;
     
    730738extern void cs_reinit_clients(void);
    731739extern void cs_resolve(void);
     740extern void chk_dcw(int fd);
    732741
    733742#ifdef CS_ANTICASC
     
    870879extern void module_gbox(struct s_module *);
    871880extern void module_cccam(struct s_module *);
     881#ifdef HAVE_DVBAPI_3
     882extern void module_dvbapi(struct s_module *);
     883#endif
    872884extern struct timeval *chk_pending(struct timeb tp_ctimeout);
    873885
  • branches/monitor-improvement/oscam-config.c

    r1019 r1020  
    3030  TAG_CS378X,    // camd 3.5x TCP
    3131  TAG_GBOX, // gbox
    32   TAG_CCCAM  // cccam
     32  TAG_CCCAM,  // cccam
     33  TAG_DVBAPI
    3334#ifdef CS_ANTICASC
    3435  ,TAG_ANTICASC // anti-cascading
     
    3738
    3839static char *cctag[]={"global", "monitor", "camd33", "camd35",
    39                       "newcamd", "radegast", "serial", "cs357x", "cs378x", "gbox", "cccam",
     40                      "newcamd", "radegast", "serial", "cs357x", "cs378x", "gbox", "cccam", "dvbapi",
    4041#ifdef CS_ANTICASC
    4142                      "anticasc",
     
    538539}
    539540
     541static void chk_t_dvbapi(char *token, char *value)
     542{
     543#ifndef HAVE_DVBAPI_3
     544    fprintf(stderr, "Warning: OSCam compiled without DVB API support.\n");
     545#else
     546    if (!strcmp(token, "enabled"))  { cfg->dvbapi_enabled=atoi(value); return; }
     547    if (!strcmp(token, "au"))   { cfg->dvbapi_au=atoi(value); return; }
     548    if (!strcmp(token, "demux"))    { strncpy(cfg->dvbapi_demux, value, sizeof(cfg->dvbapi_demux)-1); return; }
     549    if (!strcmp(token, "ca"))   { strncpy(cfg->dvbapi_ca, value, sizeof(cfg->dvbapi_ca)-1); return; }
     550    if (!strcmp(token, "socket"))   { strncpy(cfg->dvbapi_socket, value, sizeof(cfg->dvbapi_socket)-1); return; }
     551    if (!strcmp(token, "user"))     { strncpy(cfg->dvbapi_usr, value, sizeof(cfg->dvbapi_usr)-1); return; }
     552   
     553    if (token[0] != '#')
     554        fprintf(stderr, "Warning: keyword '%s' in dvbapi section not recognized\n",token);
     555#endif
     556}
     557
    540558static void chk_token(char *token, char *value, int tag)
    541559{
     
    553571    case TAG_GBOX    : chk_t_gbox(token, value); break;
    554572    case TAG_CCCAM   : chk_t_cccam(token, value); break;
     573    case TAG_DVBAPI  : chk_t_dvbapi(token, value); break;
    555574#ifdef CS_ANTICASC
    556575    case TAG_ANTICASC: chk_t_ac(token, value); break;
  • branches/monitor-improvement/oscam-reader.c

    r800 r1020  
    521521  {
    522522    client[cs_idx].ip=cs_inet_addr("127.0.0.1");
    523     if (reader_device_init(reader[ridx].device, reader[ridx].typ))
    524       cs_exit(1);
     523    while (reader_device_init(reader[ridx].device, reader[ridx].typ)==2)
     524      sleep(60); // wait 60 secs and try again
    525525  }
    526526
  • branches/monitor-improvement/oscam.c

    r980 r1020  
    15941594}
    15951595
    1596 static void chk_dcw(int fd)
     1596void chk_dcw(int fd)
    15971597{
    15981598  ECM_REQUEST *er, *ert;
     
    21792179           module_radegast,
    21802180           module_oscam_ser,
     2181#ifdef HAVE_DVBAPI_3
     2182       module_dvbapi,
     2183#endif
    21812184           0
    21822185  };
  • branches/monitor-improvement/reader-pcsc.c

    r885 r1020  
    8585     DWORD dwSendLength, dwRecvLength;
    8686
    87      dwSendLength = l;
     87
    8888     dwRecvLength = CTA_RES_LEN;
    89      cs_debug("sending %d bytes to PCSC", dwSendLength);
    90 
    91      if(pcsc_reader->dwActiveProtocol == SCARD_PROTOCOL_T0)
    92          rv = SCardTransmit(pcsc_reader->hCard, SCARD_PCI_T0, buf, dwSendLength, &pioRecvPci, cta_res, &dwRecvLength);
    93      else  if(pcsc_reader->dwActiveProtocol == SCARD_PROTOCOL_T1)
    94          rv = SCardTransmit(pcsc_reader->hCard, SCARD_PCI_T1, buf, dwSendLength, &pioRecvPci, cta_res, &dwRecvLength);
    95      else {
    96          cs_debug("PCSC invalid protocol (T=%d)", ( pcsc_reader->dwActiveProtocol == SCARD_PROTOCOL_T0 ? 0 :  1));
    97          return ERR_INVALID;
    98      }
     89
     90    if(pcsc_reader->dwActiveProtocol == SCARD_PROTOCOL_T0) {
     91        //  explanantion as to why we do the test on buf[4] :
     92        // Issuing a command without exchanging data :
     93        //To issue a command to the card that does not involve the exchange of data (either sent or received), the send and receive buffers must be formatted as follows.
     94        //The pbSendBuffer buffer must contain the CLA, INS, P1, and P2 values for the T=0 operation. The P3 value is not sent. (This is to differentiate the header from the case where 256 bytes are expected to be returned.)
     95        //The cbSendLength parameter must be set to four, the size of the T=0 header information (CLA, INS, P1, and P2).
     96        //The pbRecvBuffer will receive the SW1 and SW2 status codes from the operation.
     97        //The pcbRecvLength should be at least two and will be set to two upon return.
     98        if(buf[4])
     99            dwSendLength = l;
     100        else
     101            dwSendLength = l-1;
     102        cs_debug("sending %d bytes to PCSC", dwSendLength);
     103        rv = SCardTransmit(pcsc_reader->hCard, SCARD_PCI_T0, buf, dwSendLength, &pioRecvPci, cta_res, &dwRecvLength);
     104    }
     105    else  if(pcsc_reader->dwActiveProtocol == SCARD_PROTOCOL_T1) {
     106        dwSendLength = l;
     107        cs_debug("sending %d bytes to PCSC", dwSendLength);
     108        rv = SCardTransmit(pcsc_reader->hCard, SCARD_PCI_T1, buf, dwSendLength, &pioRecvPci, cta_res, &dwRecvLength);
     109    }
     110    else {
     111        cs_debug("PCSC invalid protocol (T=%d)", pcsc_reader->dwActiveProtocol);
     112        return ERR_INVALID;
     113    }
    99114
    100115     *cta_lr=dwRecvLength;
Note: See TracChangeset for help on using the changeset viewer.