LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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
 
Search this Thread
Old 05-22-2007, 07:40 AM   #1
kiran_cyberpro
LQ Newbie
 
Registered: May 2007
Distribution: Fedora
Posts: 11

Rep: Reputation: 3
Lightbulb Disable TCP/IP Stack from user-space


Hi

I am the author of the Open-Source Project: Traffic Squeezer
Refer project URL for more details: http://trafficsqueezer.sourceforge.net

For my project, I need my basic Linux box to run more like a transparent L2-bridge.

So, i want to disable the TCP/IP kernel space stack from the user-space.
Though a new kernel build can be built with no TCP option.
But, I want an option to disable it from the kernel which has got already the
TCP/IP stack up, from my user-space application too, when in need during runtime,
through some ioctl() calls, etc.


Can anyone help me on this regard


Rgds, Kiran. K

Last edited by kiran_cyberpro; 05-22-2007 at 08:00 AM.
 
Old 05-22-2007, 12:29 PM   #2
osor
HCL Maintainer
 
Registered: Jan 2006
Distribution: (H)LFS, Gentoo
Posts: 2,450

Rep: Reputation: 70
I’m not sure if you can do this easily on a per-process basis (is that the question?). You can always unload the tcp module (if in fact tcp was built as a module). You might also try looking at some of the options given by sysctl.
 
Old 05-22-2007, 08:06 PM   #3
osor
HCL Maintainer
 
Registered: Jan 2006
Distribution: (H)LFS, Gentoo
Posts: 2,450

Rep: Reputation: 70
There is of course the counterintuitive approach of using additional networking functionality to disable normal networking functionality: netfilter. There are a few iptables matches/targets which might prove beneficial to you (e.g., the “owner” match that may deny or accept based on PID or UID). This still means the functionality is in the kernel, it just limits it.
 
Old 05-22-2007, 11:21 PM   #4
kiran_cyberpro
LQ Newbie
 
Registered: May 2007
Distribution: Fedora
Posts: 11

Original Poster
Rep: Reputation: 3
Yep, customizing kernel and adding the API would be the choice possible, only if I provide the complete embedded solution(with hardware), or a custom distribution or some patch along with my application code.

But, say suppose end-user(may or may not know much about Linux OS stuff) have a fresh installation of any Linux distribution(Fedora, Ubuntu, SUSE, etc, etc).

With my code, without any hassles I want him to just install and make use of this functionality.

Firewalls: well, thats seems to be a good idea, if not for ever at least for temporary fix. The reason behind this i don't want to burden the kernel by doing more processing by doing packet classification and filtering. And wanna avoid it some extent

rgds, Kiran. K
 
Old 05-22-2007, 11:54 PM   #5
Matir
Moderator
 
Registered: Nov 2004
Location: San Jose, CA
Distribution: Ubuntu
Posts: 8,507

Rep: Reputation: 118Reputation: 118
If you want to completely get rid of the network stack "on demand" on any kernel, would it not be sufficient to just take all interfaces down?
 
Old 05-23-2007, 12:04 AM   #6
kiran_cyberpro
LQ Newbie
 
Registered: May 2007
Distribution: Fedora
Posts: 11

Original Poster
Rep: Reputation: 3
Hi Matir


I need networking option very much. Since the project is going to accept network traffic. Process in Layer-2 level like a network bridge/switch. But i want to disable the TCP/IP stack from user-space.

rgds, Kiran
 
Old 01-03-2009, 07:36 AM   #7
shenaidd
LQ Newbie
 
Registered: Jan 2009
Posts: 1

Rep: Reputation: 0
Hi
I am facing the same problem as mentioned by Kiran. Could you please suggest a solution?
 
  


Reply

Tags
tcp, userspace


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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Difference b/t Kernel stack and User stack hazzyb Linux - Software 2 09-29-2008 07:40 PM
user level TCP stack implementation sumati01 Linux - Networking 2 05-14-2007 04:04 PM
TCP cannections in TCP stack hegdeshashi Linux - Networking 1 01-04-2006 07:24 PM
Need to disable timer or all interrupts from user space G35Coupe Linux - General 0 11-16-2004 12:31 AM
TCP/IP Stack on Linux? Rossak Linux - Networking 2 07-27-2003 06:20 PM


All times are GMT -5. The time now is 02:00 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 Google+: linuxquestions
Open Source Consulting | Domain Registration