Subject: Re: sendto(2) EINVAL / pacing problem
To: None <tech-net@netbsd.org>
From: Christoph Kaegi <kgc@zhwin.ch>
List: tech-net
Date: 02/11/2004 10:27:25
On 09.02-22:28, Christos Zoulas wrote:
> >
> >Hm, where do I find the file containing sendto()?
> >By a quick search I only found src/lib/libc/net/send.c which calls 
> >sendto() itself.
> 
> sendto /usr/src/sys/kern/uipc_syscalls.c
> and then follow it to sendit()..

OK, I followed sendit() and sosend().

The EINVAL comes from the line 

  error = (*so->so_proto->pr_usrreq)(so, 
     (flags & MSG_OOB) ? PRU_SENDOOB : PRU_SEND, 
     top, addr, control, p);

in the sosend() function in src/sys/kern/uipc_socket.c.

I also put printfs into udp_usrreq.c but didn't score a hit there.

Now, as this is a unix domain socket, could it be that the
above mentionned line doesn't call udp_usrreq() but something
else?

I couldn't find out, where so->so_proto->pr_usrreq gets 
initialized.

Thanks

Chris

-- 
----------------------------------------------------------------------
Christoph Kaegi                                           kgc@zhwin.ch
----------------------------------------------------------------------