mem_segment_t old_fs=get_fs();
set_fs(get_ds());
/*****Add your Code here******/
//to create a socket use sys_socket or sock_create look at
function sys_socket in linux/net/socket.c
//similary you could use functions sock_sendmsg/sock_recvmsg to send
/recv messages
/*****************************/
set_fs(old_fs);
Why do I have to use "set_fs(get_ds())" in order to use the available system calls? Can't I just be able to use them straight way?
Is there any performance penalty for using system call this way?
Thanks!
Fei