ftao / python-ifcfg

Python cross-platform network interface discovery (ifconfig/ipconfig/ip)
BSD 3-Clause "New" or "Revised" License
55 stars 37 forks source link

Added default interface detection for Windows.. addresses issue #25 #56

Closed dogwynn closed 3 years ago

dogwynn commented 3 years ago

Based on my understanding of ipconfig /all output, the default interface self-advertises by listing a valid IP address as Default Gateway. This PR integrates this into the the WindowsParser class.

dogwynn commented 3 years ago

Ok, some interfaces report a Default Gateway as :: or the IPv6 ~loopback~ Unspecified Address. Fixing.

codecov-commenter commented 3 years ago

Codecov Report

Merging #56 into master will increase coverage by 0.34%. The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #56      +/-   ##
==========================================
+ Coverage   84.67%   85.01%   +0.34%     
==========================================
  Files           4        4              
  Lines         261      267       +6     
==========================================
+ Hits          221      227       +6     
  Misses         40       40              
Impacted Files Coverage Δ
src/ifcfg/parser.py 81.81% <100.00%> (+0.56%) :arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update d936468...47e133c. Read the comment docs.

dogwynn commented 3 years ago

This addresses issue #25