scapy icon indicating copy to clipboard operation
scapy copied to clipboard

Cleanup getmacbyip and add in4_is*

Open gpotter2 opened this issue 1 year ago • 2 comments

I think in6_is* functions are cool, and it's sad they have no equivalent for IPv4. It also makes the code more readable as those functions are very well documented.

This PR:

  • adds in4_is* functions that mimic the IPv6 ones in utils.py
  • cleanup getmacbyip. use those functions
  • minor cleanups to utils6.py

gpotter2 avatar May 12 '24 16:05 gpotter2

Codecov Report

Attention: Patch coverage is 97.14286% with 1 lines in your changes are missing coverage. Please review.

Project coverage is 81.56%. Comparing base (18082f3) to head (044d1b0).

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #4386      +/-   ##
==========================================
- Coverage   81.56%   81.56%   -0.01%     
==========================================
  Files         352      352              
  Lines       83920    83938      +18     
==========================================
+ Hits        68448    68460      +12     
- Misses      15472    15478       +6     
Files Coverage Δ
scapy/layers/inet6.py 88.46% <100.00%> (+<0.01%) :arrow_up:
scapy/layers/l2.py 84.32% <100.00%> (ø)
scapy/utils6.py 87.18% <100.00%> (-0.20%) :arrow_down:
scapy/utils.py 73.12% <96.00%> (+0.26%) :arrow_up:

... and 5 files with indirect coverage changes

codecov[bot] avatar May 12 '24 16:05 codecov[bot]

FTR, flake8 complains about an import error

guedou avatar May 12 '24 18:05 guedou