On 9/28/19 2:22 PM, Roopa Prabhu wrote:
> @@ -518,6 +520,113 @@ static int fdb_modify(int cmd, int flags, int argc, 
> char **argv)
>       return 0;
>  }
>  
> +static int fdb_get(int argc, char **argv)
> +{
> +     struct {
> +             struct nlmsghdr n;
> +             struct ndmsg            ndm;
> +             char                    buf[1024];
> +     } req = {
> +             .n.nlmsg_len = NLMSG_LENGTH(sizeof(struct ndmsg)),
> +             .n.nlmsg_flags = NLM_F_REQUEST,
> +             .n.nlmsg_type = RTM_GETNEIGH,
> +             .ndm.ndm_family = AF_BRIDGE,
> +     };
> +     struct nlmsghdr *answer;
> +     char *addr = NULL;
> +     char  *d = NULL, *br = NULL;
> +     char abuf[ETH_ALEN];
> +     unsigned long vni = ~0;
> +     int br_ifindex = 0;
> +     char *endptr;
> +     short vlan = -1;

iproute2 follows the net standards of reverse xmas tree for declarations.

Reply via email to