-
Notifications
You must be signed in to change notification settings - Fork 666
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
Refactor of PcapRemoteDeviceList
's factory functions.
#1476
Merged
tigercosmos
merged 10 commits into
seladb:dev
from
Dimi1010:refactor/remote-list-factories
Jul 17, 2024
Merged
Refactor of PcapRemoteDeviceList
's factory functions.
#1476
tigercosmos
merged 10 commits into
seladb:dev
from
Dimi1010:refactor/remote-list-factories
Jul 17, 2024
Commits on Jun 30, 2024
-
Refactor PcapRemoteDeviceList with smart pointers
- Introduced `createRemoteDeviceList` static methods in `PcapRemoteDeviceList` for creating and managing remote device lists using `std::unique_ptr`, enhancing memory management and safety. - Modified existing `getRemoteDeviceList` methods to utilize new `createRemoteDeviceList` methods, maintaining backward compatibility by returning raw pointers through `.release()`. - Adopted smart pointers (`std::unique_ptr`) in the implementation for automatic memory cleanup, reducing the risk of memory leaks and improving code maintainability. - Modernized the codebase by leveraging C++11 smart pointers, simplifying resource management and providing a clearer, more flexible API for handling remote device lists with and without authentication.
Configuration menu - View commit details
-
Copy full SHA for af785be - Browse repository at this point
Copy the full SHA af785beView commit details -
Refactor iterator type aliases in PcapRemoteDeviceList
Modernized the syntax for defining iterator and const iterator type aliases in `PcapRemoteDeviceList.h` within the `pcpp` namespace. Replaced traditional `typedef` with the `using` syntax for `RemoteDeviceListIterator` and `ConstRemoteDeviceListIterator`. These changes enhance code readability and align with modern C++ best practices without altering functionality.
Configuration menu - View commit details
-
Copy full SHA for d610fbe - Browse repository at this point
Copy the full SHA d610fbeView commit details -
Enhance PcapRemoteDeviceList construction
- Removed the default constructor of 'PcapRemoteDeviceList'. - Added a new constructor to `PcapRemoteDeviceList` for initializing with detailed remote machine info and authentication. - Corrected typographical errors in comments for better documentation clarity. - Improved const-correctness in `createRemoteDeviceList` by changing `remoteAuth` parameter type. - Refactored device creation logic in `createRemoteDeviceList` for clearer error handling and separation of concerns. - Enhanced error handling in device creation to prevent memory leaks on exceptions. - Transitioned to using `std::shared_ptr<PcapRemoteAuthentication>` for better memory management in device creation. - Simplified authentication object handling by converting to `std::shared_ptr` early in the device creation process.
Configuration menu - View commit details
-
Copy full SHA for 6f5cc0d - Browse repository at this point
Copy the full SHA 6f5cc0dView commit details -
Configuration menu - View commit details
-
Copy full SHA for 1a257b7 - Browse repository at this point
Copy the full SHA 1a257b7View commit details -
Refactor PcapRemoteDeviceList creation
- Included DeprecationUtils.h in PcapRemoteDeviceList.h to mark certain functionalities as deprecated, indicating a move towards newer alternatives. - Updated the private constructor comment in PcapRemoteDeviceList to recommend using `createRemoteDeviceList` for instance creation, reflecting a shift to a new factory method. - Deprecated two static factory functions, `getRemoteDeviceList(const IPAddress& ipAddress, uint16_t port)` and `getRemoteDeviceList(const IPAddress& ipAddress, uint16_t port, PcapRemoteAuthentication* remoteAuth)`, in favor of `createRemoteDeviceList`, enhancing memory safety and functionality.
Configuration menu - View commit details
-
Copy full SHA for 6916da3 - Browse repository at this point
Copy the full SHA 6916da3View commit details
Commits on Jul 3, 2024
-
Configuration menu - View commit details
-
Copy full SHA for edfa5de - Browse repository at this point
Copy the full SHA edfa5deView commit details -
Configuration menu - View commit details
-
Copy full SHA for 4f66704 - Browse repository at this point
Copy the full SHA 4f66704View commit details -
Configuration menu - View commit details
-
Copy full SHA for 2d637c4 - Browse repository at this point
Copy the full SHA 2d637c4View commit details
Commits on Jul 7, 2024
-
Configuration menu - View commit details
-
Copy full SHA for 0f8f3b0 - Browse repository at this point
Copy the full SHA 0f8f3b0View commit details -
Configuration menu - View commit details
-
Copy full SHA for cf3d1c2 - Browse repository at this point
Copy the full SHA cf3d1c2View commit details
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.