]> git.ipfire.org Git - thirdparty/iproute2.git/commitdiff
iproute2: ipa: show port id
authorJiri Pirko <jiri@resnulli.us>
Thu, 15 May 2014 13:10:22 +0000 (15:10 +0200)
committerStephen Hemminger <stephen@networkplumber.org>
Wed, 28 May 2014 23:57:32 +0000 (16:57 -0700)
Signed-off-by: Jiri Pirko <jiri@resnulli.us>
ip/ipaddress.c

index 32f930e2303bff705bdae8d70a934027da65316c..ce5e762c5b206784488532d346cfe64320b5f57d 100644 (file)
@@ -485,6 +485,14 @@ int print_linkinfo(const struct sockaddr_nl *who,
                fprintf(fp, "master %s ", ll_idx_n2a(*(int*)RTA_DATA(tb[IFLA_MASTER]), b1));
        }
 
+       if (tb[IFLA_PHYS_PORT_ID]) {
+               SPRINT_BUF(b1);
+               fprintf(fp, "portid %s ",
+                       hexstring_n2a(RTA_DATA(tb[IFLA_PHYS_PORT_ID]),
+                                     RTA_PAYLOAD(tb[IFLA_PHYS_PORT_ID]),
+                                     b1, sizeof(b1)));
+       }
+
        if (tb[IFLA_OPERSTATE])
                print_operstate(fp, rta_getattr_u8(tb[IFLA_OPERSTATE]));