Sponsored Content
Full Discussion: tcpdump vs. wireshark
Special Forums IP Networking tcpdump vs. wireshark Post 302673531 by yotamhc on Wednesday 18th of July 2012 04:41:32 AM
Old 07-18-2012
tcpdump vs. wireshark

Hi,

I am trying to capture manually crafted IP packets, created using Scapy, to a pcap file that can later be replayed using tcpreplay.

When using wireshark, I can successfully capture these packets and view them in wireshark.
However, when using tcpdump, these packets are then shown in wireshark as malformed packets. It seems like tcpdump wrongly parses/stores them.

Is there any difference between tcpdump and wireshark capturing? Can I configure tcpdump to capture just like wireshark does? (I tried -s 0 or -s 65536 and this did not help)

Thank you!
 

We Also Found This Discussion For You

1. IP Networking

Wireshark duplicate messages

Hello all, Is it any way to filter or better do not capture at all, duplicate messages? Thanks in advance (2 Replies)
Discussion started by: @dagio
2 Replies
PCAP_CREATE(3PCAP)														PCAP_CREATE(3PCAP)

NAME
pcap_create - create a live capture handle SYNOPSIS
#include <pcap/pcap.h> char errbuf[PCAP_ERRBUF_SIZE]; pcap_t *pcap_create(const char *source, char *errbuf); DESCRIPTION
pcap_create() is used to create a packet capture handle to look at packets on the network. source is a string that specifies the network device to open; on Linux systems with 2.2 or later kernels, a source argument of "any" or NULL can be used to capture packets from all interfaces. On Darwin systems version 13 or later, a source argument of "all" or "any" can be used to capture packets from all interfaces. A source argument of NULL can be used to capture packets from all physical interfaces, i.e. excluding loopback, virtual and tunnel interfaces. The returned handle must be activated with pcap_activate() before packets can be captured with it; options for the capture, such as promis- cuous mode, can be set on the handle before activating it. RETURN VALUE
pcap_create() returns a pcap_t * on success and NULL on failure. If NULL is returned, errbuf is filled in with an appropriate error mes- sage. errbuf is assumed to be able to hold at least PCAP_ERRBUF_SIZE chars. SEE ALSO
pcap(3PCAP), pcap_activate(3PCAP) 3 January 2014 PCAP_CREATE(3PCAP)
All times are GMT -4. The time now is 03:22 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy