scapy icon indicating copy to clipboard operation
scapy copied to clipboard

LLDP add PoE TLV

Open matsievskiysv opened this issue 1 year ago • 6 comments

Checklist:

  • [x] If you are new to Scapy: I have checked CONTRIBUTING.md (esp. section submitting-pull-requests)
  • [x] I squashed commits belonging together
  • [x] I added unit tests or explained why they are not relevant
  • [x] I executed the regression tests (using cd test && ./run_tests or tox)
  • [x] If the PR is still not finished, please create a Draft Pull Request

This PR adds PoE (IEEE802.3bt) organization specific TLVs for LLDP layer

Different versions of PoE TLVs were added as separate classes instead of using ConditionalField to allow the user explicitly instantiate the desired TLV version.

matsievskiysv avatar Apr 09 '24 08:04 matsievskiysv

Unit test failed because tshark is not installed on testing machine

matsievskiysv avatar Apr 09 '24 09:04 matsievskiysv

Codecov Report

Merging #4346 (b736503) into master (0a2b2bc) will decrease coverage by 0.53%. Report is 3 commits behind head on master. The diff coverage is 100.00%.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #4346      +/-   ##
==========================================
- Coverage   82.03%   81.50%   -0.53%     
==========================================
  Files         350      350              
  Lines       82888    83230     +342     
==========================================
- Hits        67994    67836     -158     
- Misses      14894    15394     +500     
Files Coverage Δ
scapy/contrib/lldp.py 94.62% <100.00%> (+2.09%) :arrow_up:

... and 38 files with indirect coverage changes

codecov[bot] avatar Apr 09 '24 09:04 codecov[bot]

Added PoE measure TLV. Again, macos tests are failing because tshark is not installed.

matsievskiysv avatar Apr 11 '24 05:04 matsievskiysv

Changed to use ScalingField everywhere. Yet again, macos check failed because tshark is not installed.

matsievskiysv avatar Apr 16 '24 14:04 matsievskiysv

Found the mistake in LLDPDUPowerViaMDI length. Fixed it and added tshark tests for this TLV (initially I thought it was unsupported by Wireshark)

matsievskiysv avatar Apr 18 '24 07:04 matsievskiysv

Double-checked LLDPDUPowerViaMDIMeasure via Wireshark. For some strange reason, it reports the warning Invalid length, greather then expected even though package length, counting from Org code, is 26 octets long.

matsievskiysv avatar Apr 18 '24 07:04 matsievskiysv