kernelnewbies.kernelnewbies.org archive mirror
 help / color / mirror / Atom feed
From: segooon@gmail.com (Vasiliy Kulikov)
To: kernelnewbies@lists.kernelnewbies.org
Subject: Implement custom network protocol for local processes
Date: Tue, 18 Jan 2011 12:30:40 +0300	[thread overview]
Message-ID: <20110118093039.GA6000@albatros> (raw)
In-Reply-To: <AANLkTi=O2XXO6dp8RupJ883owMCbsjJdGsoZJogkx7vs@mail.gmail.com>

Kfir,

On Mon, Jan 17, 2011 at 23:24 +0200, Kfir Lavi wrote:
> Hi,
> How can one implement custom header network protocol.
> I mean header that wraps regular network packets like ethernet, udp, tcp,
> etc...
> The sending of this custom packets is done between processes running
> locally.
> ie. I get a Ethernet packet, inspect it, then add my custom header and
> forward
> it to another process that listens to a socket, and expect to get data
> wrapped with
> this custom header.

You might want to use datagram-oriented UNIX socket to communicate with
client processes.

Also you have to understand what do you want - getting UDP packets on
specific port doesn't require anything special, just bind()'ing to this
port.  But you can get TCP segments only with SOCK_RAW socket.


Thanks,

-- 
Vasiliy

      parent reply	other threads:[~2011-01-18  9:30 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-01-17 21:24 Implement custom network protocol for local processes Kfir Lavi
2011-01-17 21:43 ` John Mahoney
2011-01-17 21:52   ` Kfir Lavi
2011-01-18  9:30 ` Vasiliy Kulikov [this message]

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=20110118093039.GA6000@albatros \
    --to=segooon@gmail.com \
    --cc=kernelnewbies@lists.kernelnewbies.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;
as well as URLs for NNTP newsgroup(s).