示例#1
0
文件: quagga.py 项目: Benocs/core
 def routerid(node):
     ''' Helper to return the first IPv4 address of a node as its router ID.
     '''
     # Use IPv4 loopback address of this node as the routerID.
     # Don't get v4-loopback-addr directly from node as the node might has
     # IPv4 disabled. Instead, directly query the central 'database' for the
     # IPv4 address that would be the nodes IPv4 loopback.
     return str(Loopback.getLoopbackIPv4(node))
示例#2
0
文件: bird.py 项目: Benocs/core
 def routerid(node):
     ''' Helper to return the first IPv4 address of a node as its router ID.
     '''
     return str(Loopback.getLoopbackIPv4(node))