iproute2: ipa: show port id

Signed-off-by: Jiri Pirko <jiri@resnulli.us>
This commit is contained in:
Jiri Pirko 2014-05-15 15:10:22 +02:00 committed by Stephen Hemminger
parent 288abf513f
commit c897067480
1 changed files with 8 additions and 0 deletions

View 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]));