All of lore.kernel.org
 help / color / mirror / Atom feed
From: Oumer Teyeb <oumer@cpk.auc.dk>
To: netfilter@lists.netfilter.org
Subject: Tcpdump and libipq
Date: Fri, 10 Oct 2003 09:20:04 +0200	[thread overview]
Message-ID: <3F865DA4.8020104@cpk.auc.dk> (raw)

Hi,

I have posted this question some days ago without being a member of the 
mailing list, and I don't think it has been posted. Now that I am a 
member, hopefully it will be sent this time:-)

I have a program that uses libipq to delay and drop packets, so that the 
transmission will be affected as if the connection is a wireless 
network. It works fine. My intention was to use tcpdump in conjunction 
with my program to see exactly when the packets are arriving, and then 
use tcptrace to plot the graphs. But as libipq is working at the netlink 
socket layer, I am doubting that when a packet reaches my firewall, it 
will alreay be registerd by tcpdump.

For example, I set my program to delay every packet arriving from port 
xx 100 msec. I also run tcpdump in the background to sniff on the same 
flow. Say a  packet arrives at 0.000 in my network card, and it was 
delayed 100 msec by my program and sent to upper layers. Will Tcpdump 
register the packet arrival time as 0.000 or as 100 ? I will try to 
check it myself, but if anyone knows, that will save me some time.

I try to save the data whenever I get it from ip_get_packet, and then 
compared it with the tcpdump I did at the same time. For the test runs, 
I was delaying every packet by one sec (both incoming and outgoing). 
Then I did an FTP session, and I have a very perplexing result:
There is a 1 second diff between the timestamps in the data I set and 
the ones from tcpdump, but only when the packets are outgoing.
For incoming packets it seems the tcpdump timestamp and the timestamp of 
packet from libipq seem the same (ofcourse there can be some microsecond 
differences). Why is it happening this way, and is there a possiblity of 
making tcpdump to save the data only after libipq has taken care of them?

Regards,
Oumer




             reply	other threads:[~2003-10-10  7:20 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-10-10  7:20 Oumer Teyeb [this message]
  -- strict thread matches above, loose matches on Subject: below --
2003-10-10  9:22 Tcpdump and libipq pigi
2003-10-10  7:52 Pierluigi Frullani
2003-10-10  7:32 Oumer Teyeb
2003-10-08  9:14 Oumer Teyeb

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3F865DA4.8020104@cpk.auc.dk \
    --to=oumer@cpk.auc.dk \
    --cc=netfilter@lists.netfilter.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.