scapy
scapy copied to clipboard
Cleanup getmacbyip and add in4_is*
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 inutils.py - cleanup
getmacbyip. use those functions - minor cleanups to
utils6.py
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: |
FTR, flake8 complains about an import error