• Richard Alpe's avatar
    tipc: add link get/dump to new netlink api · 7be57fc6
    Richard Alpe authored
    Add TIPC_NL_LINK_GET command to the new tipc netlink API.
    
    This command supports dumping all information about all links
    (including the broadcast link) or getting all information about a
    specific link (not the broadcast link).
    
    The information about a link includes name, transmission info,
    properties and link statistics.
    
    As the tipc broadcast link is special we unfortunately have to treat
    it specially. It is a deliberate decision not to abstract the
    broadcast link on this (API) level.
    
    Netlink logical layout of link response message:
        -> port
            -> name
            -> MTU
            -> RX
            -> TX
            -> up flag
            -> active flag
            -> properties
               -> priority
               -> tolerance
               -> window
            -> statistics
                -> rx_info
                -> rx_fragments
                -> rx_fragmented
                -> rx_bundles
                -> rx_bundled
                -> tx_info
                -> tx_fragments
                -> tx_fragmented
                -> tx_bundles
                -> tx_bundled
                -> msg_prof_tot
                -> msg_len_cnt
                -> msg_len_tot
                -> msg_len_p0
                -> msg_len_p1
                -> msg_len_p2
                -> msg_len_p3
                -> msg_len_p4
                -> msg_len_p5
                -> msg_len_p6
                -> rx_states
                -> rx_probes
                -> rx_nacks
                -> rx_deferred
                -> tx_states
                -> tx_probes
                -> tx_nacks
                -> tx_acks
                -> retransmitted
                -> duplicates
                -> link_congs
                -> max_queue
                -> avg_queue
    Signed-off-by: default avatarRichard Alpe <richard.alpe@ericsson.com>
    Reviewed-by: default avatarErik Hugne <erik.hugne@ericsson.com>
    Reviewed-by: default avatarJon Maloy <jon.maloy@ericsson.com>
    Acked-by: default avatarYing Xue <ying.xue@windriver.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    7be57fc6
bcast.c 27.5 KB