Re: Help.. in tcp kernel sockets

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

 



On Sun, 18 Feb 2007 20:50:16 -0800 (PST) Ravi Shankar wrote:

> Hi all,
> 
> I am new to kernel programming.  
> 
> I need to write a kernel socket (TCP)module which listens to incoming requests (and also reply back).  I downloaded the code from: 
> 
> http://kernelnewbies.org/Simple_UDP_Server 
> 
> and made changes 
> 1) SOCK_DGRAM -> SOCK_STREAM and 
> 2) IPPROTO_UDB -> IPPROTO_TCP

Does it work any better without making these changes?

> I run make on this file and obtain the .ko file.  When i insmod the .ko file and observe the output of dmesg, i get a error message:
> 
> Error getting stream , sock_recvmsg error = -107

linux/include/asm-generic/errno.h says 107 is
#define	ENOTCONN	107	/* Transport endpoint is not connected */

so apparently the socket needs to be connected.  (Note:  I don't know.)
Or did you already find this?


> Can someone please let me know what could be the error?? Should i add more code or what changes do i need to make?
> 
> Also, i need the kernel API's for TCP sockets. Is it the same as user space API's?
> 
> Request anyone to please suggest the remedy.
> 
> Thanks in advance,


---
~Randy
*** Remember to use Documentation/SubmitChecklist when testing your code ***

--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx
Please read the FAQ at 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