From: Markus Mottl <markus.mottl@gmail.com>
To: Chapi Chapo <rixed@happyleptic.org>
Cc: OCaml Mailing List <caml-list@inria.fr>
Subject: Re: [Caml-list] IPv6 packet parsing
Date: Fri, 18 Oct 2013 16:09:54 -0400 [thread overview]
Message-ID: <CAP_800o2yCHqF0tCcn1OrH1eyso2UGGRsu=8ezE1OLgu6JNTQA@mail.gmail.com> (raw)
In-Reply-To: <20131018175225.GA6256@dell.happyleptic.org>
On Fri, Oct 18, 2013 at 1:52 PM, <rixed@happyleptic.org> wrote:
> I feel sorry to be clueless twice in a row, but how are these new syscalls
> supposed to help sniffing & parsing packets?
There are several ways in which they could be beneficial. In fact,
you'll usually have to combine them. Packet sniffers often need to
analyze some things in realtime while also logging all sniffed data to
a file for later reference.
"splice" allows you to move data from one descriptor to another
without ever having to copy it to user land in between. "tee" allows
you to cheaply duplicate the content of one pipe to another. E.g. you
can thus parse packets from one pipe for realtime analysis while
splicing duplicated (via "tee") data to a file.
The packet sniffer might also have another, non-verbatim output stream
that contains only filtered parts of the communication. You could use
"vmsplice" to send data contained in your user buffers to a pipe
(without copying!) and then splice the data to a file while e.g. also
duplicating it to a socket, etc.
Anyway, I agree with Paul that such performance tweaks may often
disappoint. Other things (e.g. batching of I/O transactions to
minimize system calls) are usually much more important.
Regards,
Markus
--
Markus Mottl http://www.ocaml.info markus.mottl@gmail.com
next prev parent reply other threads:[~2013-10-18 20:09 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-10-18 4:15 Johan Mazel
2013-10-18 5:33 ` Stéphane Glondu
2013-10-18 11:55 ` rixed
2013-10-18 11:59 ` Anil Madhavapeddy
2013-10-18 12:16 ` rixed
2013-10-18 12:20 ` Anil Madhavapeddy
2013-10-18 12:26 ` rixed
2013-10-18 13:52 ` Gerd Stolpmann
2013-10-18 14:13 ` rixed
2013-10-18 14:40 ` Stéphane Glondu
2013-10-18 14:20 ` Markus Mottl
2013-10-18 17:23 ` Paul Pelzl
2013-10-18 17:52 ` rixed
2013-10-18 20:09 ` Markus Mottl [this message]
2013-11-06 13:57 ` Richard W.M. Jones
2013-10-19 8:54 ` Johan Mazel
2013-10-21 7:58 ` rixed
2013-10-21 8:37 ` Johan Mazel
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='CAP_800o2yCHqF0tCcn1OrH1eyso2UGGRsu=8ezE1OLgu6JNTQA@mail.gmail.com' \
--to=markus.mottl@gmail.com \
--cc=caml-list@inria.fr \
--cc=rixed@happyleptic.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox