[lkml]   [2000]   [Aug]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
Subjectnewbie question: tcp/ip in kernel

I was looking for information about this in the lkml archives and lots
of books and howtos but I did not find the definitive answer to my
Please excuse if I missed something.

I want to do TCP/IP in the Kernel.
I already have an implementation running in the 2.2.14 Kernel and it
quite good. But I wanted to make sure that I did not miss something
important because the application I am working on must be very stable

I assume that the normal way would be something like this (2.2 kernel):

mm_segment_t old_fs;

old_fs = get_fs();
set_fs(KERNEL_DS); /* Needed for the copy_from_user
that tcp_do_sendmsg is going to do */

err = sock_sendmsg(sock, msg, size);


Is this correct ?

More questions:

-) What is the best way to get rid of the copy_from_user memcpy that
tcp_do_sendmsg does in that call?

-) How do I have to adapt this code to work in the 2.4 Kernel
(especially because the lock_kernel should hopefully no longer be needed
in 2.4)
What is the proper way to make that thing SMP-Safe in 2.4?

Thanks for your answers

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
Please read the FAQ at

 \ /
  Last update: 2005-03-22 12:38    [W:0.160 / U:0.028 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site