On Wed, May 29, 2019 at 9:04 PM David Ahern wrote:
>
> From: David Ahern
>
> Add nexthop subcommand to ip. Implement basic commands for creating,
> deleting and dumping nexthop objects. Syntax follows 'nexthop' syntax
> from existing 'ip route' command.
>
> Signed-off-by: David Ahern
If you are
On 5/30/19 11:52 AM, Stephen Hemminger wrote:
> On Wed, 29 May 2019 20:17:44 -0700
> David Ahern wrote:
>
>> +
>> +static void print_nh_gateway(FILE *fp, const struct nhmsg *nhm,
>> + const struct rtattr *rta)
>> +{
>> +const char *gateway = format_host_rta(nhm->nh_fa
On 5/30/19 11:45 AM, Stephen Hemminger wrote:
> On Wed, 29 May 2019 20:17:44 -0700
> David Ahern wrote:
>
>> +
>> +struct rtnl_handle rth_del = { .fd = -1 };
>> +
>
> can this be static?
>
oops, yes, it should be
On Wed, 29 May 2019 20:17:44 -0700
David Ahern wrote:
> +
> +static void print_nh_gateway(FILE *fp, const struct nhmsg *nhm,
> + const struct rtattr *rta)
> +{
> + const char *gateway = format_host_rta(nhm->nh_family, rta);
> +
> + if (is_json_context())
> +
On 5/30/19 11:45 AM, Stephen Hemminger wrote:
> On Wed, 29 May 2019 20:17:44 -0700
> David Ahern wrote:
>
>> +static struct
>> +{
>
> kernel style is:
>
> static struct {
> ...
>
The style I used is consistent with existing code -- e.g., ip/iproute.c.
If you want the above, I can do that.
On Wed, 29 May 2019 20:17:44 -0700
David Ahern wrote:
> +
> +struct rtnl_handle rth_del = { .fd = -1 };
> +
can this be static?
On Wed, 29 May 2019 20:17:44 -0700
David Ahern wrote:
> +static struct
> +{
kernel style is:
static struct {
...
From: David Ahern
Add nexthop subcommand to ip. Implement basic commands for creating,
deleting and dumping nexthop objects. Syntax follows 'nexthop' syntax
from existing 'ip route' command.
Signed-off-by: David Ahern
---
ip/Makefile| 3 +-
ip/ip.c| 3 +-
ip/ip_common.h | 2 +