#NEWLINE# def td_v2( self , m ) : #NEWLINE# #INDENT# global peer #NEWLINE# self . type = 'TABLE_DUMP2' #NEWLINE# self . flag = 'B' #NEWLINE# self . ts = self . ts #NEWLINE# if ( m . subtype == TD_V2_ST [ 'PEER_INDEX_TABLE' ] ) : #NEWLINE# #INDENT# peer = copy . copy ( m . peer . entry ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( ( m . subtype == TD_V2_ST [ 'RIB_IPV4_UNICAST' ] ) or ( m . subtype == TD_V2_ST [ 'RIB_IPV4_MULTICAST' ] ) or ( m . subtype == TD_V2_ST [ 'RIB_IPV6_UNICAST' ] ) or ( m . subtype == TD_V2_ST [ 'RIB_IPV6_MULTICAST' ] ) ) : #NEWLINE# #INDENT# self . num = m . rib . seq #NEWLINE# self . nlri . append ( ( '%s/%d' % ( m . rib . prefix , m . rib . plen ) ) ) #NEWLINE# for entry in m . rib . entry : #NEWLINE# #INDENT# self . org_time = entry . org_time #NEWLINE# self . peer_ip = peer [ entry . peer_index ] . ip #NEWLINE# self . peer_as = peer [ entry . peer_index ] . asn #NEWLINE# self . as_path = [ ] #NEWLINE# self . origin = '' #NEWLINE# self . next_hop = [ ] #NEWLINE# self . local_pref = 0 #NEWLINE# self . med = 0 #NEWLINE# self . comm = '' #NEWLINE# self . atomic_aggr = 'NAG' #NEWLINE# self . aggr = '' #NEWLINE# self . as4_path = [ ] #NEWLINE# self . as4_aggr = '' #NEWLINE# for attr in entry . attr : #NEWLINE# #INDENT# self . bgp_attr ( attr ) #NEWLINE# #UNINDENT# self . print_routes ( )