|
@@ -64,6 +64,7 @@ static const struct option long_options[] = {
|
64
|
64
|
{ "output-filter", no_argument, NULL, 'p' },
|
65
|
65
|
|
66
|
66
|
{ "ca-system", required_argument, NULL, 'c' },
|
|
67
|
+ { "caid", required_argument, NULL, 'C' },
|
67
|
68
|
{ "camd-server", required_argument, NULL, 's' },
|
68
|
69
|
{ "camd-user", required_argument, NULL, 'U' },
|
69
|
70
|
{ "camd-pass", required_argument, NULL, 'P' },
|
|
@@ -115,11 +116,14 @@ static void show_help(struct ts *ts) {
|
115
|
116
|
printf(" -t --output-ttl <ttl> | Set multicast ttl. Default: %d\n", ts->output.ttl);
|
116
|
117
|
printf(" -p --output-filter | Enable or disable output filter. Default: %s\n", ts->pid_filter ? "enabled" : "disabled");
|
117
|
118
|
printf("\n");
|
118
|
|
- printf("CAMD server options:\n");
|
|
119
|
+ printf("CA options:\n");
|
119
|
120
|
printf(" -c --ca-system <ca_sys> | Process input EMM/ECM from <ca_sys>.\n");
|
120
|
121
|
printf(" | Valid systems are: CONAX (default), CRYPTOWORKS,\n");
|
121
|
122
|
printf(" . IRDETO, SECA (MEDIAGUARD), VIACCESS,\n");
|
122
|
123
|
printf(" . VIDEOGUARD (NDS), NAGRA and DRECRYPT.\n");
|
|
124
|
+ printf(" -C --caid <caid> | Set CAID. Default: Taken from --ca-system.\n");
|
|
125
|
+ printf("\n");
|
|
126
|
+ printf("CAMD server options:\n");
|
123
|
127
|
printf(" -s --camd-server <addr> | Set CAMD server ip address and port (1.2.3.4:2233).\n");
|
124
|
128
|
printf(" -U --camd-user <user> | Set CAMD server user. Default: %s\n", ts->camd35.user);
|
125
|
129
|
printf(" -P --camd-pass <pass> | Set CAMD server password. Default: %s\n", ts->camd35.pass);
|
|
@@ -181,7 +185,7 @@ static int parse_io_param(struct io *io, char *opt, int open_flags, mode_t open_
|
181
|
185
|
|
182
|
186
|
static void parse_options(struct ts *ts, int argc, char **argv) {
|
183
|
187
|
int j, i, ca_err = 0, server_err = 1, input_addr_err = 0, output_addr_err = 0, output_intf_err = 0, ident_err = 0;
|
184
|
|
- while ( (j = getopt_long(argc, argv, "i:d:l:L:I:RzO:o:t:pc:s:U:P:y:eZ:Ef:X:G:KJ:D:h", long_options, NULL)) != -1 ) {
|
|
188
|
+ while ( (j = getopt_long(argc, argv, "i:d:l:L:I:RzO:o:t:pc:C:s:U:P:y:eZ:Ef:X:G:KJ:D:h", long_options, NULL)) != -1 ) {
|
185
|
189
|
char *p = NULL;
|
186
|
190
|
switch (j) {
|
187
|
191
|
case 'i':
|
|
@@ -249,6 +253,10 @@ static void parse_options(struct ts *ts, int argc, char **argv) {
|
249
|
253
|
else
|
250
|
254
|
ca_err = 1;
|
251
|
255
|
break;
|
|
256
|
+ case 'C':
|
|
257
|
+ ts->forced_caid = strtoul(optarg, NULL, 0) & 0xffff;
|
|
258
|
+ break;
|
|
259
|
+
|
252
|
260
|
case 's':
|
253
|
261
|
p = strrchr(optarg, ':');
|
254
|
262
|
if (p) {
|
|
@@ -349,7 +357,16 @@ static void parse_options(struct ts *ts, int argc, char **argv) {
|
349
|
357
|
ts_LOGf("Syslog : %s:%d\n", ts->syslog_host, ts->syslog_port);
|
350
|
358
|
else
|
351
|
359
|
ts_LOGf("Syslog : disabled\n");
|
352
|
|
- ts_LOGf("CA System : %s\n", ts_get_CA_sys_txt(ts->req_CA_sys));
|
|
360
|
+
|
|
361
|
+ if (ts->forced_caid)
|
|
362
|
+ ts->req_CA_sys = ts_get_CA_sys(ts->forced_caid);
|
|
363
|
+ if (!ts->forced_caid)
|
|
364
|
+ ts_LOGf("CA System : %s\n", ts_get_CA_sys_txt(ts->req_CA_sys));
|
|
365
|
+ else
|
|
366
|
+ ts_LOGf("CA System : %s | CAID: 0x%04x (%d)\n",
|
|
367
|
+ ts_get_CA_sys_txt(ts->req_CA_sys),
|
|
368
|
+ ts->forced_caid, ts->forced_caid);
|
|
369
|
+
|
353
|
370
|
if (ts->input.type == NET_IO) {
|
354
|
371
|
ts_LOGf("Input addr : %s://%s:%u/\n",
|
355
|
372
|
ts->rtp_input ? "rtp" : "udp",
|