Skip to content

Commit 1e9fcb9

Browse files
committed
Add T[r]XXX sub-command. Not functional yet.
PR: #59
1 parent 7daee7e commit 1e9fcb9

File tree

1 file changed

+18
-1
lines changed

1 file changed

+18
-1
lines changed

src/commands/rpcpv1_ul_subc.c

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ int
4040
rtpp_subcommand_ul_opts_parse(const struct rtpp_cfg *cfsp,
4141
const struct rtpp_command_args *subc_args, struct after_success_h *asp)
4242
{
43-
int mod_id, inst_id;
43+
int mod_id, inst_id, ttl;
4444
const char *cp;
4545

4646
switch(subc_args->v[0][0]) {
@@ -57,6 +57,23 @@ rtpp_subcommand_ul_opts_parse(const struct rtpp_cfg *cfsp,
5757
return (-1);
5858
break;
5959

60+
case 'T':
61+
case 't':
62+
cp = &subc_args->v[0][1];
63+
if (cp[0] == 'r' || cp[0] == 'R')
64+
cp += 1;
65+
if (atoi_safe(cp, &ttl) != ATOI_OK)
66+
return (-1);
67+
if (ttl <= 0)
68+
return (-1);
69+
#if 0
70+
if (c == 't')
71+
ulop->requested_sttl = n;
72+
else
73+
ulop->requested_pttl = n;
74+
#endif
75+
break;
76+
6077
default:
6178
return (-1);
6279
}

0 commit comments

Comments
 (0)