コード例 #1
0
ファイル: ip_routing.py プロジェクト: AEliu/calibre
 def get_default_route_src_address_api():
     from calibre.utils.iphlpapi import routes
     for route in routes():
         if route.interface and route.destination == '0.0.0.0':
             for addr in get_addresses_for_interface(route.interface):
                 return addr
コード例 #2
0
 def get_default_route_src_address_api():
     from calibre.utils.iphlpapi import routes
     for route in routes():
         if route.interface and route.destination == '0.0.0.0':
             for addr in get_addresses_for_interface(route.interface):
                 return addr