Re: socket programming in kernel space

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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);


Regards,
Pradeep.
On 7/23/05, Xiangfei Jia <xjianz@xxxxxxxxx> wrote:
> I know that TCP or UDP can be used in kernel module. Any doc available for
> socket programming in kernel space???
>  
>  Thanks!
>

--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
FAQ:           http://kernelnewbies.org/faq/



[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux