- fix Building without Nagra not possible at Nagra_Merlin https://trac.streamboard...
[oscam.git] / module-dvbapi.h
blob86eae6954b1c511fea1c2957284405d2ce2e3dc6
1 #ifndef MODULE_DVBAPI_H_
2 #define MODULE_DVBAPI_H_
4 #ifdef HAVE_DVBAPI
5 #include <sys/un.h>
7 #define TYPE_ECM 1
8 #define TYPE_EMM 2
9 #define TYPE_SDT 3
10 #define TYPE_PAT 4
11 #define TYPE_PMT 5
12 #define TYPE_CAT 6
14 // api
15 #define DVBAPI_3 0
16 #define DVBAPI_1 1
17 #define STAPI 2
18 #define COOLAPI 3
20 #ifdef __CYGWIN__
21 #define TMPDIR "./"
22 #define STANDBY_FILE "./.pauseoscam"
23 #define ECMINFO_FILE "./ecm.info"
24 #else
25 #define TMPDIR "/tmp/"
26 #define STANDBY_FILE "/tmp/.pauseoscam"
27 #define ECMINFO_FILE "/tmp/ecm.info"
28 #endif
30 #define BOX_COUNT 7
32 #define BOXTYPE_DREAMBOX 1
33 #define BOXTYPE_DUCKBOX 2
34 #define BOXTYPE_UFS910 3
35 #define BOXTYPE_DBOX2 4
36 #define BOXTYPE_IPBOX 5
37 #define BOXTYPE_IPBOX_PMT 6
38 #define BOXTYPE_DM7000 7
39 #define BOXTYPE_QBOXHD 8
40 #define BOXTYPE_COOLSTREAM 9
41 #define BOXTYPE_NEUMO 10
42 #define BOXTYPE_PC 11
43 #define BOXTYPE_PC_NODMX 12
44 #define BOXTYPE_SAMYGO 13
45 #define BOXTYPES 13
46 #define DMXMD5HASHSIZE 16 // use MD5()
48 // we store the results of remove_streampid_from_list()
49 // and update_streampid_list() in one variable, so make sure
50 // the return values do not collide
52 // remove_streampid_from_list()
53 #define NO_STREAMPID_LISTED 0x00
54 #define REMOVED_STREAMPID_INDEX 0x01
55 #define REMOVED_STREAMPID_LASTINDEX 0x02
56 #define REMOVED_DECODING_STREAMPID_INDEX 0x03
58 // update_streampid_list():
59 #define FOUND_STREAMPID_INDEX 0x10
60 #define ADDED_STREAMPID_INDEX 0x11
61 #define FIRST_STREAMPID_INDEX 0x12
63 // remove_streampid_from_list() and update_streampid_list()
64 #define INVALID_STREAMPID_INDEX 0x20
66 #define INDEX_DISABLE_ALL 0xEFFFFFFD // used for remove_streampid_from_list(), dvbapi_set_pid()
67 #define INDEX_INVALID 0xEFFFFFFF
69 #define DUMMY_FD 0xFFFF
71 //-----------------------------------------------------------------------------
72 // constants used in socket communication
73 //-----------------------------------------------------------------------------
75 #define DVBAPI_PROTOCOL_VERSION 3
76 #define DVBAPI_MAX_PACKET_SIZE 262 // maximum possible packet size
78 #define DVBAPI_CA_GET_DESCR_INFO 0x80086F83
79 #define DVBAPI_CA_SET_DESCR 0x40106F86
80 #define DVBAPI_CA_SET_PID 0x40086F87
81 #define DVBAPI_CA_SET_DESCR_MODE 0x400C6F88
82 #define DVBAPI_CA_SET_DESCR_DATA 0x40186F89
83 //#define DVBAPI_DMX_START 0x00006F29 // in case we ever need this
84 #define DVBAPI_DMX_STOP 0x00006F2A
85 #define DVBAPI_DMX_SET_FILTER 0x403C6F2B
87 #define DVBAPI_AOT_CA 0x9F803000
88 #define DVBAPI_AOT_CA_PMT 0x9F803200 // least significant byte is length (ignored)
89 #define DVBAPI_AOT_CA_STOP 0x9F803F04
90 #define DVBAPI_FILTER_DATA 0xFFFF0000
91 #define DVBAPI_CLIENT_INFO 0xFFFF0001
92 #define DVBAPI_SERVER_INFO 0xFFFF0002
93 #define DVBAPI_ECM_INFO 0xFFFF0003
95 #define DVBAPI_INDEX_DISABLE 0xFFFFFFFF // only used for ca_pid_t
97 //-----------------------------------------------------------------------------
98 // CA PMT defined values according to EN 50221
99 // https://www.dvb.org/resources/public/standards/En50221.V1.pdf
100 // https://www.dvb.org/resources/public/standards/R206-001.V1.pdf
101 //-----------------------------------------------------------------------------
103 // ca_pmt_list_management: This parameter is used to indicate whether the user has selected a single program or several
104 // programs. The following values can be used:
106 #define CA_PMT_LIST_MORE 0x00 // The CA PMT object is neither the first one, nor the last one of the list.
108 #define CA_PMT_LIST_FIRST 0x01 // The CA PMT object is the first one of a new list of more than one CA PMT object.
109 // All previously selected programs are being replaced by the programs of the new list.
111 #define CA_PMT_LIST_LAST 0x02 // The CA PMT object is the last of the list.
113 #define CA_PMT_LIST_ONLY 0x03 // The list is made of a single CA PMT object.
115 #define CA_PMT_LIST_ADD 0x04 // The CA PMT has to be added to an existing list, that is, a new program has been seleced
116 // by the user, but all previously selected programs remain selected.
118 #define CA_PMT_LIST_UPDATE 0x05 // The CA PMT of a program already in the list is sent again because the version_number or
119 // the current_next_indicator has changed.
121 // ca_pmt_cmd_id: This parameter indicates what response is required from the application to a CA PMT object. It can
122 // take the following values:
124 #define CA_PMT_CMD_OK_DESCRAMBLING 0x01 // The host does not expect answer to the CA PMT and the application can start
125 // descrambling the program or start an MMI dialogue immediately.
127 #define CA_PMT_CMD_OK_MMI 0x02 // The application can start an MMI dialogue, but shall not start descrambling
128 // before reception of a new CA PMT object with "ca_pmt_cmd_id" set to
129 // "ok_descrambling". In this case the host shall quarantee that an MMI session
130 // can be opened by the CA application.
132 #define CA_PMT_CMD_QUERY 0x03 // The host expects to receive a CA PMT reply. In this case, the applicaiton is
133 // not allowed to start descrambling or MMI dialogue before reception of a new
134 // CA PMT object with "ca_pmt_cmd_id" set to "ok_descrambling or "ok_mmi".
136 #define CA_PMT_CMD_NOT_SELECTED 0x04 // It indicates to the CA application that the host no longer requires that CA
137 // application to attempt to descramble the service. The CA application shall
138 // close any MMI dialogue it has opened.
139 //----------------
140 // ca descriptors
141 //----------------
143 #define CA 0x09
144 #define ENIGMA_NAMESPACE 0x81
145 #define DEMUX_CA_MASK_ADAPTER 0x82 // deprecated - applications should use descriptors ADAPTER_DEVICE, DEMUX_DEVICE and CA_DEVICE instead
146 #define ADAPTER_DEVICE 0x83
147 #define PMT_PID 0x84
148 #define SERVICE_TYPE_MASK 0x85 // not used by OSCam
149 #define DEMUX_DEVICE 0x86
150 #define CA_DEVICE 0x87
152 //-----------------------------------------------------------------------------
153 // api used for internal device communication
154 //-----------------------------------------------------------------------------
156 #define DMX_FILTER_SIZE 16
158 // The following is part of the linux dvb api (v1),
159 // but modifed to overcome some bugs in specific devices
161 typedef struct dmxFilter
163 uint8_t filter[DMX_FILTER_SIZE];
164 uint8_t mask[DMX_FILTER_SIZE];
165 } dmxFilter_t;
167 struct dmxSctFilterParams
169 uint16_t pid;
170 dmxFilter_t filter;
171 uint32_t timeout;
172 uint32_t flags;
174 #define DMX_CHECK_CRC 1
175 #define DMX_ONESHOT 2
176 #define DMX_IMMEDIATE_START 4
179 #define DMX_START1 _IOW('o', 41, int)
180 #define DMX_STOP1 _IOW('o', 42, int)
181 #define DMX_SET_FILTER1 _IOW('o', 43, struct dmxSctFilterParams *)
183 // The following is part of the linux dvb api
184 // https://www.kernel.org/doc/html/latest/media/uapi/dvb/demux.html
185 // https://github.com/torvalds/linux/blob/master/include/uapi/linux/dvb/dmx.h
187 typedef struct dmx_filter
189 uint8_t filter[DMX_FILTER_SIZE];
190 uint8_t mask[DMX_FILTER_SIZE];
191 uint8_t mode[DMX_FILTER_SIZE];
192 } dmx_filter_t;
194 struct dmx_sct_filter_params
196 uint16_t pid;
197 dmx_filter_t filter;
198 uint32_t timeout;
199 uint32_t flags;
201 #define DMX_CHECK_CRC 1
202 #define DMX_ONESHOT 2
203 #define DMX_IMMEDIATE_START 4
206 #define DMX_START _IO('o', 41)
207 #define DMX_STOP _IO('o', 42)
208 #define DMX_SET_FILTER _IOW('o', 43, struct dmx_sct_filter_params)
210 // The following is part of the linux dvb api
211 // https://www.kernel.org/doc/html/latest/media/uapi/dvb/ca.html
212 // https://github.com/torvalds/linux/blob/master/include/uapi/linux/dvb/ca.h
214 typedef struct ca_descr_info
216 uint32_t num;
217 uint32_t type; /* bitmask: 1 == ECD, 2 == NDS, 4 == DDS */
218 } ca_descr_info_t;
220 typedef struct ca_descr
222 uint32_t index;
223 uint32_t parity; /* 0 == even, 1 == odd */
224 uint8_t cw[8];
225 } ca_descr_t;
227 // ca_pid has been removed from the api, but we still use it
228 typedef struct ca_pid
230 uint32_t pid;
231 int32_t index; /* -1 == disable */
232 } ca_pid_t;
234 enum ca_descr_algo
236 CA_ALGO_DVBCSA,
237 CA_ALGO_DES,
238 CA_ALGO_AES128,
241 enum ca_descr_cipher_mode
243 CA_MODE_ECB,
244 CA_MODE_CBC,
247 // Structs "ca_descr_mode" and "ca_descr_data" and respective ioctl
248 // commands are part of a custom api
251 * struct ca_descr_mode - Used to select a crypto algorithm and mode
252 * for a key slot.
254 * @index: Key slot allocated for a PID or service.
255 * See CA_SET_PID and struct ca_pid.
256 * @algo: Algorithm to select for @index.
257 * @cipher_mode: Cipher mode to use with @algo.
260 typedef struct ca_descr_mode
262 uint32_t index;
263 enum ca_descr_algo algo;
264 enum ca_descr_cipher_mode cipher_mode;
265 } ca_descr_mode_t;
268 * struct ca_descr_data - Used to write Keys and IVs to a descrambler.
270 * @index: Key slot allocated for a PID or service.
271 * See CA_SET_PID and struct ca_pid.
272 * @parity: Indicates even or odd parity for control words.
273 * @data_type: Key or IV.
274 * @length: Size of @data array; depends on selected algorithm and
275 * key or block size.
276 * @data: Pointer to variable @length key or initialization vector data.
279 enum ca_descr_data_type
281 CA_DATA_IV,
282 CA_DATA_KEY,
285 enum ca_descr_parity
287 CA_PARITY_EVEN,
288 CA_PARITY_ODD,
291 typedef struct ca_descr_data
293 uint32_t index;
294 enum ca_descr_parity parity;
295 enum ca_descr_data_type data_type;
296 uint32_t length;
297 uint8_t *data;
298 } ca_descr_data_t;
300 #define CA_GET_DESCR_INFO _IOR('o', 131, ca_descr_info_t)
301 #define CA_SET_DESCR _IOW('o', 134, ca_descr_t)
302 #define CA_SET_PID _IOW('o', 135, ca_pid_t)
303 #define CA_SET_DESCR_MODE _IOW('o', 136, ca_descr_mode_t)
304 #define CA_SET_DESCR_DATA _IOW('o', 137, ca_descr_data_t)
306 //-----------------------------------------------------------------------------
307 // OSCam defined structures
308 //-----------------------------------------------------------------------------
310 struct box_devices
312 char *path;
313 char *ca_device;
314 char *demux_device;
315 char *cam_socket_path;
316 int8_t api;
319 typedef struct filter_s
321 uint32_t fd; // filter handle
322 int32_t pidindex;
323 int32_t pid;
324 uint16_t caid;
325 uint32_t provid;
326 uint16_t type;
327 int32_t count;
328 uint8_t filter[16];
329 uint8_t mask[16];
330 uint8_t lastecmd5[CS_ECMSTORESIZE]; // last requested ecm md5
331 int32_t lastresult;
332 uint8_t prevecmd5[CS_ECMSTORESIZE]; // previous requested ecm md5
333 int32_t prevresult;
334 #if defined(WITH_STAPI) || defined(WITH_STAPI5)
335 int32_t NumSlots;
336 uint32_t SlotHandle[10];
337 uint32_t BufferHandle[10];
338 #endif
339 #ifdef WITH_EMU
340 uint32_t cadata;
341 #endif
342 } FILTERTYPE;
344 #ifdef WITH_EXTENDED_CW
345 #define MAX_STREAM_INDICES 32 // In practice, 5 is the maximum ever used
346 #else
347 #define MAX_STREAM_INDICES 1
348 #endif
350 #define CA_MAX 32 // Max ca devices supported by oscam - limited by sizeof(ca_mask) of struct demux_s (32 bits)
351 #define INDEX_MAX 64 // Max descramblers per ca device - limited by sizeof(activeindexers) of struct s_streampid (64 bits)
352 #define INDEX_MAX_LOCAL 16 // Max total descramblers to use for enigma2 and other STBs when dvbapi_get_descrambler_info() fails
353 #define INDEX_MAX_NET 64 // Max total descramblers to use for PC (VDR, Tvheadend, etc)
355 typedef struct s_ecmpid
357 uint16_t CAID;
358 uint32_t PROVID; // provider
359 uint16_t ECM_PID;
360 uint32_t CHID;
361 uint16_t EMM_PID;
362 uint32_t VPID; // video pid
363 uint8_t irdeto_maxindex; // max irdeto indices always fresh fetched from current ecm
364 uint8_t irdeto_curindex; // current irdeto index we want to handle
365 uint8_t irdeto_cycle; // temp var that holds the irdeto index we started with to detect if we cycled trough all indices
366 int8_t checked;
367 int8_t status;
368 uint8_t tries;
369 uint8_t table;
370 int8_t useMultipleIndices; // whether or not to use multiple indices for this ecm pid
371 uint32_t index[MAX_STREAM_INDICES]; // ca indices used for this ecm pid (index[0] holds ca index for STREAMmpids[0] and so on)
372 uint32_t streams; // bit mask of STREAMpids enabled for this ECMpid
373 uint32_t cadata;
374 #ifdef WITH_EMU
375 int16_t pvu_counter;
376 #endif
377 } ECMPIDTYPE;
379 typedef struct s_emmpid
381 uint16_t CAID;
382 uint32_t PROVID;
383 uint16_t PID;
384 uint8_t type;
385 uint32_t cadata;
386 } EMMPIDTYPE;
388 enum stream_type
390 STREAM_UNDEFINED,
391 STREAM_VIDEO,
392 STREAM_AUDIO,
393 STREAM_SUBTITLE
396 #define MAX_DEMUX 32 // Max number of demuxes supported by OSCam - each channel/service occupies one demux
397 #define MAX_ECM_PIDS 24 // Max number of ECM pids per demux
398 #define MAX_EMM_PIDS 24 // Max number of EMM pids per demux
399 #define MAX_STREAM_PIDS 32 // Max number of pids other than ECM and EMM (e.g. audio, video, subtitle, etc) per demux (hardware descramblers might have a capacity of 30 pids)
400 #define MAX_FILTER 64
401 #define MAX_ASSOC_FD MAX_DEMUX
403 #define PTINUM 10
404 #define SLOTNUM 20
406 typedef struct demux_s
408 int8_t demux_index; // ID of the (hardware) demux device carrying this program - we get this via CA PMT
409 int8_t adapter_index; // ID of the adapter device carrying this program - we get this via CA PMT
410 uint32_t ca_mask; // Bit mask of ca devices used for descrambling this program - we get this via CA PMT
411 int32_t socket_fd; // Connection identifier through which we received the CA PMT object
412 uint16_t client_proto_version;
413 FILTERTYPE demux_fd[MAX_FILTER];
414 int8_t ECMpidcount; // Count of ECM pids in this program
415 ECMPIDTYPE ECMpids[MAX_ECM_PIDS];
416 int8_t EMMpidcount; // Count of EMM pids in this program
417 EMMPIDTYPE EMMpids[MAX_EMM_PIDS];
418 struct timeb emmstart; // last time emm cat was started
419 uint16_t max_emm_filter;
420 int8_t STREAMpidcount;
421 uint16_t STREAMpids[MAX_STREAM_PIDS];
422 enum stream_type STREAMpidsType[MAX_STREAM_PIDS]; // type (audio, video, subtitle, etc) of the corresponding stream pid
423 int16_t pidindex; // ECMpid used for descrambling - holds index of the ECMpids[] array
424 int16_t curindex;
425 int8_t max_status;
426 uint16_t program_number; // also called service id (srvid)
427 uint16_t onid; // original network id
428 uint16_t tsid; // transport stream id
429 uint16_t pmtpid; // PMT pid for the program_number
430 uint32_t ens; // enigma namespace
431 uint8_t last_cw[MAX_STREAM_INDICES][2][16]; // even/odd pairs of 16 byte CWs used for descrambling on the last crypto period
432 int8_t emm_filter;
433 int8_t sdt_filter;
434 uint8_t hexserial[8];
435 struct s_reader *rdr;
436 char pmt_file[30];
437 time_t pmt_time;
438 bool stop_descrambling; // Program is marked to stop descrambling (not selected in the new CA PMT list)
439 bool running; // Descrambling is currently running for this program
440 uint8_t old_ecmfiltercount; // previous ecm filter count
441 uint8_t old_emmfiltercount; // previous emm filter count
442 pthread_mutex_t answerlock; // request mode 1 avoid race
443 #ifdef WITH_STAPI
444 uint32_t DescramblerHandle[PTINUM];
445 int32_t desc_pidcount;
446 uint32_t slot_assc[PTINUM][SLOTNUM];
447 #endif
448 #ifdef WITH_STAPI5
449 uint32_t dev_index;
450 #endif
451 int8_t decodingtries; // -1 = first run
452 struct timeb decstart;
453 struct timeb decend;
454 } DEMUXTYPE;
456 typedef struct s_streampid
458 uint16_t streampid; // pid of this stream
459 uint8_t cadevice; // CA device used for descramlbing
460 uint32_t caindex; // index (slot) of the CA device used
461 uint64_t activeindexers; // bitmask indexers if streampid enabled for index, bit is set
462 bool use_des; // whether to use DES for descrambling this streampid
463 } STREAMPIDTYPE;
465 struct s_dvbapi_priority
467 char type; // can be 'p', 'i', 'm', 'd', 's', 'l', 'j', 'a' or 'x'
468 uint16_t caid;
469 uint32_t provid;
470 uint16_t srvid;
471 uint32_t chid;
472 uint16_t ecmpid;
473 uint32_t cadata;
474 uint16_t mapcaid;
475 uint32_t mapprovid;
476 uint16_t mapecmpid;
477 int16_t delay;
478 int8_t force;
479 int8_t pidx;
480 #if defined(WITH_STAPI) || defined(WITH_STAPI5)
481 char devname[30];
482 char pmtfile[30];
483 int8_t disablefilter;
484 #endif
485 struct s_dvbapi_priority *next;
488 //-----------------------------------------------------------------------------
489 // function declarations
490 //-----------------------------------------------------------------------------
492 void dvbapi_stop_descrambling(int32_t demux_id, uint32_t msgid);
493 void dvbapi_stop_all_descrambling(uint32_t msgid);
494 void dvbapi_process_input(int32_t demux_id, int32_t filter_num, uint8_t *buffer, int32_t len, uint32_t msgid);
495 int32_t dvbapi_open_device(int32_t, int32_t, int);
496 int32_t dvbapi_stop_filternum(int32_t demux_id, int32_t num, uint32_t msgid);
497 int32_t dvbapi_stop_filter(int32_t demux_id, int32_t type, uint32_t msgid);
498 struct s_dvbapi_priority *dvbapi_check_prio_match(int32_t demux_id, int32_t pidindex, char type);
499 void dvbapi_send_dcw(struct s_client *client, ECM_REQUEST *er);
500 void dvbapi_write_cw(int32_t demux_id, int32_t pid, int32_t stream_id, uint8_t *cw, uint8_t cw_length, uint8_t *iv, uint8_t iv_length, enum ca_descr_algo algo, enum ca_descr_cipher_mode cipher_mode, uint32_t msgid);
501 int32_t dvbapi_parse_capmt(const uint8_t *buffer, uint32_t length, int32_t connfd, char *pmtfile, uint16_t client_proto_version, uint32_t msgid);
502 void request_cw(struct s_client *client, ECM_REQUEST *er, int32_t demux_id, uint8_t delayed_ecm_check);
503 void dvbapi_try_next_caid(int32_t demux_id, int8_t checked, uint32_t msgid);
504 void dvbapi_read_priority(void);
505 int32_t dvbapi_set_section_filter(int32_t demux_id, ECM_REQUEST *er, int32_t n);
506 int32_t dvbapi_activate_section_filter(int32_t demux_id, int32_t num, int32_t fd, int32_t pid, uint8_t *filter, uint8_t *mask, uint32_t msgid);
507 int32_t dvbapi_check_ecm_delayed_delivery(int32_t demux_id, ECM_REQUEST *er);
508 int32_t dvbapi_get_filternum(int32_t demux_id, ECM_REQUEST *er, int32_t type);
509 uint32_t dvbapi_ca_set_pid(int32_t demux_id, int32_t pid, int32_t stream_id, bool use_des, uint32_t msgid);
510 void dvbapi_set_pid(int32_t demux_id, int32_t num, uint32_t idx, bool enable, bool use_des, uint32_t msgid);
511 int8_t update_streampid_list(uint8_t cadevice, uint16_t pid, uint32_t idx, bool use_des);
512 int8_t remove_streampid_from_list(uint8_t cadevice, uint16_t pid, uint32_t idx);
513 void disable_unused_streampids(int16_t demux_id);
514 uint32_t is_ca_used(uint8_t cadevice, int32_t pid);
515 uint32_t count_active_indexers(void);
516 uint16_t dvbapi_get_client_proto_version(void);
517 const char *dvbapi_get_client_name(void);
518 void rotate_emmfilter(int32_t demux_id);
519 int32_t filtermatch(uint8_t *buffer, int32_t filter_num, int32_t demux_id, int32_t len);
520 void delayer(ECM_REQUEST *er, uint32_t delay);
521 void check_add_emmpid(int32_t demux_id, uint8_t *filter, int32_t l, int32_t emmtype);
522 void *dvbapi_start_handler(struct s_client *cl, uint8_t *mbuf, int32_t module_idx, void *(*_main_func)(void *));
523 uint32_t dvbapi_get_desc_index(int32_t demux_id, int32_t pid, int32_t stream_id);
524 void dvbapi_write_ecminfo_file(struct s_client *client, ECM_REQUEST *er, uint8_t *lastcw0, uint8_t *lastcw1, uint8_t cw_length);
526 #if defined(WITH_AZBOX) || defined(WITH_MCA)
527 #define USE_OPENXCAS 1
528 extern int32_t openxcas_provid;
529 extern uint16_t openxcas_sid, openxcas_caid, openxcas_ecm_pid;
530 static inline void openxcas_set_caid(uint16_t _caid) { openxcas_caid = _caid; }
531 static inline void openxcas_set_ecm_pid(uint16_t _pid) { openxcas_ecm_pid = _pid; }
532 static inline void openxcas_set_sid(uint16_t _sid) { openxcas_sid = _sid; }
533 static inline void openxcas_set_provid(uint32_t _provid) { openxcas_provid = _provid; }
534 #else
535 #define USE_OPENXCAS 0
536 static inline void openxcas_set_caid(uint16_t UNUSED(_caid)) { }
537 static inline void openxcas_set_ecm_pid(uint16_t UNUSED(_pid)) { }
538 static inline void openxcas_set_sid(uint16_t UNUSED(_sid)) { }
539 static inline void openxcas_set_provid(uint32_t UNUSED(_provid)) { }
540 #endif
542 bool is_dvbapi_usr(char *usr);
543 static inline bool module_dvbapi_enabled(void) { return cfg.dvbapi_enabled; }
544 #else
545 static inline void dvbapi_stop_all_descrambling(uint32_t UNUSED(msgid)) { }
546 static inline void dvbapi_read_priority(void) { }
547 static inline bool is_dvbapi_usr(char *UNUSED(usr)) { return 0; }
548 static inline bool module_dvbapi_enabled(void) { return 0; }
549 #endif // WITH_DVBAPI
551 #endif // MODULE_DVBAPI_H_