-- The printer may receive incomplete packet in the buffer, truncated at any
- random position, for example by capturing with '-s size' option.
- Thus use ND_TTEST, ND_TTEST2, ND_TCHECK or ND_TCHECK2 for bound checking.
- For ND_TCHECK2:
- Define : static const char tstr[] = " [|protocol]";
- Define a label: trunc
- Print with: ND_PRINT((ndo, "%s", tstr));
- You can test the code via:
- sudo ./tcpdump -s snaplen [-v][v][...] -i lo # in a terminal
- sudo tcpreplay -i lo sample.pcap # in another terminal
- You should try several values for snaplen to do various truncation.
+d) The printer may receive incomplete packet in the buffer, truncated at any
+ random position, for example by capturing with '-s size' option.
+ Thus use ND_TTEST, ND_TTEST2, ND_TCHECK or ND_TCHECK2 for bound checking.
+ For ND_TCHECK2:
+ Define : static const char tstr[] = " [|protocol]";
+ Define a label: trunc
+ Print with: ND_PRINT((ndo, "%s", tstr));
+ You can test the code via:
+ sudo ./tcpdump -s snaplen [-v][v][...] -i lo # in a terminal
+ sudo tcpreplay -i lo sample.pcap # in another terminal
+ You should try several values for snaplen to do various truncation.