Skip to content

Conversation

smitmartijn
Copy link
Member

…introduce PF_RING captures

Move overarching service orchestration to main.cpp and create dedicated NetworkClient and CaptureService components for better separation of concerns.

New Architecture:

  • main.cpp: Service orchestrator handling both capture and network clients
  • NetworkClient: Manages TCP connection to WhatPulse with auto-reconnect
  • CaptureService: Handles packet capture and interface monitoring only
  • IPacketHandler: Interface for cleaner packet handling abstraction

@smitmartijn smitmartijn requested a review from Copilot September 25, 2025 11:51
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR refactors the PCap service architecture to separate network communication from packet capture logic and introduces PF_RING high-performance packet capture support.

  • Refactors monolithic PcapService into specialized components (NetworkClient and CaptureService)
  • Introduces PF_RING packet capture support with fallback to traditional PCap
  • Creates cleaner interface abstractions with IPacketHandler for packet handling

Reviewed Changes

Copilot reviewed 15 out of 16 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
pfringcapturethread.h/cpp New PF_RING capture thread implementation for high-performance packet capture
networkclient.h/cpp Extracted network communication logic into dedicated NetworkClient component
captureservice.h/cpp New dedicated service for managing packet capture threads and interface monitoring
pcapcapturethread.h/cpp Updated to use IPacketHandler interface instead of direct PcapService dependency
packethandler.h New interface for packet handling abstraction
main.cpp Refactored to orchestrate separate NetworkClient and CaptureService components
logger.h/cpp Renamed DEBUG log level to VERBOSE for consistency

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

…introduce PF_RING captures

Move overarching service orchestration to main.cpp and create dedicated NetworkClient and CaptureService components for better separation of concerns.

New Architecture:
- main.cpp: Service orchestrator handling both capture and network clients
- NetworkClient: Manages TCP connection to WhatPulse with auto-reconnect
- CaptureService: Handles packet capture and interface monitoring only
- IPacketHandler: Interface for cleaner packet handling abstraction
@smitmartijn smitmartijn merged commit 3b7f806 into main Sep 25, 2025
@smitmartijn smitmartijn deleted the feat-pfring-capture branch September 25, 2025 12:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant