netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Bind TUN to IPv4 Subnet
@ 2006-07-19 15:26 Georg Wicherski
  0 siblings, 0 replies; only message in thread
From: Georg Wicherski @ 2006-07-19 15:26 UTC (permalink / raw)
  To: netdev

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


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2006-07-19 15:26 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-07-19 15:26 Bind TUN to IPv4 Subnet Georg Wicherski

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).