#NEWLINE# @ staticmethod #NEWLINE# def routerid( node ) : #NEWLINE# #INDENT# ' Helper to return the first IPv4 address of a node as its router ID.\n        ' #NEWLINE# for ifc in node . netifs ( ) : #NEWLINE# #INDENT# if ( hasattr ( ifc , 'control' ) and ( ifc . control == True ) ) : #NEWLINE# #INDENT# continue #NEWLINE# #UNINDENT# for a in ifc . addrlist : #NEWLINE# #INDENT# if ( a . find ( '.' ) >= 0 ) : #NEWLINE# #INDENT# return a . split ( '/' ) [ 0 ] #NEWLINE# #UNINDENT# #UNINDENT# #UNINDENT# return '0.0.0.0'