Skip to content

Commit

Permalink
Feature #853 -w == --write, -W == --suppress-warnings
Browse files Browse the repository at this point in the history
Also fix maximum snap length
  • Loading branch information
fklassen committed Jun 29, 2024
1 parent 3032e68 commit 6a8dbd6
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 7 deletions.
5 changes: 3 additions & 2 deletions docs/CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
06/23/2024 Version 4.5.0-beta3
06/29/2024 Version 4.5.0-beta3
- tcpreplay --include / --exclude to control which packets are replayed (#884)
- add -w (--suppress-warnings) option to suppress warning messages (#878)
- add -W (--suppress-warnings) option to suppress warning messages (#878)
- AF_XDP compile issue due to merge issue (#876)
- memory leak in tcpprep when using include/exclude (#869)
- memory leak in tcpprep when using RegEx (#867)
- fix nanosecond timestamp regression bug (#863)
- autotools - AC_HELP_STRING is obsolete in 2.70 (#856)
- add -w output.pcap command line option to direct the output to a pcap (#853)
- configure.ac: do not run conftest in case of cross compilation (#849)
- Haiku support (#847)
- --fixhdrlen option added to control action on packet length changes (#846)
Expand Down
2 changes: 1 addition & 1 deletion src/common/sendpacket.c
Original file line number Diff line number Diff line change
Expand Up @@ -847,7 +847,7 @@ sendpacket_open_pcap_dump(const char *device, char *errbuf)

dbg(1, "sendpacket: using Libpcap");

pcap = pcap_open_dead(DLT_EN10MB, 65535);
pcap = pcap_open_dead(DLT_EN10MB, MAX_SNAPLEN);
if ((dump = pcap_dump_open(pcap, device)) == NULL){
char* err_msg = pcap_geterr(pcap);

Check warning on line 852 in src/common/sendpacket.c

View workflow job for this annotation

GitHub Actions / cpp-linter

src/common/sendpacket.c:852:15 [cppcoreguidelines-init-variables]

variable 'err_msg' is not initialized
strlcpy(errbuf, err_msg, PCAP_ERRBUF_SIZE);
Expand Down
8 changes: 4 additions & 4 deletions src/tcpreplay_opts.def
Original file line number Diff line number Diff line change
Expand Up @@ -265,6 +265,7 @@ flag = {
value = i;
arg-type = string;
max = 1;
equivalence = intf1;
must-set;
descrip = "Client to server/RX/primary traffic output interface";
doc = <<- EOText
Expand All @@ -289,8 +290,8 @@ EOText;
};

flag = {
name = output;
value = o;
name = write;
value = w;
arg-type = string;
max = 1;
equivalence = intf1;
Expand Down Expand Up @@ -667,7 +668,6 @@ EOText;

flag = {
name = pid;
value = P;
descrip = "Print the PID of tcpreplay at startup";
flag-code = <<- EOPid

Expand All @@ -691,7 +691,7 @@ EOText;

flag = {
name = suppress-warnings;
value = w;
value = W;
immediate;
descrip = "suppress printing warning messages";
settable;
Expand Down

0 comments on commit 6a8dbd6

Please sign in to comment.