On 3/5/18 8:04 PM, Stephen Hemminger wrote:
> @@ -338,274 +339,308 @@ static const char *ntable_strtime_delta(__u32 msec)
>       return str;
>  }
>  
> -static int print_ntable(const struct sockaddr_nl *who, struct nlmsghdr *n, 
> void *arg)
> +static void print_ndtconfig(const struct ndt_config *ndtc)
>  {
> -     FILE *fp = (FILE *)arg;
> -     struct ndtmsg *ndtm = NLMSG_DATA(n);
> -     int len = n->nlmsg_len;
> -     struct rtattr *tb[NDTA_MAX+1];
> -     struct rtattr *tpb[NDTPA_MAX+1];
> -     int ret;
>  
> -     if (n->nlmsg_type != RTM_NEWNEIGHTBL) {
> -             fprintf(stderr, "Not NEIGHTBL: %08x %08x %08x\n",
> -                     n->nlmsg_len, n->nlmsg_type, n->nlmsg_flags);
> -             return 0;
> -     }
> -     len -= NLMSG_LENGTH(sizeof(*ndtm));
> -     if (len < 0) {
> -             fprintf(stderr, "BUG: wrong nlmsg len %d\n", len);
> -             return -1;
> -     }
> +     print_uint(PRINT_ANY, "key_length",
> +                  "    config key_len %u ", ndtc->ndtc_key_len);
> +     print_uint(PRINT_ANY, "entry_size",
> +                  "entry_size %u ", ndtc->ndtc_entry_size);

this one has a number of places where the second line is misaligned.

Reply via email to