[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <8be93f95bedfdf6983b6af6894eecafa@codeaurora.org>
Date: Tue, 12 Jun 2018 17:06:59 -0600
From: Subash Abhinov Kasiviswanathan <subashab@...eaurora.org>
To: Daniele Palmas <dnlplm@...il.com>
Cc: netdev@...r.kernel.org,
Stephen Hemminger <stephen@...workplumber.org>
Subject: Re: [PATCH 1/1] ip: add rmnet initial support
> +
> +static void print_explain(FILE *f)
> +{
> + fprintf(f,
> + "Usage: ... rmnet mux_id MUXID\n"
> + "\n"
> + "MUXID := 1-127\n"
> + );
> +}
Hi Daniele
This range can be from 1-254.
> +
> +static void explain(void)
> +{
> + print_explain(stderr);
> +}
> +
> +static int rmnet_parse_opt(struct link_util *lu, int argc, char
> **argv,
> + struct nlmsghdr *n)
> +{
> + __u16 mux_id;
> +
> + while (argc > 0) {
> + if (matches(*argv, "mux_id") == 0) {
> + NEXT_ARG();
> + if (get_u16(&mux_id, *argv, 0))
> + invarg("mux_id is invalid", *argv);
> + addattr_l(n, 1024, IFLA_RMNET_MUX_ID, &mux_id, 2);
You could use addattr16() instead since it is __u16.
--
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
a Linux Foundation Collaborative Project
Powered by blists - more mailing lists