LinuxQuestions.org
Go Job Hunting at the LQ Job Marketplace
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices

Reply
 
LinkBack Search this Thread
Old 02-08-2010, 06:23 PM   #1
frackers
LQ Newbie
 
Registered: Feb 2010
Posts: 1

Rep: Reputation: 0
Programming with the kernel tunnel driver


As I'm sure many people have tried, I'm attempting to use the tun driver. I've followed the example in tuntap.txt but a couple of things about it concern me.

Firstly, the 'tun' device is used to create/allocate a device using an ioctl but the file descriptor returned is that which was used to open the 'tun' device in the first place - is this correct or is the user supposed to open the device name that is returned by the alloc function.

Secondly, the name allocation defines a format string of the form 'xxx%d', which is 5 characters long, and examples indicate that the allocated device will be 'xxx0' etc but what happens when you already have 100 tunnels opened (however /that/ is accomplished but see my 1st question!) - will it return 'xxx100', 'xxx101' and overwrite the end of the character buffer?

Finally (for now), has anyone ever found a definition for the function tun_alloc_old() that is referenced in the example?

As far as I can see this file has been in the kernel tree for at least 8 years but it sure looks broken to me!!

Cheers
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
debugging kernel programming (dvice driver) joecole10 Linux - Kernel 2 03-26-2008 11:53 PM
simple test circuit to learn kernel device driver programming slzckboy Programming 3 01-30-2006 02:12 AM
Configuring IPSEC Tunnel on FC3 kernel 2.6 asndp Linux - Security 0 01-08-2005 06:17 AM


All times are GMT -5. The time now is 07:52 PM.

Main Menu
 
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: @linuxquestions
Open Source Consulting | Domain Registration