|
@@ -68,6 +68,7 @@ static const struct option long_options[] = {
|
68
|
68
|
{ "camd-pkt-delay", required_argument, NULL, 'y' },
|
69
|
69
|
|
70
|
70
|
{ "emm", no_argument, NULL, 'e' },
|
|
71
|
+ { "emm-pid", required_argument, NULL, 'Z' },
|
71
|
72
|
{ "emm-only", no_argument, NULL, 'E' },
|
72
|
73
|
{ "emm-report-time", required_argument, NULL, 'f' },
|
73
|
74
|
|
|
@@ -123,6 +124,7 @@ static void show_help(struct ts *ts) {
|
123
|
124
|
printf("EMM options:\n");
|
124
|
125
|
printf(" -e --emm | Enable sending EMM's to CAMD for processing. Default: %s\n", ts->emm_send ? "enabled" : "disabled");
|
125
|
126
|
printf(" -E --emm-only | Send only EMMs to CAMD, without decoding input stream. Default: %s\n", ts->emm_only ? "enabled" : "disabled");
|
|
127
|
+ printf(" -Z --emm-pid <pid> | Force EMM pid. Default: none\n");
|
126
|
128
|
printf(" -f --emm-report-time <sec> | Report how much EMMs has been send for processing each <sec> seconds.\n");
|
127
|
129
|
printf(" | Set <sec> to 0 to disable reporting. Default: %d\n", ts->camd35.emm_count_report_interval);
|
128
|
130
|
printf("\n");
|
|
@@ -162,7 +164,7 @@ static int parse_io_param(struct io *io, char *opt, int open_flags, mode_t open_
|
162
|
164
|
|
163
|
165
|
static void parse_options(struct ts *ts, int argc, char **argv) {
|
164
|
166
|
int j, i, ca_err = 0, server_err = 1, input_addr_err = 0, output_addr_err = 0, output_intf_err = 0, ident_err = 0;
|
165
|
|
- while ( (j = getopt_long(argc, argv, "i:d:l:L:I:RzO:o:t:pc:s:U:P:y:eEf:G:D:h", long_options, NULL)) != -1 ) {
|
|
167
|
+ while ( (j = getopt_long(argc, argv, "i:d:l:L:I:RzO:o:t:pc:s:U:P:y:eZ:Ef:G:D:h", long_options, NULL)) != -1 ) {
|
166
|
168
|
char *p = NULL;
|
167
|
169
|
switch (j) {
|
168
|
170
|
case 'i':
|
|
@@ -258,6 +260,9 @@ static void parse_options(struct ts *ts, int argc, char **argv) {
|
258
|
260
|
case 'e':
|
259
|
261
|
ts->emm_send = !ts->emm_send;
|
260
|
262
|
break;
|
|
263
|
+ case 'Z':
|
|
264
|
+ ts->forced_emm_pid = strtoul(optarg, NULL, 0) & 0x1fff;
|
|
265
|
+ break;
|
261
|
266
|
case 'E':
|
262
|
267
|
ts->emm_only = 1;
|
263
|
268
|
ts->emm_send = 1;
|
|
@@ -324,6 +329,9 @@ static void parse_options(struct ts *ts, int argc, char **argv) {
|
324
|
329
|
if (ts->req_CA_sys == CA_IRDETO)
|
325
|
330
|
ts_LOGf("Irdeto ECM : %d\n", ts->irdeto_ecm);
|
326
|
331
|
|
|
332
|
+ if (ts->forced_emm_pid)
|
|
333
|
+ ts_LOGf("EMM pid : 0x%04x (%d)\n", ts->forced_emm_pid, ts->forced_emm_pid);
|
|
334
|
+
|
327
|
335
|
if (!ts->emm_only)
|
328
|
336
|
{
|
329
|
337
|
if (ts->output.type == NET_IO) {
|