All of lore.kernel.org
 help / color / mirror / Atom feed
From: Subash Abhinov Kasiviswanathan <subashab@codeaurora.org>
To: Daniele Palmas <dnlplm@gmail.com>
Cc: netdev@vger.kernel.org, Stephen Hemminger <stephen@networkplumber.org>
Subject: Re: [PATCH 1/1] ip: add rmnet initial support
Date: Tue, 12 Jun 2018 17:06:59 -0600	[thread overview]
Message-ID: <8be93f95bedfdf6983b6af6894eecafa@codeaurora.org> (raw)
In-Reply-To: <1528812777-7512-1-git-send-email-dnlplm@gmail.com>

> +
> +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

  reply	other threads:[~2018-06-12 23:07 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-06-12 14:12 [PATCH 1/1] ip: add rmnet initial support Daniele Palmas
2018-06-12 23:06 ` Subash Abhinov Kasiviswanathan [this message]
2018-06-13 14:53   ` Daniele Palmas
2018-06-13  0:22 ` Stephen Hemminger
2018-06-13 14:54   ` Daniele Palmas

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=8be93f95bedfdf6983b6af6894eecafa@codeaurora.org \
    --to=subashab@codeaurora.org \
    --cc=dnlplm@gmail.com \
    --cc=netdev@vger.kernel.org \
    --cc=stephen@networkplumber.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.