Subject: Re: sendto(2) EINVAL / pacing problem
To: Christoph Kaegi <>
From: der Mouse <mouse@Rodents.Montreal.QC.CA>
List: tech-net
Date: 02/11/2004 04:32:35
> 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);

> 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?

Yes.  As I mentioned a bit ago, UDP is for AF_INET and AF_INET6, not

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

For AF_LOCAL, sys/kern/uipc_proto.c (the initialization of unixsw[]).
Looks to me as though you want uipc_usrreq().

/~\ The ASCII				der Mouse
\ / Ribbon Campaign
 X  Against HTML
/ \ Email!	     7D C8 61 52 5D E7 2D 39  4E F1 31 3E E8 B3 27 4B