Where is the TCP source code in Ubuntu 10.04?

This is a discussion on Where is the TCP source code in Ubuntu 10.04? within the Linux Programming forums, part of the Platform Specific Boards category; I was wondering if anyone knows where the TCP source code is located in Ubuntu 10.04
I ask because I ...

Where is the TCP source code in Ubuntu 10.04?

I was wondering if anyone knows where the TCP source code is located in Ubuntu 10.04I ask because I would like to modify the code (like how Cal Tech modify it to FAST TCP)I try the directory usr/src/linux/net/ipv4 (This directory may not be 100% correct but I will check when I get back to my Linux computer), but I could not find the TCP.c file. Unless this file does not exist?

If it does not exist then would you happen to know which file I would want to look at so I could modify just like the FAST-TCP?

I have attached a TCP.c file that I have found and downloaded, but I really do not believe this has to be the correct file. For one I cannot find this in my Linux Desktop and two this is like 3000 lines of codes; it would take me forever to read and understand the code lol.

The code I attached on my first post is where I got the link you have posted. To be honest looking through all those codes are unreasonable.
I see all the multiple tcp_xxx.c files, but I do not know which one I need to modify to create/make similar like the FAST-TCP
Also I would like to know where is the TCP code is located in Linux (Ubuntu 10.04); if you have any idea where it is.

all of the files are relevant. it's clear that you don't understand the scope of what you're hoping to accomplish. kernel code for basic network protocols is not something for beginners to toy with. kernel programmers are generally highly experienced professional developers. if this doesn't describe you, then you're going to have a lot of difficulty understanding this task.

Well even with discouragement I would still at least try. If it is still okay would like to ask questions.

So when I go to the directory on my Desktop Linux usr/src/linux-headers-2.6.32-38/net/ipv4 I do not see any files in c/c++/h.
Though the only file I do see is Kconfig and Makefile and a folder call netfilter.

I was told that the TCP was a pre-compiled, so I assume that the tcp.c code doesn't exist in the Desktop. Is that correct?

I actually did not know that FAST TCP best usage is in multiple machines, but thank you for telling me something new.
I am not doing any that big.

Right now I am looking where I need to modify the TCP so I can make something similar like the FAST TCP for just my Desktop.

Does anyone know a forum or any places where I could learn Kernel so I can continue on this research?

Someone told me that there are two parts to this - the kernel code, and the user-space code
Also that I need to install the source repositories and then download/install the sources.
Does this sounds familiar to anyone?

geewhan - seriously, you're doing the equivalent of asking a board full of model rocket enthusiasts where the code NASA uses to run the MIR space station is, and hoping you can just dive in and change stuff in it after a quick read through once you DO find it (and, also, seem to be of the believe that you could make MIR orbit Mars instead by just tweaking the code a bit).

Linux's TCP stack is some tens of thousands of lines of code. Windows TCP is the same. BSD's stack is the same. All of them different, all of them the product of DECADES of work (all TCP stacks can be traced back to 1960's Unix roots) by industry big-names (e.g. the people who invented the Internet and the people who keep it running now). I'd be amazed if you'd ever compiled a kernel from scratch, if I'm honest (given that you have no idea what a Makefile is), let alone could understand more than 1% of the file (hell, even the comments in Linux kernel code baffle me at times).

I reckon if I sat and pored over it for a decade of two, I'd have only slightly more understanding of what that code does, why it does it the way it does, and where improvements could theoretically be made. And I spend my life building networks and writing programs.

Trust me on this - seriously, trust me. If you can't manage to download the code, find the relevant .c/.h files and compile a modified version of them (hell, with one space extra in a printf), then you are not going to be able to perform any miracles ripping apart a TCP stack for at least the next five years, no matter how clever you are or hard you try.

And what, exactly, do you think you're going to do that the people who DID write that code (that you can't even find, let alone understand) wouldn't have done for you if it provided any benefit? Hell, Google even pretty much abandoned their SPDY SSL protocol and they invented it and could prove it gave real-world benefits because of the upkeep burden of the code!

You are seriously coming across like a petulant child insisting that if Daddy would just let you take the walls out of the house, you could build it again in a more efficient manner.

- Compiler warnings are like "Bridge Out Ahead" warnings. DON'T just ignore them.
- A compiler error is something SO stupid that the compiler genuinely can't carry on with its job. A compiler warning is the compiler saying "Well, that's bloody stupid but if you WANT to ignore me..." and carrying on.
- The best debugging tool in the world is a bunch of printf()'s for everything important around the bits you think might be wrong.

It would likely take me a year or more just to compile Linux from scratch without changing a single line of code.
But, who knows you might be a Genius; The Linux Kernel is the main piece of Linux; this site should have some info on it.

NOTE: The people who compile/work with the Linux Kernel would almost all have the knowledge this site supplies.

"...a computer is a stupid machine with the ability to do incredibly smart things, while computer programmers are smart people with the ability to do incredibly stupid things. They are,in short, a perfect match.." Bill Bryson

Manasij Mukherjee | gcc-4.9.2 @Arch Linux Slow and Steady wins the race... if and only if :1.None of the other participants are fast and steady.
2.The fast and unsteady suddenly falls asleep while running !

@manasij7479: I figure the Linux Kernel must be harder than Compiling MinGW GCC; I spent a few days on that before I gave up.
Note: This was trying to compile under windows which is harder than under Linux.

I am a windows programmer; who knows a some Linux/Unix command syntax.
Learning the required Linux Knowledge that compiling the Linux from scratch likely assumes would take me several weeks to learn.

"...a computer is a stupid machine with the ability to do incredibly smart things, while computer programmers are smart people with the ability to do incredibly stupid things. They are,in short, a perfect match.." Bill Bryson

@manasij7479: I figure the Linux Kernel must be harder than Compiling MinGW GCC; I spent a few days on that before I gave up.
Note: This was trying to compile under windows which is harder than under Linux.

Compiling the toolchain is actually the hardest part, in my opinion.
After you have that ready, it is mostly a matter of placing the right source in the right directory and invoking make.
There is much more going on under the hood, but on Linux, that is pretty much done automagically if the dependencies are not messed up. (which the LFS book describes very well)

Manasij Mukherjee | gcc-4.9.2 @Arch Linux Slow and Steady wins the race... if and only if :1.None of the other participants are fast and steady.
2.The fast and unsteady suddenly falls asleep while running !

back in the late 90's, on my PentiumII, it took about 25 minutes to build a linux 1.6 kernel. granted, the kernel is much bigger now, but on a fast machine, even with full optimisations turned on, it certainly shouldn't take any more than that. my dual core linux laptop builds all of gcc 4.7 in about 4 hours or less.

Hmm, I built gcc 4.7 a while ago on a dual core laptop and it couldn't have taken much more than an hour, I think, if that, including the standard libraries. For sure kernel builds on a contemporary machine are like 5-10 minutes. Configuring the thing is what takes the better part of a year .

I ask because I would like to modify the code (like how Cal Tech modify it [...] looking through all those codes are unreasonable.

Ah -- this must be from the "Things from Cal Tech you can do at home this weekend" list.