Lines Matching +refs:link +refs:stats +refs:attrs
69 int (*format)(struct tipc_nl_compat_msg *msg, struct nlattr **attrs);
212 info.info.attrs = attrbuf; in __tipc_nl_compat_dumpit()
356 info.attrs = attrbuf; in __tipc_nl_compat_doit()
406 struct nlattr **attrs) in tipc_nl_compat_bearer_dump() argument
411 if (!attrs[TIPC_NLA_BEARER]) in tipc_nl_compat_bearer_dump()
415 attrs[TIPC_NLA_BEARER], NULL, NULL); in tipc_nl_compat_bearer_dump()
503 struct nlattr *prop[], struct nlattr *stats[]) in __fill_bc_link_stat() argument
510 nla_get_u32(stats[TIPC_NLA_STATS_RX_INFO]), in __fill_bc_link_stat()
511 nla_get_u32(stats[TIPC_NLA_STATS_RX_FRAGMENTS]), in __fill_bc_link_stat()
512 nla_get_u32(stats[TIPC_NLA_STATS_RX_FRAGMENTED]), in __fill_bc_link_stat()
513 nla_get_u32(stats[TIPC_NLA_STATS_RX_BUNDLES]), in __fill_bc_link_stat()
514 nla_get_u32(stats[TIPC_NLA_STATS_RX_BUNDLED])); in __fill_bc_link_stat()
518 nla_get_u32(stats[TIPC_NLA_STATS_TX_INFO]), in __fill_bc_link_stat()
519 nla_get_u32(stats[TIPC_NLA_STATS_TX_FRAGMENTS]), in __fill_bc_link_stat()
520 nla_get_u32(stats[TIPC_NLA_STATS_TX_FRAGMENTED]), in __fill_bc_link_stat()
521 nla_get_u32(stats[TIPC_NLA_STATS_TX_BUNDLES]), in __fill_bc_link_stat()
522 nla_get_u32(stats[TIPC_NLA_STATS_TX_BUNDLED])); in __fill_bc_link_stat()
525 nla_get_u32(stats[TIPC_NLA_STATS_RX_NACKS]), in __fill_bc_link_stat()
526 nla_get_u32(stats[TIPC_NLA_STATS_RX_DEFERRED]), in __fill_bc_link_stat()
527 nla_get_u32(stats[TIPC_NLA_STATS_DUPLICATES])); in __fill_bc_link_stat()
530 nla_get_u32(stats[TIPC_NLA_STATS_TX_NACKS]), in __fill_bc_link_stat()
531 nla_get_u32(stats[TIPC_NLA_STATS_TX_ACKS]), in __fill_bc_link_stat()
532 nla_get_u32(stats[TIPC_NLA_STATS_RETRANSMITTED])); in __fill_bc_link_stat()
536 nla_get_u32(stats[TIPC_NLA_STATS_LINK_CONGS]), in __fill_bc_link_stat()
537 nla_get_u32(stats[TIPC_NLA_STATS_MAX_QUEUE]), in __fill_bc_link_stat()
538 nla_get_u32(stats[TIPC_NLA_STATS_AVG_QUEUE])); in __fill_bc_link_stat()
542 struct nlattr **attrs) in tipc_nl_compat_link_stat_dump() argument
545 struct nlattr *link[TIPC_NLA_LINK_MAX + 1]; in tipc_nl_compat_link_stat_dump() local
547 struct nlattr *stats[TIPC_NLA_STATS_MAX + 1]; in tipc_nl_compat_link_stat_dump() local
551 if (!attrs[TIPC_NLA_LINK]) in tipc_nl_compat_link_stat_dump()
554 err = nla_parse_nested_deprecated(link, TIPC_NLA_LINK_MAX, in tipc_nl_compat_link_stat_dump()
555 attrs[TIPC_NLA_LINK], NULL, NULL); in tipc_nl_compat_link_stat_dump()
559 if (!link[TIPC_NLA_LINK_PROP]) in tipc_nl_compat_link_stat_dump()
563 link[TIPC_NLA_LINK_PROP], NULL, in tipc_nl_compat_link_stat_dump()
568 if (!link[TIPC_NLA_LINK_STATS]) in tipc_nl_compat_link_stat_dump()
571 err = nla_parse_nested_deprecated(stats, TIPC_NLA_STATS_MAX, in tipc_nl_compat_link_stat_dump()
572 link[TIPC_NLA_LINK_STATS], NULL, in tipc_nl_compat_link_stat_dump()
587 if (strcmp(name, nla_data(link[TIPC_NLA_LINK_NAME])) != 0) in tipc_nl_compat_link_stat_dump()
591 (char *)nla_data(link[TIPC_NLA_LINK_NAME])); in tipc_nl_compat_link_stat_dump()
593 if (link[TIPC_NLA_LINK_BROADCAST]) { in tipc_nl_compat_link_stat_dump()
594 __fill_bc_link_stat(msg, prop, stats); in tipc_nl_compat_link_stat_dump()
598 if (link[TIPC_NLA_LINK_ACTIVE]) in tipc_nl_compat_link_stat_dump()
600 else if (link[TIPC_NLA_LINK_UP]) in tipc_nl_compat_link_stat_dump()
606 nla_get_u32(link[TIPC_NLA_LINK_MTU]), in tipc_nl_compat_link_stat_dump()
615 nla_get_u32(link[TIPC_NLA_LINK_RX]) - in tipc_nl_compat_link_stat_dump()
616 nla_get_u32(stats[TIPC_NLA_STATS_RX_INFO]), in tipc_nl_compat_link_stat_dump()
617 nla_get_u32(stats[TIPC_NLA_STATS_RX_FRAGMENTS]), in tipc_nl_compat_link_stat_dump()
618 nla_get_u32(stats[TIPC_NLA_STATS_RX_FRAGMENTED]), in tipc_nl_compat_link_stat_dump()
619 nla_get_u32(stats[TIPC_NLA_STATS_RX_BUNDLES]), in tipc_nl_compat_link_stat_dump()
620 nla_get_u32(stats[TIPC_NLA_STATS_RX_BUNDLED])); in tipc_nl_compat_link_stat_dump()
624 nla_get_u32(link[TIPC_NLA_LINK_TX]) - in tipc_nl_compat_link_stat_dump()
625 nla_get_u32(stats[TIPC_NLA_STATS_TX_INFO]), in tipc_nl_compat_link_stat_dump()
626 nla_get_u32(stats[TIPC_NLA_STATS_TX_FRAGMENTS]), in tipc_nl_compat_link_stat_dump()
627 nla_get_u32(stats[TIPC_NLA_STATS_TX_FRAGMENTED]), in tipc_nl_compat_link_stat_dump()
628 nla_get_u32(stats[TIPC_NLA_STATS_TX_BUNDLES]), in tipc_nl_compat_link_stat_dump()
629 nla_get_u32(stats[TIPC_NLA_STATS_TX_BUNDLED])); in tipc_nl_compat_link_stat_dump()
633 nla_get_u32(stats[TIPC_NLA_STATS_MSG_LEN_CNT]), in tipc_nl_compat_link_stat_dump()
634 nla_get_u32(stats[TIPC_NLA_STATS_MSG_LEN_TOT]) / in tipc_nl_compat_link_stat_dump()
635 nla_get_u32(stats[TIPC_NLA_STATS_MSG_PROF_TOT])); in tipc_nl_compat_link_stat_dump()
639 perc(nla_get_u32(stats[TIPC_NLA_STATS_MSG_LEN_P0]), in tipc_nl_compat_link_stat_dump()
640 nla_get_u32(stats[TIPC_NLA_STATS_MSG_PROF_TOT])), in tipc_nl_compat_link_stat_dump()
641 perc(nla_get_u32(stats[TIPC_NLA_STATS_MSG_LEN_P1]), in tipc_nl_compat_link_stat_dump()
642 nla_get_u32(stats[TIPC_NLA_STATS_MSG_PROF_TOT])), in tipc_nl_compat_link_stat_dump()
643 perc(nla_get_u32(stats[TIPC_NLA_STATS_MSG_LEN_P2]), in tipc_nl_compat_link_stat_dump()
644 nla_get_u32(stats[TIPC_NLA_STATS_MSG_PROF_TOT])), in tipc_nl_compat_link_stat_dump()
645 perc(nla_get_u32(stats[TIPC_NLA_STATS_MSG_LEN_P3]), in tipc_nl_compat_link_stat_dump()
646 nla_get_u32(stats[TIPC_NLA_STATS_MSG_PROF_TOT]))); in tipc_nl_compat_link_stat_dump()
649 perc(nla_get_u32(stats[TIPC_NLA_STATS_MSG_LEN_P4]), in tipc_nl_compat_link_stat_dump()
650 nla_get_u32(stats[TIPC_NLA_STATS_MSG_PROF_TOT])), in tipc_nl_compat_link_stat_dump()
651 perc(nla_get_u32(stats[TIPC_NLA_STATS_MSG_LEN_P5]), in tipc_nl_compat_link_stat_dump()
652 nla_get_u32(stats[TIPC_NLA_STATS_MSG_PROF_TOT])), in tipc_nl_compat_link_stat_dump()
653 perc(nla_get_u32(stats[TIPC_NLA_STATS_MSG_LEN_P6]), in tipc_nl_compat_link_stat_dump()
654 nla_get_u32(stats[TIPC_NLA_STATS_MSG_PROF_TOT]))); in tipc_nl_compat_link_stat_dump()
658 nla_get_u32(stats[TIPC_NLA_STATS_RX_STATES]), in tipc_nl_compat_link_stat_dump()
659 nla_get_u32(stats[TIPC_NLA_STATS_RX_PROBES]), in tipc_nl_compat_link_stat_dump()
660 nla_get_u32(stats[TIPC_NLA_STATS_RX_NACKS]), in tipc_nl_compat_link_stat_dump()
661 nla_get_u32(stats[TIPC_NLA_STATS_RX_DEFERRED]), in tipc_nl_compat_link_stat_dump()
662 nla_get_u32(stats[TIPC_NLA_STATS_DUPLICATES])); in tipc_nl_compat_link_stat_dump()
666 nla_get_u32(stats[TIPC_NLA_STATS_TX_STATES]), in tipc_nl_compat_link_stat_dump()
667 nla_get_u32(stats[TIPC_NLA_STATS_TX_PROBES]), in tipc_nl_compat_link_stat_dump()
668 nla_get_u32(stats[TIPC_NLA_STATS_TX_NACKS]), in tipc_nl_compat_link_stat_dump()
669 nla_get_u32(stats[TIPC_NLA_STATS_TX_ACKS]), in tipc_nl_compat_link_stat_dump()
670 nla_get_u32(stats[TIPC_NLA_STATS_RETRANSMITTED])); in tipc_nl_compat_link_stat_dump()
674 nla_get_u32(stats[TIPC_NLA_STATS_LINK_CONGS]), in tipc_nl_compat_link_stat_dump()
675 nla_get_u32(stats[TIPC_NLA_STATS_MAX_QUEUE]), in tipc_nl_compat_link_stat_dump()
676 nla_get_u32(stats[TIPC_NLA_STATS_AVG_QUEUE])); in tipc_nl_compat_link_stat_dump()
682 struct nlattr **attrs) in tipc_nl_compat_link_dump() argument
684 struct nlattr *link[TIPC_NLA_LINK_MAX + 1]; in tipc_nl_compat_link_dump() local
688 if (!attrs[TIPC_NLA_LINK]) in tipc_nl_compat_link_dump()
691 err = nla_parse_nested_deprecated(link, TIPC_NLA_LINK_MAX, in tipc_nl_compat_link_dump()
692 attrs[TIPC_NLA_LINK], NULL, NULL); in tipc_nl_compat_link_dump()
696 link_info.dest = htonl(nla_get_flag(link[TIPC_NLA_LINK_DEST])); in tipc_nl_compat_link_dump()
697 link_info.up = htonl(nla_get_flag(link[TIPC_NLA_LINK_UP])); in tipc_nl_compat_link_dump()
698 nla_strscpy(link_info.str, link[TIPC_NLA_LINK_NAME], in tipc_nl_compat_link_dump()
779 struct nlattr *link; in __tipc_nl_compat_link_set() local
784 link = nla_nest_start_noflag(skb, TIPC_NLA_LINK); in __tipc_nl_compat_link_set()
785 if (!link) in __tipc_nl_compat_link_set()
797 nla_nest_end(skb, link); in __tipc_nl_compat_link_set()
842 struct nlattr *link; in tipc_nl_compat_link_reset_stats() local
847 link = nla_nest_start_noflag(skb, TIPC_NLA_LINK); in tipc_nl_compat_link_reset_stats()
848 if (!link) in tipc_nl_compat_link_reset_stats()
862 nla_nest_end(skb, link); in tipc_nl_compat_link_reset_stats()
895 struct nlattr **attrs) in tipc_nl_compat_name_table_dump() argument
906 if (!attrs[TIPC_NLA_NAME_TABLE]) in tipc_nl_compat_name_table_dump()
910 attrs[TIPC_NLA_NAME_TABLE], NULL, in tipc_nl_compat_name_table_dump()
970 struct nlattr **attrs) in __tipc_nl_compat_publ_dump() argument
976 if (!attrs[TIPC_NLA_PUBL]) in __tipc_nl_compat_publ_dump()
980 attrs[TIPC_NLA_PUBL], NULL, NULL); in __tipc_nl_compat_publ_dump()
1040 struct nlattr **attrs) in tipc_nl_compat_sk_dump() argument
1046 if (!attrs[TIPC_NLA_SOCK]) in tipc_nl_compat_sk_dump()
1050 attrs[TIPC_NLA_SOCK], NULL, NULL); in tipc_nl_compat_sk_dump()
1094 struct nlattr **attrs) in tipc_nl_compat_media_dump() argument
1099 if (!attrs[TIPC_NLA_MEDIA]) in tipc_nl_compat_media_dump()
1103 attrs[TIPC_NLA_MEDIA], NULL, NULL); in tipc_nl_compat_media_dump()
1113 struct nlattr **attrs) in tipc_nl_compat_node_dump() argument
1119 if (!attrs[TIPC_NLA_NODE]) in tipc_nl_compat_node_dump()
1123 attrs[TIPC_NLA_NODE], NULL, NULL); in tipc_nl_compat_node_dump()
1160 struct nlattr **attrs) in tipc_nl_compat_net_dump() argument
1166 if (!attrs[TIPC_NLA_NET]) in tipc_nl_compat_net_dump()
1170 attrs[TIPC_NLA_NET], NULL, NULL); in tipc_nl_compat_net_dump()