netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Georg Wicherski <georg-wicherski@pixel-house.net>
To: netdev@vger.kernel.org
Subject: Bind TUN to IPv4 Subnet
Date: Wed, 19 Jul 2006 17:26:49 +0200	[thread overview]
Message-ID: <44BE4F39.70405@pixel-house.net> (raw)

Hey Folks,

I need to bind a TUN device previously created by open("/dev/net/tun",
O_RW) to a subnet, let's say 10.254.0.0/16. The ultimate goal is to have
a tunnel endpoint for a IPv4 tunnel, where I can after writing the
packet which came over the tunnel to the TUN device use an arbitary
userland socket bound to one of the 2^16 IPs or just all of them with
with INADDR_ANY.

What is the (sequence?) of ioctl's to configure the TUN device into
`listening' on a whole subnet? If possible, I want to just specify a
base address and a prefix length.

Digging into the curent 2.6.x kernel sources didn't help me much (yes,
they are badly commented).


Thanks,
Georg Wicherski


                 reply	other threads:[~2006-07-19 15:26 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=44BE4F39.70405@pixel-house.net \
    --to=georg-wicherski@pixel-house.net \
    --cc=netdev@vger.kernel.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).