SOCK_STREAM socket in kernel space

2010-12-21 Thread Mohammad Hedayati
I'm about to use a char device for a kind of distributed processing, so I've coded the open function as follows. The problem is that soaccept returns 0 without populating the raddr. I've checked netstat, everything seems to be fine, the socket is created, bound and the state is LISTENING. Even the

Re: SOCK_STREAM socket in kernel space

2010-12-21 Thread Mohammad Hedayati
On Tue, Dec 21, 2010 at 4:23 PM, John Baldwin wrote: > On Tuesday, December 21, 2010 6:39:26 am Mohammad Hedayati wrote: >> I'm about to use a char device for a kind of distributed processing, >> so I've coded the open function as follows. The problem is that >

stream socket

2010-12-23 Thread Mohammad Hedayati
Suppose we've created a stream socket between two nodes. What happens if you write large chunks of data into the socket but the other pair doesn't read that for presumably long time?! Does the connection fail or data is missed?! ___ freebsd-net@freebsd.or

Inappropriate ioctl for device

2010-12-23 Thread Mohammad Hedayati
I'm writing a simple char device. So far everything went so good (read/write), but here I'm going to add support for ioctl. int ioctl(struct cdev *dev, u_long cmd, caddr_t data, int flags, struct thread *td) { int error = 0; uprintf("Here...\n"); return(error); } and I'm ca