agent: Add more Rust code examples, update TODO check (#28737)
Release Notes: - N/A
This commit is contained in:
parent
d0f806456c
commit
b1e4e6048a
38 changed files with 142 additions and 2 deletions
3
crates/eval/examples/add_arp_protocol_support/base.toml
Normal file
3
crates/eval/examples/add_arp_protocol_support/base.toml
Normal file
|
@ -0,0 +1,3 @@
|
|||
url = "https://github.com/GyulyVGC/sniffnet.git"
|
||||
revision = "cfb5b6519bd7838f279e5be9d360445aaffaa647"
|
||||
language_extension = "rs"
|
16
crates/eval/examples/add_arp_protocol_support/criteria.md
Normal file
16
crates/eval/examples/add_arp_protocol_support/criteria.md
Normal 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.
|
1
crates/eval/examples/add_arp_protocol_support/prompt.md
Normal file
1
crates/eval/examples/add_arp_protocol_support/prompt.md
Normal 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 don’t 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.
|
Loading…
Add table
Add a link
Reference in a new issue