LinuxQuestions.org
Help answer threads with 0 replies.
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 03-02-2005, 12:59 AM   #1
karanld
LQ Newbie
 
Registered: Mar 2005
Posts: 1

Rep: Reputation: 0
Question How to modify TCP implementation in kernel??


Hey every1,

I m currentely workin on a project that requires me to have control over generation of TCP headers. I need to know the exact way of generating TCP headers.

I have found relevant kernel source files in /usr/src/linux2.4.20-8/net/ipv4 directory.
These files are tcp.c, tcp_output.c, tcp_input.c, tcp_ipv4.c

I need to know, from these files, which one is generating the TCP header for outgoing data.

I tried modifying tcp_output.c but problem is I cant push its module into the kernel. I cant locate its old module. Is this file actually being compiled while I do "make modules" or "make dep" ??? If not then, how to compile it ???

Waiting for a cool reply . . .

Karan
 
Old 03-02-2005, 02:30 AM   #2
jtshaw
Senior Member
 
Registered: Nov 2000
Location: Seattle, WA USA
Distribution: Ubuntu @ Home, RHEL @ Work
Posts: 3,892
Blog Entries: 1

Rep: Reputation: 67
It is most likely being compiled during the make bzImage step. The ipv4/tcp stuff is typically (maybe always?) staticly compiled into the kernel image.

It has been a while, but if I recall headers for outgoing packets are modified in a couple places in tcp_output.c. The easiest way to find these places is probably to look for usage of the struct tcphdr. As I am sure you have figured out already, struct tcphdr is the data structure provided by tcp.h for tcp headers.
 
Old 03-02-2005, 06:06 AM   #3
Darin
Senior Member
 
Registered: Jan 2003
Location: Portland, OR USA
Distribution: Slackware, SLAX, Gentoo, RH/Fedora
Posts: 1,024

Rep: Reputation: 45
This post would probably get a better response in the programming forum. I would wait for an op to move it or wait 24hrs before double posting in programming though.
 
Old 03-02-2005, 08:15 AM   #4
broch
Member
 
Registered: Feb 2005
Distribution: Slackware-current 64bit
Posts: 465

Rep: Reputation: 32
sysctl is your friend
 
  


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
Tcp implementation in linux kskkumar Linux - Networking 1 08-24-2005 06:45 AM
Routing implementation in the kernel sidra Programming 0 04-21-2005 05:17 PM
Questions on Linux 2.4.20 TCP fast recovery and ECN implementation enjoyzj Linux - Networking 0 07-16-2004 08:57 AM
tcp linux implementation mk_26 Linux - Networking 0 03-22-2004 09:10 PM
Linux TCP implementation mk_26 Linux - Newbie 0 03-22-2004 05:05 PM

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

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