agent: Add more Rust code examples, update TODO check (#28737)

Release Notes:

- N/A
This commit is contained in:
Thomas Mickley-Doyle 2025-04-15 11:52:08 -05:00 committed by GitHub
parent d0f806456c
commit b1e4e6048a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
38 changed files with 142 additions and 2 deletions

View file

@ -0,0 +1,3 @@
url = "https://github.com/GyulyVGC/sniffnet.git"
revision = "cfb5b6519bd7838f279e5be9d360445aaffaa647"
language_extension = "rs"

View file

@ -0,0 +1,16 @@
1. **Protocol Enumeration:** Ensure the `Protocol` enum includes the `ARP` variant and is integrated in `Protocol::ALL`.
2. **Packet Analysis Logic:**
- Properly detect ARP packets within `analyze_headers` and `analyze_network_header`.
- Appropriately extract ARP sender/target IPs based on the protocol (IPv4 or IPv6).
- Track and store ARP operations (Request, Reply) using the `ArpType` enum.
3. **Display & User Interface:**
- Accurately represent ARP packet types in the UI (`connection_details_page.rs`) alongside ICMP types.
- Skip displaying service information for ARP packets in line with ICMP behavior.
4. **Data Struct Enhancements:**
- Update `InfoAddressPortPair` to store and count ARP operation types.
- Ensure filtering and presentation logic uses ARP data correctly.
5. **Default Behaviors:**
- Set default `protocol` in `PacketFiltersFields` to `ARP` for consistency.
6. **Testing:**
- Update unit tests for `Protocol::ALL` and `get_service` to account for ARP behavior.
- Confirm that ARP protocol toggling works properly in the GUI protocol filter handling.

View file

@ -0,0 +1 @@
Add full support for the Address Resolution Protocol (ARP) in the packet sniffer. This includes recognizing ARP packets during packet analysis, displaying ARP operation types in the UI, and updating data structures to track ARP-specific metadata. Integrate ARP into the protocol filtering system, update all relevant UI logic to ensure it handles ARP packets similarly to ICMP, and ensure proper test coverage for all new functionality. Update `Protocol::ALL` to include ARP and skip service detection for ARP packets, as they dont use ports. Finally, ensure the `connection_details_page` displays the ARP operation types with counts, using a `pretty_print_types` method similar to ICMP types.