LinuxQuestions.org
Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
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-10-2005, 06:02 PM   #1
tarazan
LQ Newbie
 
Registered: May 2005
Posts: 2

Rep: Reputation: 0
TCP/IP stack source code


Hello,

I would like to know if i can have access to the TCP/IP source code in linux and where does it reside. I need to program at the data link layer. is that possible without having to recompile the kernel ? If not can i make the packets pass through a new stack made by me without passing by the original one ?

Thanks.
 
Old 05-11-2005, 02:25 PM   #2
michaelsanford
Member
 
Registered: Feb 2005
Location: Ottawa/Montréal
Distribution: Slackware + Darwin (MacOS X)
Posts: 468

Rep: Reputation: 30
I'm not sure if this will do what you want, but you might want to look into iptables' QUEUE target which, via libipq, allows you to pass packets to a userspace application.

Check this out:
http://www.linuxquestions.org/questi...hreadid=319171

PS To directly answer your original question, it's in the net/ subfolder of the linux source. If you have it installed it's probably symlinked to /usr/src/linux, otherwise just download it from kernel.org
Code:
root@gateway:/usr/src/linux/net# ls
802/      TUNABLE     bluetooth/  core/      ipv4/  key/      netrom/  rxrpc/    socket.o      unix/
8021q/    appletalk/  bridge/     decnet/    ipv6/  lapb/     nonet.c  sched/    sunrpc/       wanrouter/
Kconfig   atm/        built-in.o  econet/    ipx/   llc/      packet/  sctp/     sysctl_net.c  x25/
Makefile  ax25/       compat.c    ethernet/  irda/  netlink/  rose/    socket.c  sysctl_net.o  xfrm/
You can probably just write a module and load it into the kernel without having to recompile the kernel itself but this is now getting beyond my skill level.

Last edited by michaelsanford; 05-11-2005 at 02:28 PM.
 
Old 05-11-2005, 02:37 PM   #3
tarazan
LQ Newbie
 
Registered: May 2005
Posts: 2

Original Poster
Rep: Reputation: 0
Thanks for your reply. So is it possible to implement a whole new stack and make the packet pass through it ? and do u have any resources regarding this matter ? Thanks.
 
Old 05-11-2005, 02:56 PM   #4
michaelsanford
Member
 
Registered: Feb 2005
Location: Ottawa/Montréal
Distribution: Slackware + Darwin (MacOS X)
Posts: 468

Rep: Reputation: 30
Quote:
Originally posted by michaelsanford You can probably just write a module and load it into the kernel without having to recompile the kernel itself but this is now getting beyond my skill level. [/B]
That's the extent of my kernel programming knowledge You might want to post another question on/ask this thread be moved to the Programming forum if nobody replies here.
 
  


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



Similar Threads
Thread Thread Starter Forum Replies Last Post
getting new tcp/ip stack on linux cdp Linux - Networking 7 06-29-2005 12:50 PM
Trying to locate source code for TCP/IP stack in Red Hat 9.0 pjz Linux - Software 1 06-13-2005 01:41 PM
tcp source code & window options arch_linux Programming 2 09-10-2003 11:52 AM
TCP/IP Stack on Linux? Rossak Linux - Networking 2 07-27-2003 06:20 PM
nonblocking TCP/IP source code? Mad_C Programming 13 05-27-2003 05:39 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 01:05 PM.

Main Menu
Advertisement
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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration