dotpcap / sharppcap

Official repository - Fully managed, cross platform (Windows, Mac, Linux) .NET library for capturing packets
1.28k stars 267 forks source link

Pr400 proposal #403

Closed kayoub5 closed 2 years ago

codecov-commenter commented 2 years ago

Codecov Report

Merging #403 (3de9ac7) into master (f8341ec) will decrease coverage by 0.20%. The diff coverage is 78.26%.

@@            Coverage Diff             @@
##           master     #403      +/-   ##
==========================================
- Coverage   83.18%   82.98%   -0.21%     
==========================================
  Files          49       51       +2     
  Lines        2748     2792      +44     
  Branches      301      307       +6     
==========================================
+ Hits         2286     2317      +31     
- Misses        347      353       +6     
- Partials      115      122       +7     
Flag Coverage Δ
linux ?
macos ?
windows_2019_npcap ?
windows_2019_winpcap ?
windows_2022_npcap ?

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
SharpPcap/LibPcap/CaptureFileReaderDevice.cs 70.00% <ø> (-10.49%) :arrow_down:
SharpPcap/LibPcap/LibPcapSafeNativeMethods.cs 58.97% <66.66%> (-7.70%) :arrow_down:
SharpPcap/LibPcap/CaptureHandleReaderDevice.cs 78.26% <78.26%> (ø)
SharpPcap/LibPcap/PcapHandle.cs 91.66% <83.33%> (-8.34%) :arrow_down:
SharpPcap/LibPcap/CaptureReaderDevice.cs 100.00% <100.00%> (ø)
SharpPcap/LibPcap/PcapDeviceCaptureLoop.cs 87.80% <100.00%> (ø)
SharpPcap/LibPcap/CaptureFileWriterDevice.cs 80.00% <0.00%> (-5.00%) :arrow_down:
SharpPcap/LibPcap/LibPcapLiveDevice.cs 74.45% <0.00%> (-3.81%) :arrow_down:
... and 4 more

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 f8341ec...3de9ac7. Read the comment docs.

heck-gd commented 2 years ago

Your changes look good to me. The SetHandleAsInvalid call can now be removed from CaptureHandleReaderDevice.Close(), since it's being taken care of by closing the PcapFileHandle, right?

kayoub5 commented 2 years ago

Your changes look good to me. The SetHandleAsInvalid call can now be removed from CaptureHandleReaderDevice.Close(), since it's being taken care of by closing the PcapFileHandle, right?

yes