From: Jiri Pirko Date: Thu, 15 May 2014 13:10:22 +0000 (+0200) Subject: iproute2: ipa: show port id X-Git-Tag: v3.15.0~12 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c897067480a0e0fbf6231edf1ded8fc12ca6ad9d;p=thirdparty%2Fiproute2.git iproute2: ipa: show port id Signed-off-by: Jiri Pirko --- diff --git a/ip/ipaddress.c b/ip/ipaddress.c index 32f930e23..ce5e762c5 100644 --- a/ip/ipaddress.c +++ b/ip/ipaddress.c @@ -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]));