-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[antlir2_vm][net] Add option to dump traffic to a pcap file
Summary: Traffic to/from a qemu netdev can be dumped to a pcap file using the option: ``` -object filter-dump,id=id,netdev=dev[,file=filename][,maxlen=len][,position=head|tail|id=<id>][,insert=behind|before] Dump the network traffic on netdev dev to the file specified by filename. At most len bytes (64k by default) per packet are stored. The file format is libpcap, so it can be analyzed with tools such as tcpdump or Wireshark. ``` This diff adds the `dump_file` field to `VirtualNic` struct and a setter. When dump_file is `None`, no traffic is being dumped. When `Some(path)`, traffic is dumped to `path`. Test Plan: buck2 test and upcoming diffs Reviewed By: wujj123456 Differential Revision: D63498734 fbshipit-source-id: bbcdd602550dbd230418229ef8f8688c943b5f30
- Loading branch information
1 parent
ee99f03
commit b3d0e2d
Showing
1 changed file
with
69 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters