{
if (mode >= ARRAY_SIZE(hw_mode))
print_0xhex(PRINT_ANY, "hwmode",
- "hwmode %#hx ", mode);
+ "hwmode %#llx ", mode);
else
print_string(PRINT_ANY, "hwmode",
"hwmode %s ", hw_mode[mode]);
if (is_json_context())
print_uint(PRINT_JSON, "operstate_index", NULL, state);
else
- print_0xhex(PRINT_FP, NULL, "state %#x", state);
+ print_0xhex(PRINT_FP, NULL, "state %#llx", state);
} else if (brief) {
print_color_string(PRINT_ANY,
oper_state_color(state),
if (tb[IFLA_BR_GROUP_FWD_MASK])
print_0xhex(PRINT_ANY,
"group_fwd_mask",
- "group_fwd_mask %#x ",
+ "group_fwd_mask %#llx ",
rta_getattr_u16(tb[IFLA_BR_GROUP_FWD_MASK]));
if (tb[IFLA_BR_GROUP_ADDR]) {
rta_getattr_u8(tb[IFLA_BRPORT_UNICAST_FLOOD]));
if (tb[IFLA_BRPORT_ID])
- print_0xhex(PRINT_ANY, "id", "port_id 0x%x ",
+ print_0xhex(PRINT_ANY, "id", "port_id %#llx ",
rta_getattr_u16(tb[IFLA_BRPORT_ID]));
if (tb[IFLA_BRPORT_NO])
- print_0xhex(PRINT_ANY, "no", "port_no 0x%x ",
+ print_0xhex(PRINT_ANY, "no", "port_no %#llx ",
rta_getattr_u16(tb[IFLA_BRPORT_NO]));
if (tb[IFLA_BRPORT_DESIGNATED_PORT])
fwd_mask = rta_getattr_u16(tb[IFLA_BRPORT_GROUP_FWD_MASK]);
print_0xhex(PRINT_ANY, "group_fwd_mask",
- "group_fwd_mask 0x%x ", fwd_mask);
+ "group_fwd_mask %#llx ", fwd_mask);
_bitmask2str(fwd_mask, convbuf, sizeof(convbuf), fwd_mask_tbl);
print_string(PRINT_ANY, "group_fwd_mask_str",
"group_fwd_mask_str %s ", convbuf);
tos = rta_getattr_u8(tb[IFLA_GENEVE_TOS]);
if (tos) {
if (is_json_context() || tos != 1)
- print_0xhex(PRINT_ANY, "tos", "tos 0x%x ", tos);
+ print_0xhex(PRINT_ANY, "tos", "tos %#llx ", tos);
else
print_string(PRINT_FP, NULL, "tos %s ", "inherit");
}
if (label)
print_0xhex(PRINT_ANY,
- "label",
- "flowlabel %#x ",
+ "label", "flowlabel %#llx ",
ntohl(label));
}
tos = rta_getattr_u8(tb[IFLA_VXLAN_TOS]);
if (tos) {
if (is_json_context() || tos != 1)
- print_0xhex(PRINT_ANY, "tos", "tos 0x%x ", tos);
+ print_0xhex(PRINT_ANY, "tos", "tos %#llx ", tos);
else
print_string(PRINT_FP, NULL, "tos %s ", "inherit");
}
__u32 label = rta_getattr_u32(tb[IFLA_VXLAN_LABEL]);
if (label)
- print_0xhex(PRINT_ANY,
- "label",
- "flowlabel %#x ",
- ntohl(label));
+ print_0xhex(PRINT_ANY, "label",
+ "flowlabel %#llx ", ntohl(label));
}
if (tb[IFLA_VXLAN_AGEING]) {
print_uint(PRINT_ANY, "hash_rnd",
" hash_rnd %u ", ndtc->ndtc_hash_rnd);
print_0xhex(PRINT_ANY, "hash_mask",
- "hash_mask %08x ", ndtc->ndtc_hash_mask);
+ "hash_mask %08llx ", ndtc->ndtc_hash_mask);
print_uint(PRINT_ANY, "hash_chain_gc",
"hash_chain_gc %u ", ndtc->ndtc_hash_chain_gc);
if (features)
print_0xhex(PRINT_ANY,
- "features", "0x%x ", of);
+ "features", "%#llx ", of);
}
static void print_rt_flags(FILE *fp, unsigned int flags)
}
if (ci->rta_id)
print_0xhex(PRINT_ANY, "ipid",
- "ipid 0x%04x ", ci->rta_id);
+ "ipid 0x%04llx ", ci->rta_id);
if (ci->rta_ts || ci->rta_tsage) {
print_0xhex(PRINT_ANY, "ts",
- "ts 0x%x", ci->rta_ts);
+ "ts 0x%llx", ci->rta_ts);
print_uint(PRINT_ANY, "tsage",
"tsage %usec ", ci->rta_tsage);
}
print_uint(PRINT_JSON, "mark", NULL, mark);
else if (mark >= 16)
print_0xhex(PRINT_FP, NULL,
- "mark 0x%x ", mark);
+ "mark 0x%llx ", mark);
else
print_uint(PRINT_FP, NULL,
"mark %u ", mark);
tlv = (struct sr6_tlv_hmac *)((char *)srh + offset);
print_0xhex(PRINT_ANY, "hmac",
- "hmac 0x%X ", ntohl(tlv->hmackeyid));
+ "hmac %llX ", ntohl(tlv->hmackeyid));
}
}
if (tb[FRA_FWMASK] &&
(mask = rta_getattr_u32(tb[FRA_FWMASK])) != 0xFFFFFFFF) {
- print_0xhex(PRINT_ANY, "fwmark", "fwmark 0x%x", mark);
- print_0xhex(PRINT_ANY, "fwmask", "/0x%x ", mask);
+ print_0xhex(PRINT_ANY, "fwmark", "fwmark %#llx", mark);
+ print_0xhex(PRINT_ANY, "fwmask", "/%#llx ", mask);
} else {
- print_0xhex(PRINT_ANY, "fwmark", "fwmark 0x%x ", mark);
+ print_0xhex(PRINT_ANY, "fwmark", "fwmark %#llx ", mark);
}
}
flags &= ~(IFF_TUN | IFF_TAP | IFF_NO_PI | IFF_ONE_QUEUE |
IFF_VNET_HDR | IFF_PERSIST | IFF_NOFILTER);
if (flags)
- print_0xhex(PRINT_ANY, NULL, "%#x", flags);
+ print_0xhex(PRINT_ANY, NULL, "%#llx", flags);
close_json_array(PRINT_JSON, NULL);
}
tos = rta_getattr_u8(tb[IFLA_GRE_TOS]);
if (tos) {
if (is_json_context() || tos != 1)
- print_0xhex(PRINT_ANY, "tos", "tos 0x%x ", tos);
+ print_0xhex(PRINT_ANY, "tos", "tos %#llx ", tos);
else
print_string(PRINT_FP, NULL, "tos %s ", "inherit");
}
if (fwmark) {
print_0xhex(PRINT_ANY,
- "fwmark", "fwmark 0x%x ", fwmark);
+ "fwmark", "fwmark %#llx ", fwmark);
}
}
__u16 erspan_hwid = rta_getattr_u16(tb[IFLA_GRE_ERSPAN_HWID]);
print_0xhex(PRINT_ANY,
- "erspan_hwid", "erspan_hwid 0x%x ", erspan_hwid);
+ "erspan_hwid", "erspan_hwid %#llx ", erspan_hwid);
}
tnl_print_encap(tb,
if (fwmark) {
print_0xhex(PRINT_ANY,
- "fwmark", "fwmark 0x%x ", fwmark);
+ "fwmark", "fwmark %#llx ", fwmark);
}
}
__u16 erspan_hwid = rta_getattr_u16(tb[IFLA_GRE_ERSPAN_HWID]);
print_0xhex(PRINT_ANY,
- "erspan_hwid", "erspan_hwid 0x%x ", erspan_hwid);
+ "erspan_hwid", "erspan_hwid %#llx ", erspan_hwid);
}
tnl_print_encap(tb,
if (fwmark) {
print_0xhex(PRINT_ANY,
- "fwmark", "fwmark 0x%x ", fwmark);
+ "fwmark", "fwmark %#llx ", fwmark);
}
}
tos = rta_getattr_u8(tb[IFLA_IPTUN_TOS]);
if (tos) {
if (is_json_context() || tos != 1)
- print_0xhex(PRINT_ANY, "tos", "tos 0x%x ", tos);
+ print_0xhex(PRINT_ANY, "tos", "tos %#llx ", tos);
else
print_string(PRINT_FP, NULL, "tos %s ", "inherit");
}
if (fwmark) {
print_0xhex(PRINT_ANY,
- "fwmark", "fwmark 0x%x ", fwmark);
+ "fwmark", "fwmark %#llx ", fwmark);
}
}
if (fwmark) {
print_0xhex(PRINT_ANY,
- "fwmark", "fwmark 0x%x ", fwmark);
+ "fwmark", "fwmark %#llx ", fwmark);
}
}
}
if (fwmark) {
print_0xhex(PRINT_ANY,
- "fwmark", "fwmark 0x%x ", fwmark);
+ "fwmark", "fwmark %#llx ", fwmark);
}
}
}
if (tb[TCA_IFE_TYPE]) {
ife_type = rta_getattr_u16(tb[TCA_IFE_TYPE]);
has_optional = 1;
- print_0xhex(PRINT_ANY, "type", "type 0x%X ", ife_type);
+ print_0xhex(PRINT_ANY, "type", "type %#llX ", ife_type);
}
if (has_optional)
if (RTA_PAYLOAD(tb[TCA_HTB_INIT]) < sizeof(*gopt)) return -1;
print_int(PRINT_ANY, "r2q", "r2q %d", gopt->rate2quantum);
- print_0xhex(PRINT_ANY, "default", " default %x", gopt->defcls);
+ print_0xhex(PRINT_ANY, "default", " default %#llx", gopt->defcls);
print_uint(PRINT_ANY, "direct_packets_stat",
" direct_packets_stat %u", gopt->direct_pkts);
if (show_details) {
open_json_object(NULL);
print_uint(PRINT_ANY, "index", "\tindex %u", index);
print_string(PRINT_ANY, "cmd", " cmd %s", entry_cmd_to_str(command));
- print_0xhex(PRINT_ANY, "gatemask", " gatemask %#x", gatemask);
+ print_0xhex(PRINT_ANY, "gatemask", " gatemask %#llx", gatemask);
print_uint(PRINT_ANY, "interval", " interval %u", interval);
close_json_object();