From mboxrd@z Thu Jan 1 00:00:00 1970 From: Subash Abhinov Kasiviswanathan Subject: Re: [PATCH 1/1] ip: add rmnet initial support Date: Tue, 12 Jun 2018 17:06:59 -0600 Message-ID: <8be93f95bedfdf6983b6af6894eecafa@codeaurora.org> References: <1528812777-7512-1-git-send-email-dnlplm@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Cc: netdev@vger.kernel.org, Stephen Hemminger To: Daniele Palmas Return-path: Received: from smtp.codeaurora.org ([198.145.29.96]:53134 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934322AbeFLXHA (ORCPT ); Tue, 12 Jun 2018 19:07:00 -0400 In-Reply-To: <1528812777-7512-1-git-send-email-dnlplm@gmail.com> Sender: netdev-owner@vger.kernel.org List-ID: > + > +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