Skip to contentSkip to conversation

TCP and UDP implementations

RFC Jeff Sipek 2 participants 2 messages Jul 26, 2003

lore
Share & tools
lore

Jeff Sipek

author
#0 lore raw

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hello all,
I noticed that there are two implementations of TCP and UDP in the kernel -
one for IPv4 and the other for IPv6. Correct me if I am wrong, but wouldn't it be better to just have one implementation for both versions of IP? I know this for sure:

1) it would decrease the size of the kernel (this wouldn't be too dramatic, but still)

2) it would make maintaining of the code half the work

AFAIK there are small differences in TCP and UDP between IPv4 and IPv6, but they could be resolved using simple "work arounds."

Thanks,
Jeff.

- --
The obvious mathematical breakthrough would be development of an easy way to factor large prime numbers.
- Bill Gates, The Road Ahead, pg. 265
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.2 (GNU/Linux)

iD8DBQE/IiqtwFP0+seVj/4RAn5TAKCbdCGvUtPAJun994GfcsDkfMLqXwCgsKwG dl/5CjR0hCRbpv+SNH7L3ds=
=z5jS
-----END PGP SIGNATURE-----

#1 lore raw
Quoted 5 lines · Jeff Sipek

Hello all,
I noticed that there are two implementations of TCP and UDP in the kernel - one for IPv4 and the other for IPv6. Correct me if I am wrong, but wouldn't it be better to just have one implementation for both versions of IP? I know this for sure:

The way how things are in 2.4 (I haven't looked too deeply into 2.5/2.6), IPv6 TCP and UDP do NEED IPv4 TCP code to make most of TCP logic. With UDP the amount of logic in kernel side is a lot simpler, and I do think the code was in essense duplicated.

Quoted 4 lines

1) it would decrease the size of the kernel (this wouldn't be too dramatic, but still)

2) it would make maintaining of the code half the work

Because of the degree of present sharing: no.

Quoted 2 lines

AFAIK there are small differences in TCP and UDP between IPv4 and IPv6, but they could be resolved using simple "work arounds."

IPv6's TCP is (was) just that kind of "work around" to handle differences in IP addresses.

Quoted 2 lines

Thanks,
Jeff.

/Matti Aarnio