-
Notifications
You must be signed in to change notification settings - Fork 684
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Consolidate shared DeviceList functionality under a common base class. #1488
base: dev
Are you sure you want to change the base?
Conversation
- Deprecated `getPcapLiveDevicesList` in favor of the iteration API.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
- Added iterator API - Added iterator type aliases. - Deprecated getPfRingDevicesList. - Updated calls to getPfRingDevicesList.
@tigercosmos added |
…-management Conflicts: Pcap++/header/PcapRemoteDeviceList.h Pcap++/src/PcapRemoteDeviceList.cpp
@Dimi1010 CI fails for some reason in generating the codecov report, and idea why? 🤔 |
I have the same issue in my MR I didn't touch to the code at all |
@clementperon gcovr also complains about a new file version when it compares the file to the file in
|
…-management # Conflicts: # Pcap++/src/PcapLiveDeviceList.cpp # Pcap++/src/PcapRemoteDeviceList.cpp # Tests/Pcap++Test/Tests/LiveDeviceTests.cpp
@seladb can we revisit this one for merge? |
# Conflicts: # Common++/header/PointerVector.h
…-management # Conflicts: # Pcap++/CMakeLists.txt # Tests/Pcap++Test/CMakeLists.txt
…-management # Conflicts: # Common++/header/PointerVector.h # Pcap++/header/DpdkDeviceList.h # Pcap++/header/KniDevice.h # Pcap++/header/KniDeviceList.h # Pcap++/header/PcapLiveDeviceList.h # Pcap++/header/PcapRemoteDeviceList.h # Pcap++/header/PfRingDeviceList.h
- Default path now returns a nullptr if the IP is neither v4 or v6.
Summary
This is a rework of #1431, parts 1 and 2.
The list classes now provide direct functions for iteration and fetching devices. The previous approach of retrieving another 'List' from a 'List' class was redundant and tied the internal implementation to it, making future changes more difficult.
Changes:
PointerVector:
PointerVector<T, Deleter>
.DeviceListBase:
DeviceListBase<DeviceType>
to implement common functionality shared among device lists.PointerVector<DeviceType>
member variable.at()
,front()
,back()
.begin()
,end()
,cbegin()
,cend()
.size()
,empty()
.Refactoring:
DeviceListBase
.RemoteDeviceList
, which is now superseded by the inherited iterator API fromDeviceListBase
.getPcap*DevicesList
methods, which have been superseded by the direct accessor methods provided byDeviceListBase
.Affected Lists:
PcapLiveDeviceList
PfRingDeviceList
DpdkDeviceList
Deprecated Methods: